From 650a7297630cd4ae26b18b65c440fffbb66dd5bb Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Mon, 12 Jul 2021 11:45:51 -0700 Subject: [PATCH 1/8] Add theorem generations to tests --- ast/src/lib.rs | 5 + compiler/tests/test.rs | 61 +- .../compiler/compiler/address/equal.leo.out | 276 + .../compiler/compiler/address/ternary.leo.out | 477 ++ .../compiler/array/complex_access.leo.out | 4820 +++++++++++++++++ .../compiler/array/equal_initializer.leo.out | 283 + .../array/equal_initializer_2.leo.out | 502 ++ .../compiler/array/input_nested_3x2.leo.out | 293 + .../compiler/array/input_tuple_3x2.leo.out | 283 + .../compiler/array/multi_initializer.leo.out | 624 +++ .../compiler/compiler/array/nested.leo.out | 519 ++ .../compiler/array/nested_3x2_value.leo.out | 776 +++ .../compiler/compiler/array/registers.leo.out | 537 ++ .../compiler/compiler/array/slice.leo.out | 413 ++ .../compiler/array/slice_lower.leo.out | 891 +++ .../compiler/compiler/array/spread.leo.out | 690 +++ .../compiler/array/ternary_in_array.leo.out | 665 +++ .../compiler/array/tuple_3x2_value.leo.out | 766 +++ .../compiler/array/type_input_3x2.leo.out | 584 ++ .../compiler/array/type_input_4x3x2.leo.out | 1576 ++++++ .../type_nested_value_nested_3x2.leo.out | 828 +++ .../type_nested_value_nested_4x3x2.leo.out | 1802 ++++++ .../array/type_nested_value_tuple_3x2.leo.out | 767 +++ .../type_nested_value_tuple_4x3x2.leo.out | 1782 ++++++ .../array/type_tuple_value_nested_3x2.leo.out | 776 +++ .../type_tuple_value_nested_4x3x2.leo.out | 1800 ++++++ .../array/type_tuple_value_tuple_3x2.leo.out | 766 +++ .../type_tuple_value_tuple_4x3x2.leo.out | 1780 ++++++ .../compiler/compiler/boolean/and.leo.out | 222 + .../compiler/boolean/conditional.leo.out | 249 + .../compiler/compiler/boolean/equal.leo.out | 222 + .../compiler/boolean/not_equal.leo.out | 222 + .../compiler/compiler/boolean/or.leo.out | 222 + .../compiler/compiler/char/circuit.leo.out | 529 ++ .../compiler/compiler/char/neq.leo.out | 315 ++ .../compiler/char/nonprinting.leo.out | 1770 ++++++ .../compiler/compiler/char/out.leo.out | 351 ++ .../circuits/const_self_variable.leo.out | 671 +++ ...ne_circuit_inside_circuit_function.leo.out | 614 +++ .../circuits/duplicate_name_context.leo.out | 807 +++ .../compiler/compiler/circuits/inline.leo.out | 307 ++ .../circuits/inline_member_pass.leo.out | 736 +++ .../compiler/circuits/member_function.leo.out | 610 +++ .../circuits/member_function_nested.leo.out | 930 ++++ .../circuits/member_static_function.leo.out | 550 ++ .../member_static_function_nested.leo.out | 684 +++ .../compiler/circuits/member_variable.leo.out | 427 ++ .../member_variable_and_function.leo.out | 711 +++ .../circuits/mut_self_variable.leo.out | 840 +++ .../circuits/mut_self_variable_branch.leo.out | 1284 +++++ .../mut_self_variable_conditional.leo.out | 693 +++ .../compiler/circuits/mut_variable.leo.out | 637 +++ .../mutable_call_immutable_context.leo.out | 1382 +++++ .../compiler/circuits/pedersen_mock.leo.out | 1481 +++++ .../compiler/circuits/self_member.leo.out | 653 +++ .../compiler/compiler/console/assert.leo.out | 303 ++ .../console/conditional_assert.leo.out | 395 ++ .../compiler/compiler/console/debug.leo.out | 270 + .../compiler/compiler/console/error.leo.out | 270 + .../compiler/compiler/console/log.leo.out | 270 + .../compiler/console/log_conditional.leo.out | 399 ++ .../compiler/console/log_input.leo.out | 276 + .../compiler/console/log_parameter.leo.out | 303 ++ .../console/log_parameter_many.leo.out | 336 ++ .../compiler/definition/out_of_order.leo.out | 311 ++ .../out_of_order_with_import.leo.out | 455 ++ .../compiler/compiler/field/add.leo.out | 294 + .../compiler/compiler/field/div.leo.out | 294 + .../compiler/compiler/field/eq.leo.out | 222 + .../compiler/compiler/field/field.leo.out | 366 ++ .../compiler/compiler/field/mul.leo.out | 294 + .../compiler/compiler/field/negate.leo.out | 282 + .../compiler/function/array_input.leo.out | 516 ++ .../function/array_params_direct_call.leo.out | 735 +++ .../function/conditional_return.leo.out | 390 ++ .../compiler/compiler/function/empty.leo.out | 335 ++ .../compiler/function/iteration.leo.out | 699 +++ .../function/iteration_repeated.leo.out | 828 +++ .../function/multiple_returns.leo.out | 708 +++ .../function/multiple_returns_main.leo.out | 273 + .../compiler/function/newlines.leo.out | 231 + .../compiler/function/repeated.leo.out | 525 ++ .../compiler/compiler/function/return.leo.out | 402 ++ .../function/return_array_nested_pass.leo.out | 804 +++ .../function/return_array_tuple_pass.leo.out | 802 +++ .../compiler/function/return_tuple.leo.out | 749 +++ .../function/return_tuple_conditional.leo.out | 832 +++ .../compiler/function/value_unchanged.leo.out | 598 ++ .../global_consts/global_const_types.leo.out | 4548 ++++++++++++++++ .../input_files/program_input/main.leo.out | 210 + .../program_input/main_array.leo.out | 278 + .../program_input/main_char.leo.out | 348 ++ .../program_input/main_field.leo.out | 354 ++ .../program_input/main_group.leo.out | 392 ++ .../main_multi_dimension_array.leo.out | 1296 +++++ .../program_input/main_multiple.leo.out | 222 + .../program_input/main_string.leo.out | 475 ++ .../program_input/main_tuple.leo.out | 515 ++ .../basic.leo.out | 246 + .../token_withdraw.leo.out | 891 +++ .../program_input_constants/main.leo.out | 282 + .../main_array.leo.out | 416 ++ .../program_input_constants/main_char.leo.out | 348 ++ .../main_field.leo.out | 354 ++ .../main_group.leo.out | 516 ++ .../main_multi_dimension_array.leo.out | 1028 ++++ .../main_multiple.leo.out | 294 + .../main_string.leo.out | 475 ++ .../main_tuple.leo.out | 551 ++ .../program_registers/registers_array.leo.out | 180 + .../program_registers/registers_pass.leo.out | 219 + .../program_state/access_all.leo.out | 519 ++ .../program_state/access_state.leo.out | 270 + .../input_files/program_state/basic.leo.out | 210 + .../compiler/integers/i128/add.leo.out | 303 ++ .../integers/i128/console_assert.leo.out | 233 + .../compiler/integers/i128/div.leo.out | 303 ++ .../compiler/integers/i128/eq.leo.out | 300 + .../compiler/integers/i128/ge.leo.out | 300 + .../compiler/integers/i128/gt.leo.out | 300 + .../compiler/integers/i128/le.leo.out | 300 + .../compiler/integers/i128/lt.leo.out | 300 + .../compiler/integers/i128/max.leo.out | 304 ++ .../compiler/integers/i128/min.leo.out | 304 ++ .../compiler/integers/i128/mul.leo.out | 303 ++ .../compiler/integers/i128/ne.leo.out | 300 + .../compiler/integers/i128/negate.leo.out | 258 + .../compiler/integers/i128/negate_min.leo.out | 443 ++ .../integers/i128/negate_zero.leo.out | 373 ++ .../compiler/integers/i128/sub.leo.out | 303 ++ .../compiler/integers/i128/ternary.leo.out | 409 ++ .../compiler/integers/i16/add.leo.out | 303 ++ .../integers/i16/console_assert.leo.out | 233 + .../compiler/integers/i16/div.leo.out | 303 ++ .../compiler/compiler/integers/i16/eq.leo.out | 300 + .../compiler/compiler/integers/i16/ge.leo.out | 300 + .../compiler/compiler/integers/i16/gt.leo.out | 300 + .../compiler/compiler/integers/i16/le.leo.out | 300 + .../compiler/compiler/integers/i16/lt.leo.out | 300 + .../compiler/integers/i16/max.leo.out | 304 ++ .../compiler/integers/i16/min.leo.out | 304 ++ .../compiler/integers/i16/mul.leo.out | 303 ++ .../compiler/compiler/integers/i16/ne.leo.out | 300 + .../compiler/integers/i16/negate.leo.out | 258 + .../compiler/integers/i16/negate_min.leo.out | 443 ++ .../compiler/integers/i16/negate_zero.leo.out | 373 ++ .../compiler/integers/i16/sub.leo.out | 303 ++ .../compiler/integers/i16/ternary.leo.out | 409 ++ .../compiler/integers/i32/add.leo.out | 303 ++ .../integers/i32/console_assert.leo.out | 233 + .../compiler/integers/i32/div.leo.out | 303 ++ .../compiler/compiler/integers/i32/eq.leo.out | 300 + .../compiler/compiler/integers/i32/ge.leo.out | 300 + .../compiler/compiler/integers/i32/gt.leo.out | 300 + .../compiler/compiler/integers/i32/le.leo.out | 300 + .../compiler/compiler/integers/i32/lt.leo.out | 300 + .../compiler/integers/i32/max.leo.out | 304 ++ .../compiler/integers/i32/min.leo.out | 304 ++ .../compiler/integers/i32/mul.leo.out | 303 ++ .../compiler/compiler/integers/i32/ne.leo.out | 300 + .../compiler/integers/i32/negate.leo.out | 258 + .../compiler/integers/i32/negate_min.leo.out | 443 ++ .../compiler/integers/i32/negate_zero.leo.out | 373 ++ .../compiler/integers/i32/sub.leo.out | 303 ++ .../compiler/integers/i32/ternary.leo.out | 409 ++ .../compiler/integers/i64/add.leo.out | 303 ++ .../integers/i64/console_assert.leo.out | 233 + .../compiler/integers/i64/div.leo.out | 303 ++ .../compiler/compiler/integers/i64/eq.leo.out | 300 + .../compiler/compiler/integers/i64/ge.leo.out | 300 + .../compiler/compiler/integers/i64/gt.leo.out | 300 + .../compiler/compiler/integers/i64/le.leo.out | 300 + .../compiler/compiler/integers/i64/lt.leo.out | 300 + .../compiler/integers/i64/max.leo.out | 304 ++ .../compiler/integers/i64/min.leo.out | 304 ++ .../compiler/integers/i64/mul.leo.out | 303 ++ .../compiler/compiler/integers/i64/ne.leo.out | 300 + .../compiler/integers/i64/negate.leo.out | 258 + .../compiler/integers/i64/negate_min.leo.out | 443 ++ .../compiler/integers/i64/negate_zero.leo.out | 373 ++ .../compiler/integers/i64/sub.leo.out | 303 ++ .../compiler/integers/i64/ternary.leo.out | 409 ++ .../compiler/compiler/integers/i8/add.leo.out | 303 ++ .../integers/i8/console_assert.leo.out | 233 + .../compiler/compiler/integers/i8/div.leo.out | 303 ++ .../compiler/compiler/integers/i8/eq.leo.out | 300 + .../compiler/compiler/integers/i8/ge.leo.out | 300 + .../compiler/compiler/integers/i8/gt.leo.out | 300 + .../compiler/compiler/integers/i8/le.leo.out | 300 + .../compiler/compiler/integers/i8/lt.leo.out | 300 + .../compiler/compiler/integers/i8/max.leo.out | 304 ++ .../compiler/compiler/integers/i8/min.leo.out | 304 ++ .../compiler/compiler/integers/i8/mul.leo.out | 303 ++ .../compiler/compiler/integers/i8/ne.leo.out | 300 + .../compiler/integers/i8/negate.leo.out | 258 + .../compiler/integers/i8/negate_zero.leo.out | 373 ++ .../compiler/compiler/integers/i8/sub.leo.out | 303 ++ .../compiler/integers/i8/ternary.leo.out | 409 ++ .../compiler/integers/u128/add.leo.out | 303 ++ .../integers/u128/console_assert.leo.out | 297 + .../compiler/integers/u128/div.leo.out | 303 ++ .../compiler/integers/u128/eq.leo.out | 300 + .../compiler/integers/u128/ge.leo.out | 300 + .../compiler/integers/u128/gt.leo.out | 305 ++ .../compiler/integers/u128/input.leo.out | 228 + .../compiler/integers/u128/le.leo.out | 300 + .../compiler/integers/u128/lt.leo.out | 300 + .../compiler/integers/u128/max.leo.out | 304 ++ .../compiler/integers/u128/min.leo.out | 304 ++ .../compiler/integers/u128/mul.leo.out | 303 ++ .../compiler/integers/u128/ne.leo.out | 300 + .../compiler/integers/u128/sub.leo.out | 303 ++ .../compiler/integers/u128/ternary.leo.out | 409 ++ .../compiler/integers/u16/add.leo.out | 303 ++ .../integers/u16/console_assert.leo.out | 297 + .../compiler/integers/u16/div.leo.out | 303 ++ .../compiler/compiler/integers/u16/eq.leo.out | 300 + .../compiler/compiler/integers/u16/ge.leo.out | 300 + .../compiler/compiler/integers/u16/gt.leo.out | 305 ++ .../compiler/integers/u16/input.leo.out | 228 + .../compiler/compiler/integers/u16/le.leo.out | 300 + .../compiler/compiler/integers/u16/lt.leo.out | 300 + .../compiler/integers/u16/max.leo.out | 304 ++ .../compiler/integers/u16/min.leo.out | 304 ++ .../compiler/integers/u16/mul.leo.out | 303 ++ .../compiler/compiler/integers/u16/ne.leo.out | 300 + .../compiler/integers/u16/sub.leo.out | 303 ++ .../compiler/integers/u16/ternary.leo.out | 409 ++ .../compiler/integers/u32/add.leo.out | 303 ++ .../integers/u32/console_assert.leo.out | 297 + .../compiler/integers/u32/div.leo.out | 303 ++ .../compiler/compiler/integers/u32/eq.leo.out | 300 + .../compiler/compiler/integers/u32/ge.leo.out | 300 + .../compiler/compiler/integers/u32/gt.leo.out | 305 ++ .../compiler/integers/u32/input.leo.out | 228 + .../compiler/compiler/integers/u32/le.leo.out | 300 + .../compiler/compiler/integers/u32/lt.leo.out | 300 + .../compiler/integers/u32/max.leo.out | 304 ++ .../compiler/integers/u32/min.leo.out | 304 ++ .../compiler/integers/u32/mul.leo.out | 303 ++ .../compiler/compiler/integers/u32/ne.leo.out | 300 + .../compiler/integers/u32/sub.leo.out | 303 ++ .../compiler/integers/u32/ternary.leo.out | 409 ++ .../compiler/integers/u64/add.leo.out | 303 ++ .../integers/u64/console_assert.leo.out | 297 + .../compiler/integers/u64/div.leo.out | 303 ++ .../compiler/compiler/integers/u64/eq.leo.out | 300 + .../compiler/compiler/integers/u64/ge.leo.out | 300 + .../compiler/compiler/integers/u64/gt.leo.out | 305 ++ .../compiler/integers/u64/input.leo.out | 228 + .../compiler/compiler/integers/u64/le.leo.out | 300 + .../compiler/compiler/integers/u64/lt.leo.out | 300 + .../compiler/integers/u64/max.leo.out | 304 ++ .../compiler/integers/u64/min.leo.out | 304 ++ .../compiler/integers/u64/mul.leo.out | 303 ++ .../compiler/compiler/integers/u64/ne.leo.out | 300 + .../compiler/integers/u64/sub.leo.out | 303 ++ .../compiler/integers/u64/ternary.leo.out | 409 ++ .../compiler/compiler/integers/u8/add.leo.out | 303 ++ .../integers/u8/console_assert.leo.out | 297 + .../compiler/compiler/integers/u8/div.leo.out | 303 ++ .../compiler/compiler/integers/u8/eq.leo.out | 300 + .../compiler/compiler/integers/u8/ge.leo.out | 300 + .../compiler/compiler/integers/u8/gt.leo.out | 305 ++ .../compiler/integers/u8/input.leo.out | 228 + .../compiler/compiler/integers/u8/le.leo.out | 300 + .../compiler/compiler/integers/u8/lt.leo.out | 300 + .../compiler/compiler/integers/u8/max.leo.out | 304 ++ .../compiler/compiler/integers/u8/min.leo.out | 304 ++ .../compiler/compiler/integers/u8/mul.leo.out | 303 ++ .../compiler/compiler/integers/u8/ne.leo.out | 300 + .../compiler/compiler/integers/u8/sub.leo.out | 303 ++ .../compiler/integers/u8/ternary.leo.out | 409 ++ .../compiler/mutability/array_dyn_mut.leo.out | 698 +++ .../mutability/array_dyn_mut_indirect.leo.out | 769 +++ .../compiler/mutability/array_mut.leo.out | 552 ++ .../mutability/array_splice_mut.leo.out | 1089 ++++ .../mutability/array_tuple_mut.leo.out | 926 ++++ .../mutability/circuit_function_mut.leo.out | 674 +++ .../mutability/circuit_variable_mut.leo.out | 516 ++ .../compiler/mutability/cond_mut.leo.out | 631 +++ .../mutability/function_input_mut.leo.out | 297 + .../compiler/mutability/let_mut.leo.out | 431 ++ .../mutability/let_mut_nested.leo.out | 538 ++ .../compiler/compiler/mutability/swap.leo.out | 1314 +++++ .../compiler/statements/block.leo.out | 422 ++ .../compiler/statements/chain.leo.out | 816 +++ .../compiler/statements/for_loop.leo.out | 826 +++ .../statements/iteration_basic.leo.out | 509 ++ .../statements/iteration_variable.leo.out | 578 ++ .../statements/multiple_returns.leo.out | 379 ++ .../compiler/statements/mutate.leo.out | 871 +++ .../compiler/statements/nested_mutate.leo.out | 819 +++ .../compiler/compiler/string/circuit.leo.out | 1783 ++++++ .../compiler/compiler/string/equality.leo.out | 2417 +++++++++ .../compiler/compiler/string/replace.leo.out | 685 +++ .../compiler/compiler/tuples/access.leo.out | 984 ++++ .../compiler/compiler/tuples/basic.leo.out | 411 ++ .../compiler/tuples/dependent.leo.out | 603 +++ .../compiler/tuples/destructured.leo.out | 564 ++ .../compiler/tuples/nested_access.leo.out | 593 ++ 301 files changed, 144385 insertions(+), 7 deletions(-) diff --git a/ast/src/lib.rs b/ast/src/lib.rs index 8a502a0122..0db6ff375c 100644 --- a/ast/src/lib.rs +++ b/ast/src/lib.rs @@ -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 { + let data = std::fs::read_to_string(path)?; + Self::from_json_string(&data) + } } impl AsRef for Ast { diff --git a/compiler/tests/test.rs b/compiler/tests/test.rs index d699321ad5..08bfbb5e34 100644 --- a/compiler/tests/test.rs +++ b/compiler/tests/test.rs @@ -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) -> 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 { - let mut compiler = new_compiler("compiler-test".into()); +pub(crate) fn parse_program( + program_string: &str, + theorem_options: Option, +) -> Result { + 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, + 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")) } diff --git a/tests/expectations/compiler/compiler/address/equal.leo.out b/tests/expectations/compiler/compiler/address/equal.leo.out index 0afdf2f075..d9877a9e54 100644 --- a/tests/expectations/compiler/compiler/address/equal.leo.out +++ b/tests/expectations/compiler/compiler/address/equal.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/address/ternary.leo.out b/tests/expectations/compiler/compiler/address/ternary.leo.out index 0f5714f99b..b686935393 100644 --- a/tests/expectations/compiler/compiler/address/ternary.leo.out +++ b/tests/expectations/compiler/compiler/address/ternary.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/array/complex_access.leo.out b/tests/expectations/compiler/compiler/array/complex_access.leo.out index 98d328c716..4fa16ee727 100644 --- a/tests/expectations/compiler/compiler/array/complex_access.leo.out +++ b/tests/expectations/compiler/compiler/array/complex_access.leo.out @@ -16,3 +16,4823 @@ outputs: out: type: bool value: "true" + initial_theorem: + name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Circ {\\\"}\"}": + circuit_name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Circ {\\\"}\"}" + 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 + global_consts: {} + functions: + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: U8 + - - value: "8" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 17 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 7 + line_stop: 7 + col_start: 28 + col_stop: 29 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":36,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Array: + - IntegerType: U8 + - - value: "3" + - - value: "3" + span: + line_start: 7 + line_stop: 7 + col_start: 36 + col_stop: 37 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" + - Variable: + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":53,\\\"col_stop\\\":54,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Tuple: + - IntegerType: U8 + - IntegerType: U32 + - - value: "1" + span: + line_start: 7 + line_stop: 7 + col_start: 53 + col_stop: 54 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" + - Variable: + identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":72,\\\"col_stop\\\":73,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: U8 + - - value: "3" + - value: "4" + span: + line_start: 7 + line_stop: 7 + col_start: 72 + col_stop: 73 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" + output: Boolean + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..3][b] = 93;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "0" + - line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[0..3][b] = 93;" + - Value: + Implicit: + - "3" + - line_start: 8 + line_stop: 8 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[0..3][b] = 93;" + - ArrayIndex: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..3][b] = 93;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 3 + col_stop: 13 + path: compiler-test + content: " a[0..3][b] = 93;" + value: + Value: + Implicit: + - "93" + - line_start: 8 + line_stop: 8 + col_start: 16 + col_stop: 18 + path: compiler-test + content: " a[0..3][b] = 93;" + span: + line_start: 8 + line_stop: 8 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " a[0..3][b] = 93;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] = 87;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "2" + - line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[2..6][1] = 87;" + - Value: + Implicit: + - "6" + - line_start: 9 + line_stop: 9 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[2..6][1] = 87;" + - ArrayIndex: + Value: + Implicit: + - "1" + - line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[2..6][1] = 87;" + span: + line_start: 9 + line_stop: 9 + col_start: 3 + col_stop: 13 + path: compiler-test + content: " a[2..6][1] = 87;" + value: + Value: + Implicit: + - "87" + - line_start: 9 + line_stop: 9 + col_start: 16 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] = 87;" + span: + line_start: 9 + line_stop: 9 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] = 87;" + - Assign: + operation: Mul + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] *= 2;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "2" + - line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[2..6][1] *= 2;" + - Value: + Implicit: + - "6" + - line_start: 10 + line_stop: 10 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[2..6][1] *= 2;" + - ArrayIndex: + Value: + Implicit: + - "1" + - line_start: 10 + line_stop: 10 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[2..6][1] *= 2;" + span: + line_start: 10 + line_stop: 10 + col_start: 3 + col_stop: 13 + path: compiler-test + content: " a[2..6][1] *= 2;" + value: + Value: + Implicit: + - "2" + - line_start: 10 + line_stop: 10 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] *= 2;" + span: + line_start: 10 + line_stop: 10 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] *= 2;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..3] = [42u8];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "2" + - line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[2..3] = [42u8];" + - Value: + Implicit: + - "3" + - line_start: 11 + line_stop: 11 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[2..3] = [42u8];" + span: + line_start: 11 + line_stop: 11 + col_start: 3 + col_stop: 10 + path: compiler-test + content: " a[2..3] = [42u8];" + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "42" + - line_start: 11 + line_stop: 11 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " a[2..3] = [42u8];" + span: + line_start: 11 + line_stop: 11 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " a[2..3] = [42u8];" + span: + line_start: 11 + line_stop: 11 + col_start: 3 + col_stop: 19 + path: compiler-test + content: " a[2..3] = [42u8];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[6..][0] = 43u8;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "6" + - line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[6..][0] = 43u8;" + - ~ + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 12 + line_stop: 12 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " a[6..][0] = 43u8;" + span: + line_start: 12 + line_stop: 12 + col_start: 3 + col_stop: 12 + path: compiler-test + content: " a[6..][0] = 43u8;" + value: + Value: + Integer: + - U8 + - "43" + - line_start: 12 + line_stop: 12 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " a[6..][0] = 43u8;" + span: + line_start: 12 + line_stop: 12 + col_start: 3 + col_stop: 19 + path: compiler-test + content: " a[6..][0] = 43u8;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..1][0..1] = [200];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "0" + - line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[0..1][0..1] = [200];" + - Value: + Implicit: + - "1" + - line_start: 13 + line_stop: 13 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[0..1][0..1] = [200];" + - ArrayRange: + - Value: + Implicit: + - "0" + - line_start: 13 + line_stop: 13 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[0..1][0..1] = [200];" + - Value: + Implicit: + - "1" + - line_start: 13 + line_stop: 13 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " a[0..1][0..1] = [200];" + span: + line_start: 13 + line_stop: 13 + col_start: 3 + col_stop: 16 + path: compiler-test + content: " a[0..1][0..1] = [200];" + value: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "200" + - line_start: 13 + line_stop: 13 + col_start: 20 + col_stop: 23 + path: compiler-test + content: " a[0..1][0..1] = [200];" + span: + line_start: 13 + line_stop: 13 + col_start: 19 + col_stop: 24 + path: compiler-test + content: " a[0..1][0..1] = [200];" + span: + line_start: 13 + line_stop: 13 + col_start: 3 + col_stop: 24 + path: compiler-test + content: " a[0..1][0..1] = [200];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[0..2][0] = [1u8; 3];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "0" + - line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + - Value: + Implicit: + - "2" + - line_start: 15 + line_stop: 15 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 15 + line_stop: 15 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + span: + line_start: 15 + line_stop: 15 + col_start: 3 + col_stop: 13 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + value: + ArrayInit: + element: + Value: + Integer: + - U8 + - "1" + - line_start: 15 + line_stop: 15 + col_start: 17 + col_stop: 20 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + dimensions: + - value: "3" + span: + line_start: 15 + line_stop: 15 + col_start: 16 + col_stop: 24 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + span: + line_start: 15 + line_stop: 15 + col_start: 3 + col_stop: 24 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[1..][1][1..2][0] = 126;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "1" + - line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + - ~ + - ArrayIndex: + Value: + Implicit: + - "1" + - line_start: 16 + line_stop: 16 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + - ArrayRange: + - Value: + Implicit: + - "1" + - line_start: 16 + line_stop: 16 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + - Value: + Implicit: + - "2" + - line_start: 16 + line_stop: 16 + col_start: 16 + col_stop: 17 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 16 + line_stop: 16 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + span: + line_start: 16 + line_stop: 16 + col_start: 3 + col_stop: 21 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + value: + Value: + Implicit: + - "126" + - line_start: 16 + line_stop: 16 + col_start: 24 + col_stop: 27 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + span: + line_start: 16 + line_stop: 16 + col_start: 3 + col_stop: 27 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[1..][0] = [42, 43, 44];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "1" + - line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + - ~ + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 17 + line_stop: 17 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + span: + line_start: 17 + line_stop: 17 + col_start: 3 + col_stop: 12 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + value: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "42" + - line_start: 17 + line_stop: 17 + col_start: 16 + col_stop: 18 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + - Expression: + Value: + Implicit: + - "43" + - line_start: 17 + line_stop: 17 + col_start: 20 + col_stop: 22 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + - Expression: + Value: + Implicit: + - "44" + - line_start: 17 + line_stop: 17 + col_start: 24 + col_stop: 26 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + span: + line_start: 17 + line_stop: 17 + col_start: 15 + col_stop: 27 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + span: + line_start: 17 + line_stop: 17 + col_start: 3 + col_stop: 27 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + - Assign: + operation: Add + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + accesses: + - ArrayRange: + - CircuitMemberAccess: + circuit: + CircuitInit: + name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + members: + - identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + expression: + Value: + Implicit: + - "0" + - line_start: 18 + line_stop: 18 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 16 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + name: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + - Value: + Implicit: + - "1" + - line_start: 18 + line_stop: 18 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 18 + line_stop: 18 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 18 + line_stop: 18 + col_start: 26 + col_stop: 27 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 3 + col_stop: 28 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + value: + Value: + Implicit: + - "2" + - line_start: 18 + line_stop: 18 + col_start: 32 + col_stop: 33 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 3 + col_stop: 33 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d[..1][0].1 = 1;\\\"}\"}" + accesses: + - ArrayRange: + - ~ + - Value: + Implicit: + - "1" + - line_start: 20 + line_stop: 20 + col_start: 7 + col_stop: 8 + path: compiler-test + content: " d[..1][0].1 = 1;" + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 20 + line_stop: 20 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " d[..1][0].1 = 1;" + - Tuple: + - value: "1" + - line_start: 20 + line_stop: 20 + col_start: 3 + col_stop: 14 + path: compiler-test + content: " d[..1][0].1 = 1;" + span: + line_start: 20 + line_stop: 20 + col_start: 3 + col_stop: 14 + path: compiler-test + content: " d[..1][0].1 = 1;" + value: + Value: + Implicit: + - "1" + - line_start: 20 + line_stop: 20 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " d[..1][0].1 = 1;" + span: + line_start: 20 + line_stop: 20 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " d[..1][0].1 = 1;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" e[0..][0] = [22; 4];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "0" + - line_start: 22 + line_stop: 22 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " e[0..][0] = [22; 4];" + - ~ + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 22 + line_stop: 22 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " e[0..][0] = [22; 4];" + span: + line_start: 22 + line_stop: 22 + col_start: 3 + col_stop: 12 + path: compiler-test + content: " e[0..][0] = [22; 4];" + value: + ArrayInit: + element: + Value: + Implicit: + - "22" + - line_start: 22 + line_stop: 22 + col_start: 16 + col_stop: 18 + path: compiler-test + content: " e[0..][0] = [22; 4];" + dimensions: + - value: "4" + span: + line_start: 22 + line_stop: 22 + col_start: 15 + col_stop: 22 + path: compiler-test + content: " e[0..][0] = [22; 4];" + span: + line_start: 22 + line_stop: 22 + col_start: 3 + col_stop: 22 + path: compiler-test + content: " e[0..][0] = [22; 4];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" e[0..][0][0] = 33;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "0" + - line_start: 23 + line_stop: 23 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " e[0..][0][0] = 33;" + - ~ + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 23 + line_stop: 23 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " e[0..][0][0] = 33;" + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 23 + line_stop: 23 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " e[0..][0][0] = 33;" + span: + line_start: 23 + line_stop: 23 + col_start: 3 + col_stop: 15 + path: compiler-test + content: " e[0..][0][0] = 33;" + value: + Value: + Implicit: + - "33" + - line_start: 23 + line_stop: 23 + col_start: 18 + col_stop: 20 + path: compiler-test + content: " e[0..][0][0] = 33;" + span: + line_start: 23 + line_stop: 23 + col_start: 3 + col_stop: 20 + path: compiler-test + content: " e[0..][0][0] = 33;" + - Return: + expression: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a == [200u8, 93, 42, 174, 5, 6, 43, 8]\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "200" + - line_start: 26 + line_stop: 26 + col_start: 11 + col_stop: 16 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Implicit: + - "93" + - line_start: 26 + line_stop: 26 + col_start: 18 + col_stop: 20 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Implicit: + - "42" + - line_start: 26 + line_stop: 26 + col_start: 22 + col_stop: 24 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Implicit: + - "174" + - line_start: 26 + line_stop: 26 + col_start: 26 + col_stop: 29 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Implicit: + - "5" + - line_start: 26 + line_stop: 26 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Implicit: + - "6" + - line_start: 26 + line_stop: 26 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Implicit: + - "43" + - line_start: 26 + line_stop: 26 + col_start: 37 + col_stop: 39 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Implicit: + - "8" + - line_start: 26 + line_stop: 26 + col_start: 41 + col_stop: 42 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + span: + line_start: 26 + line_stop: 26 + col_start: 10 + col_stop: 43 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + op: Eq + span: + line_start: 26 + line_stop: 26 + col_start: 5 + col_stop: 43 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + right: + Binary: + left: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "3" + - line_start: 27 + line_stop: 27 + col_start: 15 + col_stop: 18 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Implicit: + - "1" + - line_start: 27 + line_stop: 27 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Implicit: + - "1" + - line_start: 27 + line_stop: 27 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + span: + line_start: 27 + line_stop: 27 + col_start: 14 + col_stop: 25 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "42" + - line_start: 27 + line_stop: 27 + col_start: 28 + col_stop: 30 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Implicit: + - "43" + - line_start: 27 + line_stop: 27 + col_start: 32 + col_stop: 34 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Implicit: + - "44" + - line_start: 27 + line_stop: 27 + col_start: 36 + col_stop: 38 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + span: + line_start: 27 + line_stop: 27 + col_start: 27 + col_stop: 39 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "7" + - line_start: 27 + line_stop: 27 + col_start: 42 + col_stop: 43 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Implicit: + - "126" + - line_start: 27 + line_stop: 27 + col_start: 45 + col_stop: 48 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Implicit: + - "9" + - line_start: 27 + line_stop: 27 + col_start: 50 + col_stop: 51 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + span: + line_start: 27 + line_stop: 27 + col_start: 41 + col_stop: 52 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + span: + line_start: 27 + line_stop: 27 + col_start: 13 + col_stop: 53 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + op: Eq + span: + line_start: 27 + line_stop: 27 + col_start: 8 + col_stop: 53 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + op: And + span: + line_start: 26 + line_stop: 27 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + right: + Binary: + left: + Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && d == [(0u8, 1u32)]\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + TupleInit: + elements: + - Value: + Integer: + - U8 + - "0" + - line_start: 28 + line_stop: 28 + col_start: 15 + col_stop: 18 + path: compiler-test + content: " && d == [(0u8, 1u32)]" + - Value: + Integer: + - U32 + - "1" + - line_start: 28 + line_stop: 28 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " && d == [(0u8, 1u32)]" + span: + line_start: 28 + line_stop: 28 + col_start: 14 + col_stop: 25 + path: compiler-test + content: " && d == [(0u8, 1u32)]" + span: + line_start: 28 + line_stop: 28 + col_start: 13 + col_stop: 26 + path: compiler-test + content: " && d == [(0u8, 1u32)]" + op: Eq + span: + line_start: 28 + line_stop: 28 + col_start: 8 + col_stop: 26 + path: compiler-test + content: " && d == [(0u8, 1u32)]" + op: And + span: + line_start: 26 + line_stop: 28 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]" + right: + Binary: + left: + Identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "33" + - line_start: 29 + line_stop: 29 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "22" + - line_start: 29 + line_stop: 29 + col_start: 21 + col_stop: 23 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "22" + - line_start: 29 + line_stop: 29 + col_start: 25 + col_stop: 27 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "22" + - line_start: 29 + line_stop: 29 + col_start: 29 + col_stop: 31 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 29 + line_stop: 29 + col_start: 14 + col_stop: 32 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 35 + col_stop: 36 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 38 + col_stop: 39 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 41 + col_stop: 42 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 44 + col_stop: 45 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 29 + line_stop: 29 + col_start: 34 + col_stop: 46 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 49 + col_stop: 50 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 52 + col_stop: 53 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 55 + col_stop: 56 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 58 + col_stop: 59 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 29 + line_stop: 29 + col_start: 48 + col_stop: 60 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 29 + line_stop: 29 + col_start: 13 + col_stop: 61 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + op: Eq + span: + line_start: 29 + line_stop: 29 + col_start: 8 + col_stop: 61 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + op: And + span: + line_start: 26 + line_stop: 29 + col_start: 5 + col_stop: 61 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]\n && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 25 + line_stop: 29 + col_start: 3 + col_stop: 61 + path: compiler-test + content: " return\n a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]\n && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 7 + line_stop: 30 + col_start: 98 + col_stop: 2 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\n...\n}" + span: + line_start: 7 + line_stop: 30 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + canonicalized_theorem: + name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Circ {\\\"}\"}": + circuit_name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Circ {\\\"}\"}" + 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 + global_consts: {} + functions: + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: U8 + - - value: "8" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 17 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 7 + line_stop: 7 + col_start: 28 + col_stop: 29 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":36,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Array: + - IntegerType: U8 + - - value: "3" + - - value: "3" + span: + line_start: 7 + line_stop: 7 + col_start: 36 + col_stop: 37 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" + - Variable: + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":53,\\\"col_stop\\\":54,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Tuple: + - IntegerType: U8 + - IntegerType: U32 + - - value: "1" + span: + line_start: 7 + line_stop: 7 + col_start: 53 + col_stop: 54 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" + - Variable: + identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":72,\\\"col_stop\\\":73,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Array: + - IntegerType: U8 + - - value: "4" + - - value: "3" + span: + line_start: 7 + line_stop: 7 + col_start: 72 + col_stop: 73 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" + output: Boolean + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..3][b] = 93;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "0" + - line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[0..3][b] = 93;" + - Value: + Implicit: + - "3" + - line_start: 8 + line_stop: 8 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[0..3][b] = 93;" + - ArrayIndex: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..3][b] = 93;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 3 + col_stop: 13 + path: compiler-test + content: " a[0..3][b] = 93;" + value: + Value: + Implicit: + - "93" + - line_start: 8 + line_stop: 8 + col_start: 16 + col_stop: 18 + path: compiler-test + content: " a[0..3][b] = 93;" + span: + line_start: 8 + line_stop: 8 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " a[0..3][b] = 93;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] = 87;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "2" + - line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[2..6][1] = 87;" + - Value: + Implicit: + - "6" + - line_start: 9 + line_stop: 9 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[2..6][1] = 87;" + - ArrayIndex: + Value: + Implicit: + - "1" + - line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[2..6][1] = 87;" + span: + line_start: 9 + line_stop: 9 + col_start: 3 + col_stop: 13 + path: compiler-test + content: " a[2..6][1] = 87;" + value: + Value: + Implicit: + - "87" + - line_start: 9 + line_stop: 9 + col_start: 16 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] = 87;" + span: + line_start: 9 + line_stop: 9 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] = 87;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] *= 2;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "2" + - line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[2..6][1] *= 2;" + - Value: + Implicit: + - "6" + - line_start: 10 + line_stop: 10 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[2..6][1] *= 2;" + - ArrayIndex: + Value: + Implicit: + - "1" + - line_start: 10 + line_stop: 10 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[2..6][1] *= 2;" + span: + line_start: 10 + line_stop: 10 + col_start: 3 + col_stop: 13 + path: compiler-test + content: " a[2..6][1] *= 2;" + value: + Binary: + left: + ArrayAccess: + array: + ArrayRangeAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] *= 2;\\\"}\"}" + left: + Value: + Implicit: + - "2" + - line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[2..6][1] *= 2;" + right: + Value: + Implicit: + - "6" + - line_start: 10 + line_stop: 10 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[2..6][1] *= 2;" + span: + line_start: 10 + line_stop: 10 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] *= 2;" + index: + Value: + Implicit: + - "1" + - line_start: 10 + line_stop: 10 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[2..6][1] *= 2;" + span: + line_start: 10 + line_stop: 10 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] *= 2;" + right: + Value: + Implicit: + - "2" + - line_start: 10 + line_stop: 10 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] *= 2;" + op: Mul + span: + line_start: 10 + line_stop: 10 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] *= 2;" + span: + line_start: 10 + line_stop: 10 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] *= 2;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..3] = [42u8];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "2" + - line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[2..3] = [42u8];" + - Value: + Implicit: + - "3" + - line_start: 11 + line_stop: 11 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[2..3] = [42u8];" + span: + line_start: 11 + line_stop: 11 + col_start: 3 + col_stop: 10 + path: compiler-test + content: " a[2..3] = [42u8];" + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "42" + - line_start: 11 + line_stop: 11 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " a[2..3] = [42u8];" + span: + line_start: 11 + line_stop: 11 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " a[2..3] = [42u8];" + span: + line_start: 11 + line_stop: 11 + col_start: 3 + col_stop: 19 + path: compiler-test + content: " a[2..3] = [42u8];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[6..][0] = 43u8;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "6" + - line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[6..][0] = 43u8;" + - ~ + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 12 + line_stop: 12 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " a[6..][0] = 43u8;" + span: + line_start: 12 + line_stop: 12 + col_start: 3 + col_stop: 12 + path: compiler-test + content: " a[6..][0] = 43u8;" + value: + Value: + Integer: + - U8 + - "43" + - line_start: 12 + line_stop: 12 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " a[6..][0] = 43u8;" + span: + line_start: 12 + line_stop: 12 + col_start: 3 + col_stop: 19 + path: compiler-test + content: " a[6..][0] = 43u8;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..1][0..1] = [200];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "0" + - line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[0..1][0..1] = [200];" + - Value: + Implicit: + - "1" + - line_start: 13 + line_stop: 13 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[0..1][0..1] = [200];" + - ArrayRange: + - Value: + Implicit: + - "0" + - line_start: 13 + line_stop: 13 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[0..1][0..1] = [200];" + - Value: + Implicit: + - "1" + - line_start: 13 + line_stop: 13 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " a[0..1][0..1] = [200];" + span: + line_start: 13 + line_stop: 13 + col_start: 3 + col_stop: 16 + path: compiler-test + content: " a[0..1][0..1] = [200];" + value: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "200" + - line_start: 13 + line_stop: 13 + col_start: 20 + col_stop: 23 + path: compiler-test + content: " a[0..1][0..1] = [200];" + span: + line_start: 13 + line_stop: 13 + col_start: 19 + col_stop: 24 + path: compiler-test + content: " a[0..1][0..1] = [200];" + span: + line_start: 13 + line_stop: 13 + col_start: 3 + col_stop: 24 + path: compiler-test + content: " a[0..1][0..1] = [200];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[0..2][0] = [1u8; 3];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "0" + - line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + - Value: + Implicit: + - "2" + - line_start: 15 + line_stop: 15 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 15 + line_stop: 15 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + span: + line_start: 15 + line_stop: 15 + col_start: 3 + col_stop: 13 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + value: + ArrayInit: + element: + Value: + Integer: + - U8 + - "1" + - line_start: 15 + line_stop: 15 + col_start: 17 + col_stop: 20 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + dimensions: + - value: "3" + span: + line_start: 15 + line_stop: 15 + col_start: 16 + col_stop: 24 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + span: + line_start: 15 + line_stop: 15 + col_start: 3 + col_stop: 24 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[1..][1][1..2][0] = 126;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "1" + - line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + - ~ + - ArrayIndex: + Value: + Implicit: + - "1" + - line_start: 16 + line_stop: 16 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + - ArrayRange: + - Value: + Implicit: + - "1" + - line_start: 16 + line_stop: 16 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + - Value: + Implicit: + - "2" + - line_start: 16 + line_stop: 16 + col_start: 16 + col_stop: 17 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 16 + line_stop: 16 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + span: + line_start: 16 + line_stop: 16 + col_start: 3 + col_stop: 21 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + value: + Value: + Implicit: + - "126" + - line_start: 16 + line_stop: 16 + col_start: 24 + col_stop: 27 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + span: + line_start: 16 + line_stop: 16 + col_start: 3 + col_stop: 27 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[1..][0] = [42, 43, 44];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "1" + - line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + - ~ + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 17 + line_stop: 17 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + span: + line_start: 17 + line_stop: 17 + col_start: 3 + col_stop: 12 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + value: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "42" + - line_start: 17 + line_stop: 17 + col_start: 16 + col_stop: 18 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + - Expression: + Value: + Implicit: + - "43" + - line_start: 17 + line_stop: 17 + col_start: 20 + col_stop: 22 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + - Expression: + Value: + Implicit: + - "44" + - line_start: 17 + line_stop: 17 + col_start: 24 + col_stop: 26 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + span: + line_start: 17 + line_stop: 17 + col_start: 15 + col_stop: 27 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + span: + line_start: 17 + line_stop: 17 + col_start: 3 + col_stop: 27 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + accesses: + - ArrayRange: + - CircuitMemberAccess: + circuit: + CircuitInit: + name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + members: + - identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + expression: + Value: + Implicit: + - "0" + - line_start: 18 + line_stop: 18 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 16 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + name: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + - Value: + Implicit: + - "1" + - line_start: 18 + line_stop: 18 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 18 + line_stop: 18 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 18 + line_stop: 18 + col_start: 26 + col_stop: 27 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 3 + col_stop: 28 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + value: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayRangeAccess: + array: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + left: + CircuitMemberAccess: + circuit: + CircuitInit: + name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + members: + - identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + expression: + Value: + Implicit: + - "0" + - line_start: 18 + line_stop: 18 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 16 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + name: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + right: + Value: + Implicit: + - "1" + - line_start: 18 + line_stop: 18 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 3 + col_stop: 33 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + index: + Value: + Implicit: + - "0" + - line_start: 18 + line_stop: 18 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 3 + col_stop: 33 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + index: + Value: + Implicit: + - "0" + - line_start: 18 + line_stop: 18 + col_start: 26 + col_stop: 27 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 3 + col_stop: 33 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + right: + Value: + Implicit: + - "2" + - line_start: 18 + line_stop: 18 + col_start: 32 + col_stop: 33 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + op: Add + span: + line_start: 18 + line_stop: 18 + col_start: 3 + col_stop: 33 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 3 + col_stop: 33 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d[..1][0].1 = 1;\\\"}\"}" + accesses: + - ArrayRange: + - ~ + - Value: + Implicit: + - "1" + - line_start: 20 + line_stop: 20 + col_start: 7 + col_stop: 8 + path: compiler-test + content: " d[..1][0].1 = 1;" + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 20 + line_stop: 20 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " d[..1][0].1 = 1;" + - Tuple: + - value: "1" + - line_start: 20 + line_stop: 20 + col_start: 3 + col_stop: 14 + path: compiler-test + content: " d[..1][0].1 = 1;" + span: + line_start: 20 + line_stop: 20 + col_start: 3 + col_stop: 14 + path: compiler-test + content: " d[..1][0].1 = 1;" + value: + Value: + Implicit: + - "1" + - line_start: 20 + line_stop: 20 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " d[..1][0].1 = 1;" + span: + line_start: 20 + line_stop: 20 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " d[..1][0].1 = 1;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" e[0..][0] = [22; 4];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "0" + - line_start: 22 + line_stop: 22 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " e[0..][0] = [22; 4];" + - ~ + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 22 + line_stop: 22 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " e[0..][0] = [22; 4];" + span: + line_start: 22 + line_stop: 22 + col_start: 3 + col_stop: 12 + path: compiler-test + content: " e[0..][0] = [22; 4];" + value: + ArrayInit: + element: + Value: + Implicit: + - "22" + - line_start: 22 + line_stop: 22 + col_start: 16 + col_stop: 18 + path: compiler-test + content: " e[0..][0] = [22; 4];" + dimensions: + - value: "4" + span: + line_start: 22 + line_stop: 22 + col_start: 15 + col_stop: 22 + path: compiler-test + content: " e[0..][0] = [22; 4];" + span: + line_start: 22 + line_stop: 22 + col_start: 3 + col_stop: 22 + path: compiler-test + content: " e[0..][0] = [22; 4];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" e[0..][0][0] = 33;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "0" + - line_start: 23 + line_stop: 23 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " e[0..][0][0] = 33;" + - ~ + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 23 + line_stop: 23 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " e[0..][0][0] = 33;" + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 23 + line_stop: 23 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " e[0..][0][0] = 33;" + span: + line_start: 23 + line_stop: 23 + col_start: 3 + col_stop: 15 + path: compiler-test + content: " e[0..][0][0] = 33;" + value: + Value: + Implicit: + - "33" + - line_start: 23 + line_stop: 23 + col_start: 18 + col_stop: 20 + path: compiler-test + content: " e[0..][0][0] = 33;" + span: + line_start: 23 + line_stop: 23 + col_start: 3 + col_stop: 20 + path: compiler-test + content: " e[0..][0][0] = 33;" + - Return: + expression: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a == [200u8, 93, 42, 174, 5, 6, 43, 8]\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "200" + - line_start: 26 + line_stop: 26 + col_start: 11 + col_stop: 16 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Implicit: + - "93" + - line_start: 26 + line_stop: 26 + col_start: 18 + col_stop: 20 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Implicit: + - "42" + - line_start: 26 + line_stop: 26 + col_start: 22 + col_stop: 24 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Implicit: + - "174" + - line_start: 26 + line_stop: 26 + col_start: 26 + col_stop: 29 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Implicit: + - "5" + - line_start: 26 + line_stop: 26 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Implicit: + - "6" + - line_start: 26 + line_stop: 26 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Implicit: + - "43" + - line_start: 26 + line_stop: 26 + col_start: 37 + col_stop: 39 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Implicit: + - "8" + - line_start: 26 + line_stop: 26 + col_start: 41 + col_stop: 42 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + span: + line_start: 26 + line_stop: 26 + col_start: 10 + col_stop: 43 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + op: Eq + span: + line_start: 26 + line_stop: 26 + col_start: 5 + col_stop: 43 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + right: + Binary: + left: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "3" + - line_start: 27 + line_stop: 27 + col_start: 15 + col_stop: 18 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Implicit: + - "1" + - line_start: 27 + line_stop: 27 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Implicit: + - "1" + - line_start: 27 + line_stop: 27 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + span: + line_start: 27 + line_stop: 27 + col_start: 14 + col_stop: 25 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "42" + - line_start: 27 + line_stop: 27 + col_start: 28 + col_stop: 30 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Implicit: + - "43" + - line_start: 27 + line_stop: 27 + col_start: 32 + col_stop: 34 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Implicit: + - "44" + - line_start: 27 + line_stop: 27 + col_start: 36 + col_stop: 38 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + span: + line_start: 27 + line_stop: 27 + col_start: 27 + col_stop: 39 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "7" + - line_start: 27 + line_stop: 27 + col_start: 42 + col_stop: 43 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Implicit: + - "126" + - line_start: 27 + line_stop: 27 + col_start: 45 + col_stop: 48 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Implicit: + - "9" + - line_start: 27 + line_stop: 27 + col_start: 50 + col_stop: 51 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + span: + line_start: 27 + line_stop: 27 + col_start: 41 + col_stop: 52 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + span: + line_start: 27 + line_stop: 27 + col_start: 13 + col_stop: 53 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + op: Eq + span: + line_start: 27 + line_stop: 27 + col_start: 8 + col_stop: 53 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + op: And + span: + line_start: 26 + line_stop: 27 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + right: + Binary: + left: + Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && d == [(0u8, 1u32)]\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + TupleInit: + elements: + - Value: + Integer: + - U8 + - "0" + - line_start: 28 + line_stop: 28 + col_start: 15 + col_stop: 18 + path: compiler-test + content: " && d == [(0u8, 1u32)]" + - Value: + Integer: + - U32 + - "1" + - line_start: 28 + line_stop: 28 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " && d == [(0u8, 1u32)]" + span: + line_start: 28 + line_stop: 28 + col_start: 14 + col_stop: 25 + path: compiler-test + content: " && d == [(0u8, 1u32)]" + span: + line_start: 28 + line_stop: 28 + col_start: 13 + col_stop: 26 + path: compiler-test + content: " && d == [(0u8, 1u32)]" + op: Eq + span: + line_start: 28 + line_stop: 28 + col_start: 8 + col_stop: 26 + path: compiler-test + content: " && d == [(0u8, 1u32)]" + op: And + span: + line_start: 26 + line_stop: 28 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]" + right: + Binary: + left: + Identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "33" + - line_start: 29 + line_stop: 29 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "22" + - line_start: 29 + line_stop: 29 + col_start: 21 + col_stop: 23 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "22" + - line_start: 29 + line_stop: 29 + col_start: 25 + col_stop: 27 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "22" + - line_start: 29 + line_stop: 29 + col_start: 29 + col_stop: 31 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 29 + line_stop: 29 + col_start: 14 + col_stop: 32 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 35 + col_stop: 36 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 38 + col_stop: 39 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 41 + col_stop: 42 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 44 + col_stop: 45 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 29 + line_stop: 29 + col_start: 34 + col_stop: 46 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 49 + col_stop: 50 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 52 + col_stop: 53 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 55 + col_stop: 56 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Implicit: + - "0" + - line_start: 29 + line_stop: 29 + col_start: 58 + col_stop: 59 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 29 + line_stop: 29 + col_start: 48 + col_stop: 60 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 29 + line_stop: 29 + col_start: 13 + col_stop: 61 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + op: Eq + span: + line_start: 29 + line_stop: 29 + col_start: 8 + col_stop: 61 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + op: And + span: + line_start: 26 + line_stop: 29 + col_start: 5 + col_stop: 61 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]\n && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 25 + line_stop: 29 + col_start: 3 + col_stop: 61 + path: compiler-test + content: " return\n a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]\n && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 7 + line_stop: 30 + col_start: 98 + col_stop: 2 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\n...\n}" + span: + line_start: 7 + line_stop: 30 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + type_inferenced_theorem: + name: test + expected_input: [] + imports: [] + circuits: + "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Circ {\\\"}\"}": + circuit_name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Circ {\\\"}\"}" + 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 + global_consts: {} + functions: + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: U8 + - - value: "8" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 17 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 7 + line_stop: 7 + col_start: 28 + col_stop: 29 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":36,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Array: + - IntegerType: U8 + - - value: "3" + - - value: "3" + span: + line_start: 7 + line_stop: 7 + col_start: 36 + col_stop: 37 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" + - Variable: + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":53,\\\"col_stop\\\":54,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Tuple: + - IntegerType: U8 + - IntegerType: U32 + - - value: "1" + span: + line_start: 7 + line_stop: 7 + col_start: 53 + col_stop: 54 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" + - Variable: + identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":72,\\\"col_stop\\\":73,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Array: + - IntegerType: U8 + - - value: "4" + - - value: "3" + span: + line_start: 7 + line_stop: 7 + col_start: 72 + col_stop: 73 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" + output: Boolean + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..3][b] = 93;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Integer: + - U32 + - "0" + - line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[0..3][b] = 93;" + - Value: + Integer: + - U32 + - "3" + - line_start: 8 + line_stop: 8 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[0..3][b] = 93;" + - ArrayIndex: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..3][b] = 93;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 3 + col_stop: 13 + path: compiler-test + content: " a[0..3][b] = 93;" + value: + Value: + Integer: + - U8 + - "93" + - line_start: 8 + line_stop: 8 + col_start: 16 + col_stop: 18 + path: compiler-test + content: " a[0..3][b] = 93;" + span: + line_start: 8 + line_stop: 8 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " a[0..3][b] = 93;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] = 87;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Integer: + - U32 + - "2" + - line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[2..6][1] = 87;" + - Value: + Integer: + - U32 + - "6" + - line_start: 9 + line_stop: 9 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[2..6][1] = 87;" + - ArrayIndex: + Value: + Integer: + - U32 + - "1" + - line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[2..6][1] = 87;" + span: + line_start: 9 + line_stop: 9 + col_start: 3 + col_stop: 13 + path: compiler-test + content: " a[2..6][1] = 87;" + value: + Value: + Integer: + - U8 + - "87" + - line_start: 9 + line_stop: 9 + col_start: 16 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] = 87;" + span: + line_start: 9 + line_stop: 9 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] = 87;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] *= 2;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Integer: + - U32 + - "2" + - line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[2..6][1] *= 2;" + - Value: + Integer: + - U32 + - "6" + - line_start: 10 + line_stop: 10 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[2..6][1] *= 2;" + - ArrayIndex: + Value: + Integer: + - U32 + - "1" + - line_start: 10 + line_stop: 10 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[2..6][1] *= 2;" + span: + line_start: 10 + line_stop: 10 + col_start: 3 + col_stop: 13 + path: compiler-test + content: " a[2..6][1] *= 2;" + value: + Binary: + left: + ArrayAccess: + array: + ArrayRangeAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] *= 2;\\\"}\"}" + left: + Value: + Integer: + - U32 + - "2" + - line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[2..6][1] *= 2;" + right: + Value: + Integer: + - U32 + - "6" + - line_start: 10 + line_stop: 10 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[2..6][1] *= 2;" + span: + line_start: 10 + line_stop: 10 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] *= 2;" + index: + Value: + Integer: + - U32 + - "1" + - line_start: 10 + line_stop: 10 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[2..6][1] *= 2;" + span: + line_start: 10 + line_stop: 10 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] *= 2;" + right: + Value: + Integer: + - U8 + - "2" + - line_start: 10 + line_stop: 10 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] *= 2;" + op: Mul + span: + line_start: 10 + line_stop: 10 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] *= 2;" + span: + line_start: 10 + line_stop: 10 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " a[2..6][1] *= 2;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..3] = [42u8];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Integer: + - U32 + - "2" + - line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[2..3] = [42u8];" + - Value: + Integer: + - U32 + - "3" + - line_start: 11 + line_stop: 11 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[2..3] = [42u8];" + span: + line_start: 11 + line_stop: 11 + col_start: 3 + col_stop: 10 + path: compiler-test + content: " a[2..3] = [42u8];" + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "42" + - line_start: 11 + line_stop: 11 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " a[2..3] = [42u8];" + span: + line_start: 11 + line_stop: 11 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " a[2..3] = [42u8];" + span: + line_start: 11 + line_stop: 11 + col_start: 3 + col_stop: 19 + path: compiler-test + content: " a[2..3] = [42u8];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[6..][0] = 43u8;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Integer: + - U32 + - "6" + - line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[6..][0] = 43u8;" + - ~ + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 12 + line_stop: 12 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " a[6..][0] = 43u8;" + span: + line_start: 12 + line_stop: 12 + col_start: 3 + col_stop: 12 + path: compiler-test + content: " a[6..][0] = 43u8;" + value: + Value: + Integer: + - U8 + - "43" + - line_start: 12 + line_stop: 12 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " a[6..][0] = 43u8;" + span: + line_start: 12 + line_stop: 12 + col_start: 3 + col_stop: 19 + path: compiler-test + content: " a[6..][0] = 43u8;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..1][0..1] = [200];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Integer: + - U32 + - "0" + - line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a[0..1][0..1] = [200];" + - Value: + Integer: + - U32 + - "1" + - line_start: 13 + line_stop: 13 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " a[0..1][0..1] = [200];" + - ArrayRange: + - Value: + Integer: + - U32 + - "0" + - line_start: 13 + line_stop: 13 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[0..1][0..1] = [200];" + - Value: + Integer: + - U32 + - "1" + - line_start: 13 + line_stop: 13 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " a[0..1][0..1] = [200];" + span: + line_start: 13 + line_stop: 13 + col_start: 3 + col_stop: 16 + path: compiler-test + content: " a[0..1][0..1] = [200];" + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "200" + - line_start: 13 + line_stop: 13 + col_start: 20 + col_stop: 23 + path: compiler-test + content: " a[0..1][0..1] = [200];" + span: + line_start: 13 + line_stop: 13 + col_start: 19 + col_stop: 24 + path: compiler-test + content: " a[0..1][0..1] = [200];" + span: + line_start: 13 + line_stop: 13 + col_start: 3 + col_stop: 24 + path: compiler-test + content: " a[0..1][0..1] = [200];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[0..2][0] = [1u8; 3];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Integer: + - U32 + - "0" + - line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + - Value: + Integer: + - U32 + - "2" + - line_start: 15 + line_stop: 15 + col_start: 8 + col_stop: 9 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 15 + line_stop: 15 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + span: + line_start: 15 + line_stop: 15 + col_start: 3 + col_stop: 13 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + value: + ArrayInit: + element: + Value: + Integer: + - U8 + - "1" + - line_start: 15 + line_stop: 15 + col_start: 17 + col_stop: 20 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + dimensions: + - value: "3" + span: + line_start: 15 + line_stop: 15 + col_start: 16 + col_stop: 24 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + span: + line_start: 15 + line_stop: 15 + col_start: 3 + col_stop: 24 + path: compiler-test + content: " c[0..2][0] = [1u8; 3];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[1..][1][1..2][0] = 126;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Integer: + - U32 + - "1" + - line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + - ~ + - ArrayIndex: + Value: + Integer: + - U32 + - "1" + - line_start: 16 + line_stop: 16 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + - ArrayRange: + - Value: + Integer: + - U32 + - "1" + - line_start: 16 + line_stop: 16 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + - Value: + Integer: + - U32 + - "2" + - line_start: 16 + line_stop: 16 + col_start: 16 + col_stop: 17 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 16 + line_stop: 16 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + span: + line_start: 16 + line_stop: 16 + col_start: 3 + col_stop: 21 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + value: + Value: + Integer: + - U8 + - "126" + - line_start: 16 + line_stop: 16 + col_start: 24 + col_stop: 27 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + span: + line_start: 16 + line_stop: 16 + col_start: 3 + col_stop: 27 + path: compiler-test + content: " c[1..][1][1..2][0] = 126;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[1..][0] = [42, 43, 44];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Integer: + - U32 + - "1" + - line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + - ~ + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 17 + line_stop: 17 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + span: + line_start: 17 + line_stop: 17 + col_start: 3 + col_stop: 12 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "42" + - line_start: 17 + line_stop: 17 + col_start: 16 + col_stop: 18 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + - Expression: + Value: + Integer: + - U8 + - "43" + - line_start: 17 + line_stop: 17 + col_start: 20 + col_stop: 22 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + - Expression: + Value: + Integer: + - U8 + - "44" + - line_start: 17 + line_stop: 17 + col_start: 24 + col_stop: 26 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + span: + line_start: 17 + line_stop: 17 + col_start: 15 + col_stop: 27 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + span: + line_start: 17 + line_stop: 17 + col_start: 3 + col_stop: 27 + path: compiler-test + content: " c[1..][0] = [42, 43, 44];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + accesses: + - ArrayRange: + - CircuitMemberAccess: + circuit: + CircuitInit: + name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + members: + - identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + expression: + Value: + Implicit: + - "0" + - line_start: 18 + line_stop: 18 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 16 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + name: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + - Value: + Integer: + - U32 + - "1" + - line_start: 18 + line_stop: 18 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 18 + line_stop: 18 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 18 + line_stop: 18 + col_start: 26 + col_stop: 27 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 3 + col_stop: 28 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + value: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayRangeAccess: + array: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + left: + CircuitMemberAccess: + circuit: + CircuitInit: + name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + members: + - identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + expression: + Value: + Implicit: + - "0" + - line_start: 18 + line_stop: 18 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 16 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + name: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 18 + line_stop: 18 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 3 + col_stop: 33 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 18 + line_stop: 18 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 3 + col_stop: 33 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 18 + line_stop: 18 + col_start: 26 + col_stop: 27 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 3 + col_stop: 33 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + right: + Value: + Integer: + - U8 + - "2" + - line_start: 18 + line_stop: 18 + col_start: 32 + col_stop: 33 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + op: Add + span: + line_start: 18 + line_stop: 18 + col_start: 3 + col_stop: 33 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + span: + line_start: 18 + line_stop: 18 + col_start: 3 + col_stop: 33 + path: compiler-test + content: " c[Circ {f: 0}.f..1][0][0] += 2;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d[..1][0].1 = 1;\\\"}\"}" + accesses: + - ArrayRange: + - ~ + - Value: + Integer: + - U32 + - "1" + - line_start: 20 + line_stop: 20 + col_start: 7 + col_stop: 8 + path: compiler-test + content: " d[..1][0].1 = 1;" + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 20 + line_stop: 20 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " d[..1][0].1 = 1;" + - Tuple: + - value: "1" + - line_start: 20 + line_stop: 20 + col_start: 3 + col_stop: 14 + path: compiler-test + content: " d[..1][0].1 = 1;" + span: + line_start: 20 + line_stop: 20 + col_start: 3 + col_stop: 14 + path: compiler-test + content: " d[..1][0].1 = 1;" + value: + Value: + Integer: + - U32 + - "1" + - line_start: 20 + line_stop: 20 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " d[..1][0].1 = 1;" + span: + line_start: 20 + line_stop: 20 + col_start: 3 + col_stop: 18 + path: compiler-test + content: " d[..1][0].1 = 1;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" e[0..][0] = [22; 4];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Integer: + - U32 + - "0" + - line_start: 22 + line_stop: 22 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " e[0..][0] = [22; 4];" + - ~ + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 22 + line_stop: 22 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " e[0..][0] = [22; 4];" + span: + line_start: 22 + line_stop: 22 + col_start: 3 + col_stop: 12 + path: compiler-test + content: " e[0..][0] = [22; 4];" + value: + ArrayInit: + element: + Value: + Integer: + - U8 + - "22" + - line_start: 22 + line_stop: 22 + col_start: 16 + col_stop: 18 + path: compiler-test + content: " e[0..][0] = [22; 4];" + dimensions: + - value: "4" + span: + line_start: 22 + line_stop: 22 + col_start: 15 + col_stop: 22 + path: compiler-test + content: " e[0..][0] = [22; 4];" + span: + line_start: 22 + line_stop: 22 + col_start: 3 + col_stop: 22 + path: compiler-test + content: " e[0..][0] = [22; 4];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" e[0..][0][0] = 33;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Integer: + - U32 + - "0" + - line_start: 23 + line_stop: 23 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " e[0..][0][0] = 33;" + - ~ + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 23 + line_stop: 23 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " e[0..][0][0] = 33;" + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 23 + line_stop: 23 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " e[0..][0][0] = 33;" + span: + line_start: 23 + line_stop: 23 + col_start: 3 + col_stop: 15 + path: compiler-test + content: " e[0..][0][0] = 33;" + value: + Value: + Integer: + - U8 + - "33" + - line_start: 23 + line_stop: 23 + col_start: 18 + col_stop: 20 + path: compiler-test + content: " e[0..][0][0] = 33;" + span: + line_start: 23 + line_stop: 23 + col_start: 3 + col_stop: 20 + path: compiler-test + content: " e[0..][0][0] = 33;" + - Return: + expression: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a == [200u8, 93, 42, 174, 5, 6, 43, 8]\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "200" + - line_start: 26 + line_stop: 26 + col_start: 11 + col_stop: 16 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Integer: + - U8 + - "93" + - line_start: 26 + line_stop: 26 + col_start: 18 + col_stop: 20 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Integer: + - U8 + - "42" + - line_start: 26 + line_stop: 26 + col_start: 22 + col_stop: 24 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Integer: + - U8 + - "174" + - line_start: 26 + line_stop: 26 + col_start: 26 + col_stop: 29 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Integer: + - U8 + - "5" + - line_start: 26 + line_stop: 26 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Integer: + - U8 + - "6" + - line_start: 26 + line_stop: 26 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Integer: + - U8 + - "43" + - line_start: 26 + line_stop: 26 + col_start: 37 + col_stop: 39 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + - Expression: + Value: + Integer: + - U8 + - "8" + - line_start: 26 + line_stop: 26 + col_start: 41 + col_stop: 42 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + span: + line_start: 26 + line_stop: 26 + col_start: 10 + col_stop: 43 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + op: Eq + span: + line_start: 26 + line_stop: 26 + col_start: 5 + col_stop: 43 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" + right: + Binary: + left: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "3" + - line_start: 27 + line_stop: 27 + col_start: 15 + col_stop: 18 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Integer: + - U8 + - "1" + - line_start: 27 + line_stop: 27 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Integer: + - U8 + - "1" + - line_start: 27 + line_stop: 27 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + span: + line_start: 27 + line_stop: 27 + col_start: 14 + col_stop: 25 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "42" + - line_start: 27 + line_stop: 27 + col_start: 28 + col_stop: 30 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Integer: + - U8 + - "43" + - line_start: 27 + line_stop: 27 + col_start: 32 + col_stop: 34 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Integer: + - U8 + - "44" + - line_start: 27 + line_stop: 27 + col_start: 36 + col_stop: 38 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + span: + line_start: 27 + line_stop: 27 + col_start: 27 + col_stop: 39 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "7" + - line_start: 27 + line_stop: 27 + col_start: 42 + col_stop: 43 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Integer: + - U8 + - "126" + - line_start: 27 + line_stop: 27 + col_start: 45 + col_stop: 48 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + - Expression: + Value: + Integer: + - U8 + - "9" + - line_start: 27 + line_stop: 27 + col_start: 50 + col_stop: 51 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + span: + line_start: 27 + line_stop: 27 + col_start: 41 + col_stop: 52 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + span: + line_start: 27 + line_stop: 27 + col_start: 13 + col_stop: 53 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + op: Eq + span: + line_start: 27 + line_stop: 27 + col_start: 8 + col_stop: 53 + path: compiler-test + content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + op: And + span: + line_start: 26 + line_stop: 27 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" + right: + Binary: + left: + Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && d == [(0u8, 1u32)]\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + TupleInit: + elements: + - Value: + Integer: + - U8 + - "0" + - line_start: 28 + line_stop: 28 + col_start: 15 + col_stop: 18 + path: compiler-test + content: " && d == [(0u8, 1u32)]" + - Value: + Integer: + - U32 + - "1" + - line_start: 28 + line_stop: 28 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " && d == [(0u8, 1u32)]" + span: + line_start: 28 + line_stop: 28 + col_start: 14 + col_stop: 25 + path: compiler-test + content: " && d == [(0u8, 1u32)]" + span: + line_start: 28 + line_stop: 28 + col_start: 13 + col_stop: 26 + path: compiler-test + content: " && d == [(0u8, 1u32)]" + op: Eq + span: + line_start: 28 + line_stop: 28 + col_start: 8 + col_stop: 26 + path: compiler-test + content: " && d == [(0u8, 1u32)]" + op: And + span: + line_start: 26 + line_stop: 28 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]" + right: + Binary: + left: + Identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "33" + - line_start: 29 + line_stop: 29 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Integer: + - U8 + - "22" + - line_start: 29 + line_stop: 29 + col_start: 21 + col_stop: 23 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Integer: + - U8 + - "22" + - line_start: 29 + line_stop: 29 + col_start: 25 + col_stop: 27 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Integer: + - U8 + - "22" + - line_start: 29 + line_stop: 29 + col_start: 29 + col_stop: 31 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 29 + line_stop: 29 + col_start: 14 + col_stop: 32 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 29 + line_stop: 29 + col_start: 35 + col_stop: 36 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 29 + line_stop: 29 + col_start: 38 + col_stop: 39 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 29 + line_stop: 29 + col_start: 41 + col_stop: 42 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 29 + line_stop: 29 + col_start: 44 + col_stop: 45 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 29 + line_stop: 29 + col_start: 34 + col_stop: 46 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 29 + line_stop: 29 + col_start: 49 + col_stop: 50 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 29 + line_stop: 29 + col_start: 52 + col_stop: 53 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 29 + line_stop: 29 + col_start: 55 + col_stop: 56 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 29 + line_stop: 29 + col_start: 58 + col_stop: 59 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 29 + line_stop: 29 + col_start: 48 + col_stop: 60 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 29 + line_stop: 29 + col_start: 13 + col_stop: 61 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + op: Eq + span: + line_start: 29 + line_stop: 29 + col_start: 8 + col_stop: 61 + path: compiler-test + content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + op: And + span: + line_start: 26 + line_stop: 29 + col_start: 5 + col_stop: 61 + path: compiler-test + content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]\n && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 25 + line_stop: 29 + col_start: 3 + col_stop: 61 + path: compiler-test + content: " return\n a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]\n && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" + span: + line_start: 7 + line_stop: 30 + col_start: 98 + col_stop: 2 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\n...\n}" + span: + line_start: 7 + line_stop: 30 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/array/equal_initializer.leo.out b/tests/expectations/compiler/compiler/array/equal_initializer.leo.out index 6f0788716e..0e8552ccb3 100644 --- a/tests/expectations/compiler/compiler/array/equal_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/equal_initializer.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out b/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out index 7807e58816..a39f27257f 100644 --- a/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out +++ b/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out index 9cf2626dba..ad2d06ca91 100644 --- a/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out index 1650b2cd83..33387f1cb1 100644 --- a/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/array/multi_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_initializer.leo.out index b9b6741851..8c071efaa2 100644 --- a/tests/expectations/compiler/compiler/array/multi_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_initializer.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/array/nested.leo.out b/tests/expectations/compiler/compiler/array/nested.leo.out index b9b6741851..c9b47949f5 100644 --- a/tests/expectations/compiler/compiler/array/nested.leo.out +++ b/tests/expectations/compiler/compiler/array/nested.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out b/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out index b9b6741851..790c702b7a 100644 --- a/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out +++ b/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/array/registers.leo.out b/tests/expectations/compiler/compiler/array/registers.leo.out index b63a808318..37137ca865 100644 --- a/tests/expectations/compiler/compiler/array/registers.leo.out +++ b/tests/expectations/compiler/compiler/array/registers.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/array/slice.leo.out b/tests/expectations/compiler/compiler/array/slice.leo.out index 267848a117..d931582acd 100644 --- a/tests/expectations/compiler/compiler/array/slice.leo.out +++ b/tests/expectations/compiler/compiler/array/slice.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/array/slice_lower.leo.out b/tests/expectations/compiler/compiler/array/slice_lower.leo.out index b9b6741851..8dfa580c8d 100644 --- a/tests/expectations/compiler/compiler/array/slice_lower.leo.out +++ b/tests/expectations/compiler/compiler/array/slice_lower.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/array/spread.leo.out b/tests/expectations/compiler/compiler/array/spread.leo.out index d2fd27c661..a0dd851fcf 100644 --- a/tests/expectations/compiler/compiler/array/spread.leo.out +++ b/tests/expectations/compiler/compiler/array/spread.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out b/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out index 43e8053cf8..0c346a1d42 100644 --- a/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out +++ b/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out b/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out index b9b6741851..5217804eb1 100644 --- a/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out +++ b/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out index 1650b2cd83..a59a15409d 100644 --- a/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out index c25919cad6..ea3cf274cb 100644 --- a/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out @@ -16,3 +16,1579 @@ 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]; 4]) -> 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]; 4]) -> 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]; 4]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: [[[u8; 2]; 3]; 4]) -> 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]],\\\"}\"}" + 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]]," + type_: ~ + value: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 15 + col_stop: 53 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\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: 3 + line_stop: 10 + col_start: 45 + col_stop: 2 + path: compiler-test + content: "function main(a: [[[u8; 2]; 3]; 4]) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 10 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: [[[u8; 2]; 3]; 4]) -> 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(a: [[[u8; 2]; 3]; 4]) -> 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]; 4]) -> 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]; 4]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: [[[u8; 2]; 3]; 4]) -> 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]],\\\"}\"}" + 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]]," + type_: ~ + value: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 15 + col_stop: 53 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\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: 3 + line_stop: 10 + col_start: 45 + col_stop: 2 + path: compiler-test + content: "function main(a: [[[u8; 2]; 3]; 4]) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 10 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: [[[u8; 2]; 3]; 4]) -> 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(a: [[[u8; 2]; 3]; 4]) -> 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]; 4]) -> 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]; 4]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: [[[u8; 2]; 3]; 4]) -> 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]],\\\"}\"}" + 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]]," + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + value: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 15 + col_stop: 53 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\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: 3 + line_stop: 10 + col_start: 45 + col_stop: 2 + path: compiler-test + content: "function main(a: [[[u8; 2]; 3]; 4]) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 10 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: [[[u8; 2]; 3]; 4]) -> bool {\n...\n}\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out index 30938ca027..eb3b4a3b75 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out index b9b6741851..ccabf0320e 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out @@ -16,3 +16,1805 @@ 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]],\\\"}\"}" + 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]]," + type_: ~ + value: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 15 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + value: + ArrayInit: + element: + ArrayInit: + element: + ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 37 + col_stop: 38 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "2" + span: + line_start: 9 + line_stop: 9 + col_start: 36 + col_stop: 42 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "3" + span: + line_start: 9 + line_stop: 9 + col_start: 35 + col_stop: 46 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "4" + span: + line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 50 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 50 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 3 + line_stop: 12 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 12 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\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\":\"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]],\\\"}\"}" + 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]]," + type_: ~ + value: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 15 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + value: + ArrayInit: + element: + ArrayInit: + element: + ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 37 + col_stop: 38 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "2" + span: + line_start: 9 + line_stop: 9 + col_start: 36 + col_stop: 42 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "3" + span: + line_start: 9 + line_stop: 9 + col_start: 35 + col_stop: 46 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "4" + span: + line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 50 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 50 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 3 + line_stop: 12 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 12 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\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\":\"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]],\\\"}\"}" + 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]]," + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + value: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 15 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + value: + ArrayInit: + element: + ArrayInit: + element: + ArrayInit: + element: + Value: + Integer: + - U8 + - "0" + - line_start: 9 + line_stop: 9 + col_start: 37 + col_stop: 38 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "2" + span: + line_start: 9 + line_stop: 9 + col_start: 36 + col_stop: 42 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "3" + span: + line_start: 9 + line_stop: 9 + col_start: 35 + col_stop: 46 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "4" + span: + line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 50 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 50 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 3 + line_stop: 12 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 12 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out index b9b6741851..d7e169baf1 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out index b9b6741851..21c3a6b263 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out @@ -16,3 +16,1785 @@ 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]],\\\"}\"}" + 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]]," + type_: ~ + value: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 15 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + value: + ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 35 + col_stop: 36 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + dimensions: + - value: "4" + - value: "3" + - value: "2" + span: + line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 48 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 48 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 3 + line_stop: 12 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 12 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\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\":\"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]],\\\"}\"}" + 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]]," + type_: ~ + value: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 15 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + value: + ArrayInit: + element: + ArrayInit: + element: + ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 35 + col_stop: 36 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + dimensions: + - value: "2" + span: + line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 48 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + dimensions: + - value: "3" + span: + line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 48 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + dimensions: + - value: "4" + span: + line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 48 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 48 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 3 + line_stop: 12 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 12 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\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\":\"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]],\\\"}\"}" + 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]]," + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + value: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 15 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + value: + ArrayInit: + element: + ArrayInit: + element: + ArrayInit: + element: + Value: + Integer: + - U8 + - "0" + - line_start: 9 + line_stop: 9 + col_start: 35 + col_stop: 36 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + dimensions: + - value: "2" + span: + line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 48 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + dimensions: + - value: "3" + span: + line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 48 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + dimensions: + - value: "4" + span: + line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 48 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 48 + path: compiler-test + content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 3 + line_stop: 12 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 12 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out index b9b6741851..5600746e0d 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out index b9b6741851..525a93ea9b 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out @@ -16,3 +16,1803 @@ 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]],\\\"}\"}" + 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]]," + type_: ~ + value: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 15 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + type_: + Array: + - IntegerType: U8 + - - value: "4" + - value: "3" + - value: "2" + value: + ArrayInit: + element: + ArrayInit: + element: + ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 35 + col_stop: 36 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "2" + span: + line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 40 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "3" + span: + line_start: 9 + line_stop: 9 + col_start: 33 + col_stop: 44 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "4" + span: + line_start: 9 + line_stop: 9 + col_start: 32 + col_stop: 48 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 48 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 3 + line_stop: 12 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 12 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\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\":\"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]],\\\"}\"}" + 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]]," + type_: ~ + value: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 15 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + value: + ArrayInit: + element: + ArrayInit: + element: + ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 35 + col_stop: 36 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "2" + span: + line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 40 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "3" + span: + line_start: 9 + line_stop: 9 + col_start: 33 + col_stop: 44 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "4" + span: + line_start: 9 + line_stop: 9 + col_start: 32 + col_stop: 48 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 48 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 3 + line_stop: 12 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 12 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\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\":\"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]],\\\"}\"}" + 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]]," + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + value: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 15 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + value: + ArrayInit: + element: + ArrayInit: + element: + ArrayInit: + element: + Value: + Integer: + - U8 + - "0" + - line_start: 9 + line_stop: 9 + col_start: 35 + col_stop: 36 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "2" + span: + line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 40 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "3" + span: + line_start: 9 + line_stop: 9 + col_start: 33 + col_stop: 44 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + dimensions: + - value: "4" + span: + line_start: 9 + line_stop: 9 + col_start: 32 + col_stop: 48 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 48 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 3 + line_stop: 12 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 12 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out index b9b6741851..1e193e882b 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out index b9b6741851..ee168bb9b5 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out @@ -16,3 +16,1783 @@ 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]],\\\"}\"}" + 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]]," + type_: ~ + value: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 15 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + type_: + Array: + - IntegerType: U8 + - - value: "4" + - value: "3" + - value: "2" + value: + ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 33 + col_stop: 34 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + dimensions: + - value: "4" + - value: "3" + - value: "2" + span: + line_start: 9 + line_stop: 9 + col_start: 32 + col_stop: 46 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 46 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 3 + line_stop: 12 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 12 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}\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\":\"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]],\\\"}\"}" + 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]]," + type_: ~ + value: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 15 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + value: + ArrayInit: + element: + ArrayInit: + element: + ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 33 + col_stop: 34 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + dimensions: + - value: "2" + span: + line_start: 9 + line_stop: 9 + col_start: 32 + col_stop: 46 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + dimensions: + - value: "3" + span: + line_start: 9 + line_stop: 9 + col_start: 32 + col_stop: 46 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + dimensions: + - value: "4" + span: + line_start: 9 + line_stop: 9 + col_start: 32 + col_stop: 46 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 46 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 3 + line_stop: 12 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 12 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}\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\":\"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]],\\\"}\"}" + 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]]," + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + value: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," + - Expression: + ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 30 + col_stop: 33 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 35 + col_stop: 38 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 39 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 42 + col_stop: 45 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 41 + col_stop: 51 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 52 + path: compiler-test + content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 15 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" + span: + line_start: 4 + line_stop: 7 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + type_: + Array: + - Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + - - value: "4" + value: + ArrayInit: + element: + ArrayInit: + element: + ArrayInit: + element: + Value: + Integer: + - U8 + - "0" + - line_start: 9 + line_stop: 9 + col_start: 33 + col_stop: 34 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + dimensions: + - value: "2" + span: + line_start: 9 + line_stop: 9 + col_start: 32 + col_stop: 46 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + dimensions: + - value: "3" + span: + line_start: 9 + line_stop: 9 + col_start: 32 + col_stop: 46 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + dimensions: + - value: "4" + span: + line_start: 9 + line_stop: 9 + col_start: 32 + col_stop: 46 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 46 + path: compiler-test + content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == y;" + span: + line_start: 3 + line_stop: 12 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 12 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}\n\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/boolean/and.leo.out b/tests/expectations/compiler/compiler/boolean/and.leo.out index ff5f7b11f7..20bb201c18 100644 --- a/tests/expectations/compiler/compiler/boolean/and.leo.out +++ b/tests/expectations/compiler/compiler/boolean/and.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/boolean/conditional.leo.out b/tests/expectations/compiler/compiler/boolean/conditional.leo.out index ff5f7b11f7..2ea372f38f 100644 --- a/tests/expectations/compiler/compiler/boolean/conditional.leo.out +++ b/tests/expectations/compiler/compiler/boolean/conditional.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/boolean/equal.leo.out b/tests/expectations/compiler/compiler/boolean/equal.leo.out index 9636c9d0ef..9f268f6b92 100644 --- a/tests/expectations/compiler/compiler/boolean/equal.leo.out +++ b/tests/expectations/compiler/compiler/boolean/equal.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/boolean/not_equal.leo.out b/tests/expectations/compiler/compiler/boolean/not_equal.leo.out index e8fdabeced..a97d5b6588 100644 --- a/tests/expectations/compiler/compiler/boolean/not_equal.leo.out +++ b/tests/expectations/compiler/compiler/boolean/not_equal.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/boolean/or.leo.out b/tests/expectations/compiler/compiler/boolean/or.leo.out index 06f1cbad2f..f6f25a7a35 100644 --- a/tests/expectations/compiler/compiler/boolean/or.leo.out +++ b/tests/expectations/compiler/compiler/boolean/or.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/char/circuit.leo.out b/tests/expectations/compiler/compiler/char/circuit.leo.out index 8e14cd904d..2d02be11ee 100644 --- a/tests/expectations/compiler/compiler/char/circuit.leo.out +++ b/tests/expectations/compiler/compiler/char/circuit.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/char/neq.leo.out b/tests/expectations/compiler/compiler/char/neq.leo.out index fe47621180..39e7f5ef32 100644 --- a/tests/expectations/compiler/compiler/char/neq.leo.out +++ b/tests/expectations/compiler/compiler/char/neq.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/char/nonprinting.leo.out b/tests/expectations/compiler/compiler/char/nonprinting.leo.out index 31052a1a67..70161164e5 100644 --- a/tests/expectations/compiler/compiler/char/nonprinting.leo.out +++ b/tests/expectations/compiler/compiler/char/nonprinting.leo.out @@ -19,3 +19,1773 @@ outputs: r1: type: bool value: "true" + 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(\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in1: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 3 + line_stop: 3 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in1: char," + - Variable: + identifier: "{\"name\":\"in2\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in2: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in2: char," + - Variable: + identifier: "{\"name\":\"in3\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in3: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in3: char," + - Variable: + identifier: "{\"name\":\"in4\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in4: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in4: char," + - Variable: + identifier: "{\"name\":\"in5\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in5: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in5: char," + - Variable: + identifier: "{\"name\":\"in6\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in6: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in6: char," + - Variable: + identifier: "{\"name\":\"in7\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in7: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in7: char," + - Variable: + identifier: "{\"name\":\"in8\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in8: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in8: char," + - Variable: + identifier: "{\"name\":\"in9\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in9: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in9: char," + - Variable: + identifier: "{\"name\":\"in10\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in10: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in10: char," + - Variable: + identifier: "{\"name\":\"in11\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in11: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in11: char," + - Variable: + identifier: "{\"name\":\"in12\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in12: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 14 + line_stop: 14 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in12: char," + - Variable: + identifier: "{\"name\":\"in13\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in13: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in13: char," + - Variable: + identifier: "{\"name\":\"in14\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in14: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in14: char," + - Variable: + identifier: "{\"name\":\"in15\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in15: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in15: char," + - Variable: + identifier: "{\"name\":\"in16\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in16: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in16: char," + - Variable: + identifier: "{\"name\":\"in17\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in17: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 19 + line_stop: 19 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in17: char," + - Variable: + identifier: "{\"name\":\"in18\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in18: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 20 + line_stop: 20 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in18: char," + - Variable: + identifier: "{\"name\":\"in19\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in19: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 21 + line_stop: 21 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in19: char," + - Variable: + identifier: "{\"name\":\"in20\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in20: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 22 + line_stop: 22 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in20: char," + - Variable: + identifier: "{\"name\":\"in21\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in21: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 23 + line_stop: 23 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in21: char," + - Variable: + identifier: "{\"name\":\"in22\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in22: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 24 + line_stop: 24 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in22: char," + - Variable: + identifier: "{\"name\":\"in23\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in23: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 25 + line_stop: 25 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in23: char," + - Variable: + identifier: "{\"name\":\"in24\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in24: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 26 + line_stop: 26 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in24: char," + - Variable: + identifier: "{\"name\":\"in25\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in25: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 27 + line_stop: 27 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in25: char," + - Variable: + identifier: "{\"name\":\"in26\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in26: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 28 + line_stop: 28 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in26: char," + - Variable: + identifier: "{\"name\":\"in27\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in27: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 29 + line_stop: 29 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in27: char," + - Variable: + identifier: "{\"name\":\"in28\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in28: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 30 + line_stop: 30 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in28: char," + - Variable: + identifier: "{\"name\":\"in29\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in29: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 31 + line_stop: 31 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in29: char," + - Variable: + identifier: "{\"name\":\"in30\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in30: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 32 + line_stop: 32 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in30: char," + - Variable: + identifier: "{\"name\":\"in31\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in31: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 33 + line_stop: 33 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in31: char," + - Variable: + identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 34 + line_stop: 34 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in32: char," + - Variable: + identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 35 + line_stop: 35 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in32: char," + output: + Tuple: + - Array: + - Char + - - value: "33" + - Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let str = [\\\"}\"}" + span: + line_start: 37 + line_stop: 37 + col_start: 9 + col_stop: 12 + path: compiler-test + content: " let str = [" + type_: ~ + value: + ArrayInline: + elements: + - Expression: + Identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in1,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in2\",\"span\":\"{\\\"line_start\\\":39,\\\"line_stop\\\":39,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in2,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in3\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in3,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in4\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in4,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in5\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in5,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in6\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in6,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in7\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in7,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in8\",\"span\":\"{\\\"line_start\\\":45,\\\"line_stop\\\":45,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in8,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in9\",\"span\":\"{\\\"line_start\\\":46,\\\"line_stop\\\":46,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in9,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in10\",\"span\":\"{\\\"line_start\\\":47,\\\"line_stop\\\":47,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in10,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in11\",\"span\":\"{\\\"line_start\\\":48,\\\"line_stop\\\":48,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in11,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in12\",\"span\":\"{\\\"line_start\\\":49,\\\"line_stop\\\":49,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in12,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in13\",\"span\":\"{\\\"line_start\\\":50,\\\"line_stop\\\":50,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in13,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in14\",\"span\":\"{\\\"line_start\\\":51,\\\"line_stop\\\":51,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in14,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in15\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in15,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in16\",\"span\":\"{\\\"line_start\\\":53,\\\"line_stop\\\":53,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in16,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in17\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in17,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in18\",\"span\":\"{\\\"line_start\\\":55,\\\"line_stop\\\":55,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in18,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in19\",\"span\":\"{\\\"line_start\\\":56,\\\"line_stop\\\":56,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in19,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in20\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in20,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in21\",\"span\":\"{\\\"line_start\\\":58,\\\"line_stop\\\":58,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in21,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in22\",\"span\":\"{\\\"line_start\\\":59,\\\"line_stop\\\":59,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in22,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in23\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in23,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in24\",\"span\":\"{\\\"line_start\\\":61,\\\"line_stop\\\":61,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in24,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in25\",\"span\":\"{\\\"line_start\\\":62,\\\"line_stop\\\":62,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in25,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in26\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in26,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in27\",\"span\":\"{\\\"line_start\\\":64,\\\"line_stop\\\":64,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in27,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in28\",\"span\":\"{\\\"line_start\\\":65,\\\"line_stop\\\":65,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in28,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in29\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in29,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in30\",\"span\":\"{\\\"line_start\\\":67,\\\"line_stop\\\":67,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in30,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in31\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in31,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":69,\\\"line_stop\\\":69,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":70,\\\"line_stop\\\":70,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32,\\\"}\"}" + span: + line_start: 37 + line_stop: 71 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " let str = [\n...\n ];" + span: + line_start: 37 + line_stop: 71 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " let str = [\n...\n ];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + - Console: + function: + Log: + parts: + - Const: "" + - Container + parameters: + - Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":72,\\\"line_stop\\\":72,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", str);\\\"}\"}" + span: + line_start: 72 + line_stop: 72 + col_start: 17 + col_stop: 26 + path: compiler-test + content: " console.log(\"{}\", str);" + span: + line_start: 72 + line_stop: 72 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.log(\"{}\", str);" + - Return: + expression: + TupleInit: + elements: + - Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":73,\\\"line_stop\\\":73,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (str, in1 == '\\\\\\\\x00');\\\"}\"}" + - Binary: + left: + Identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":73,\\\"line_stop\\\":73,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (str, in1 == '\\\\\\\\x00');\\\"}\"}" + right: + Value: + Char: + character: + Scalar: 0 + span: + line_start: 73 + line_stop: 73 + col_start: 25 + col_stop: 31 + path: compiler-test + content: " return (str, in1 == '\\x00');" + op: Eq + span: + line_start: 73 + line_stop: 73 + col_start: 18 + col_stop: 31 + path: compiler-test + content: " return (str, in1 == '\\x00');" + span: + line_start: 73 + line_stop: 73 + col_start: 12 + col_stop: 32 + path: compiler-test + content: " return (str, in1 == '\\x00');" + span: + line_start: 73 + line_stop: 73 + col_start: 5 + col_stop: 32 + path: compiler-test + content: " return (str, in1 == '\\x00');" + span: + line_start: 36 + line_stop: 74 + col_start: 25 + col_stop: 2 + path: compiler-test + content: ") -> ([char; 33], bool) {\n...\n}" + span: + line_start: 2 + line_stop: 74 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(\n...\n) -> ([char; 33], bool) {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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(\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in1: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 3 + line_stop: 3 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in1: char," + - Variable: + identifier: "{\"name\":\"in2\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in2: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in2: char," + - Variable: + identifier: "{\"name\":\"in3\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in3: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in3: char," + - Variable: + identifier: "{\"name\":\"in4\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in4: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in4: char," + - Variable: + identifier: "{\"name\":\"in5\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in5: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in5: char," + - Variable: + identifier: "{\"name\":\"in6\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in6: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in6: char," + - Variable: + identifier: "{\"name\":\"in7\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in7: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in7: char," + - Variable: + identifier: "{\"name\":\"in8\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in8: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in8: char," + - Variable: + identifier: "{\"name\":\"in9\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in9: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in9: char," + - Variable: + identifier: "{\"name\":\"in10\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in10: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in10: char," + - Variable: + identifier: "{\"name\":\"in11\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in11: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in11: char," + - Variable: + identifier: "{\"name\":\"in12\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in12: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 14 + line_stop: 14 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in12: char," + - Variable: + identifier: "{\"name\":\"in13\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in13: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in13: char," + - Variable: + identifier: "{\"name\":\"in14\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in14: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in14: char," + - Variable: + identifier: "{\"name\":\"in15\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in15: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in15: char," + - Variable: + identifier: "{\"name\":\"in16\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in16: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in16: char," + - Variable: + identifier: "{\"name\":\"in17\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in17: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 19 + line_stop: 19 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in17: char," + - Variable: + identifier: "{\"name\":\"in18\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in18: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 20 + line_stop: 20 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in18: char," + - Variable: + identifier: "{\"name\":\"in19\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in19: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 21 + line_stop: 21 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in19: char," + - Variable: + identifier: "{\"name\":\"in20\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in20: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 22 + line_stop: 22 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in20: char," + - Variable: + identifier: "{\"name\":\"in21\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in21: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 23 + line_stop: 23 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in21: char," + - Variable: + identifier: "{\"name\":\"in22\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in22: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 24 + line_stop: 24 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in22: char," + - Variable: + identifier: "{\"name\":\"in23\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in23: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 25 + line_stop: 25 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in23: char," + - Variable: + identifier: "{\"name\":\"in24\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in24: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 26 + line_stop: 26 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in24: char," + - Variable: + identifier: "{\"name\":\"in25\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in25: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 27 + line_stop: 27 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in25: char," + - Variable: + identifier: "{\"name\":\"in26\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in26: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 28 + line_stop: 28 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in26: char," + - Variable: + identifier: "{\"name\":\"in27\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in27: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 29 + line_stop: 29 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in27: char," + - Variable: + identifier: "{\"name\":\"in28\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in28: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 30 + line_stop: 30 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in28: char," + - Variable: + identifier: "{\"name\":\"in29\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in29: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 31 + line_stop: 31 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in29: char," + - Variable: + identifier: "{\"name\":\"in30\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in30: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 32 + line_stop: 32 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in30: char," + - Variable: + identifier: "{\"name\":\"in31\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in31: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 33 + line_stop: 33 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in31: char," + - Variable: + identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 34 + line_stop: 34 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in32: char," + - Variable: + identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 35 + line_stop: 35 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in32: char," + output: + Tuple: + - Array: + - Char + - - value: "33" + - Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let str = [\\\"}\"}" + span: + line_start: 37 + line_stop: 37 + col_start: 9 + col_stop: 12 + path: compiler-test + content: " let str = [" + type_: ~ + value: + ArrayInline: + elements: + - Expression: + Identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in1,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in2\",\"span\":\"{\\\"line_start\\\":39,\\\"line_stop\\\":39,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in2,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in3\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in3,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in4\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in4,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in5\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in5,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in6\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in6,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in7\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in7,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in8\",\"span\":\"{\\\"line_start\\\":45,\\\"line_stop\\\":45,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in8,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in9\",\"span\":\"{\\\"line_start\\\":46,\\\"line_stop\\\":46,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in9,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in10\",\"span\":\"{\\\"line_start\\\":47,\\\"line_stop\\\":47,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in10,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in11\",\"span\":\"{\\\"line_start\\\":48,\\\"line_stop\\\":48,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in11,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in12\",\"span\":\"{\\\"line_start\\\":49,\\\"line_stop\\\":49,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in12,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in13\",\"span\":\"{\\\"line_start\\\":50,\\\"line_stop\\\":50,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in13,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in14\",\"span\":\"{\\\"line_start\\\":51,\\\"line_stop\\\":51,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in14,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in15\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in15,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in16\",\"span\":\"{\\\"line_start\\\":53,\\\"line_stop\\\":53,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in16,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in17\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in17,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in18\",\"span\":\"{\\\"line_start\\\":55,\\\"line_stop\\\":55,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in18,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in19\",\"span\":\"{\\\"line_start\\\":56,\\\"line_stop\\\":56,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in19,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in20\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in20,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in21\",\"span\":\"{\\\"line_start\\\":58,\\\"line_stop\\\":58,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in21,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in22\",\"span\":\"{\\\"line_start\\\":59,\\\"line_stop\\\":59,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in22,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in23\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in23,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in24\",\"span\":\"{\\\"line_start\\\":61,\\\"line_stop\\\":61,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in24,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in25\",\"span\":\"{\\\"line_start\\\":62,\\\"line_stop\\\":62,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in25,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in26\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in26,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in27\",\"span\":\"{\\\"line_start\\\":64,\\\"line_stop\\\":64,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in27,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in28\",\"span\":\"{\\\"line_start\\\":65,\\\"line_stop\\\":65,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in28,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in29\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in29,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in30\",\"span\":\"{\\\"line_start\\\":67,\\\"line_stop\\\":67,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in30,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in31\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in31,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":69,\\\"line_stop\\\":69,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":70,\\\"line_stop\\\":70,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32,\\\"}\"}" + span: + line_start: 37 + line_stop: 71 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " let str = [\n...\n ];" + span: + line_start: 37 + line_stop: 71 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " let str = [\n...\n ];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + - Console: + function: + Log: + parts: + - Const: "" + - Container + parameters: + - Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":72,\\\"line_stop\\\":72,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", str);\\\"}\"}" + span: + line_start: 72 + line_stop: 72 + col_start: 17 + col_stop: 26 + path: compiler-test + content: " console.log(\"{}\", str);" + span: + line_start: 72 + line_stop: 72 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.log(\"{}\", str);" + - Return: + expression: + TupleInit: + elements: + - Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":73,\\\"line_stop\\\":73,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (str, in1 == '\\\\\\\\x00');\\\"}\"}" + - Binary: + left: + Identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":73,\\\"line_stop\\\":73,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (str, in1 == '\\\\\\\\x00');\\\"}\"}" + right: + Value: + Char: + character: + Scalar: 0 + span: + line_start: 73 + line_stop: 73 + col_start: 25 + col_stop: 31 + path: compiler-test + content: " return (str, in1 == '\\x00');" + op: Eq + span: + line_start: 73 + line_stop: 73 + col_start: 18 + col_stop: 31 + path: compiler-test + content: " return (str, in1 == '\\x00');" + span: + line_start: 73 + line_stop: 73 + col_start: 12 + col_stop: 32 + path: compiler-test + content: " return (str, in1 == '\\x00');" + span: + line_start: 73 + line_stop: 73 + col_start: 5 + col_stop: 32 + path: compiler-test + content: " return (str, in1 == '\\x00');" + span: + line_start: 36 + line_stop: 74 + col_start: 25 + col_stop: 2 + path: compiler-test + content: ") -> ([char; 33], bool) {\n...\n}" + span: + line_start: 2 + line_stop: 74 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(\n...\n) -> ([char; 33], bool) {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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(\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in1: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 3 + line_stop: 3 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in1: char," + - Variable: + identifier: "{\"name\":\"in2\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in2: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in2: char," + - Variable: + identifier: "{\"name\":\"in3\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in3: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in3: char," + - Variable: + identifier: "{\"name\":\"in4\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in4: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in4: char," + - Variable: + identifier: "{\"name\":\"in5\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in5: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in5: char," + - Variable: + identifier: "{\"name\":\"in6\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in6: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in6: char," + - Variable: + identifier: "{\"name\":\"in7\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in7: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in7: char," + - Variable: + identifier: "{\"name\":\"in8\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in8: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in8: char," + - Variable: + identifier: "{\"name\":\"in9\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in9: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " in9: char," + - Variable: + identifier: "{\"name\":\"in10\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in10: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in10: char," + - Variable: + identifier: "{\"name\":\"in11\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in11: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in11: char," + - Variable: + identifier: "{\"name\":\"in12\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in12: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 14 + line_stop: 14 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in12: char," + - Variable: + identifier: "{\"name\":\"in13\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in13: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in13: char," + - Variable: + identifier: "{\"name\":\"in14\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in14: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in14: char," + - Variable: + identifier: "{\"name\":\"in15\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in15: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in15: char," + - Variable: + identifier: "{\"name\":\"in16\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in16: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in16: char," + - Variable: + identifier: "{\"name\":\"in17\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in17: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 19 + line_stop: 19 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in17: char," + - Variable: + identifier: "{\"name\":\"in18\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in18: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 20 + line_stop: 20 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in18: char," + - Variable: + identifier: "{\"name\":\"in19\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in19: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 21 + line_stop: 21 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in19: char," + - Variable: + identifier: "{\"name\":\"in20\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in20: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 22 + line_stop: 22 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in20: char," + - Variable: + identifier: "{\"name\":\"in21\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in21: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 23 + line_stop: 23 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in21: char," + - Variable: + identifier: "{\"name\":\"in22\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in22: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 24 + line_stop: 24 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in22: char," + - Variable: + identifier: "{\"name\":\"in23\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in23: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 25 + line_stop: 25 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in23: char," + - Variable: + identifier: "{\"name\":\"in24\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in24: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 26 + line_stop: 26 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in24: char," + - Variable: + identifier: "{\"name\":\"in25\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in25: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 27 + line_stop: 27 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in25: char," + - Variable: + identifier: "{\"name\":\"in26\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in26: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 28 + line_stop: 28 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in26: char," + - Variable: + identifier: "{\"name\":\"in27\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in27: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 29 + line_stop: 29 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in27: char," + - Variable: + identifier: "{\"name\":\"in28\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in28: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 30 + line_stop: 30 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in28: char," + - Variable: + identifier: "{\"name\":\"in29\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in29: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 31 + line_stop: 31 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in29: char," + - Variable: + identifier: "{\"name\":\"in30\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in30: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 32 + line_stop: 32 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in30: char," + - Variable: + identifier: "{\"name\":\"in31\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in31: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 33 + line_stop: 33 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in31: char," + - Variable: + identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 34 + line_stop: 34 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in32: char," + - Variable: + identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32: char,\\\"}\"}" + const_: false + mutable: true + type_: Char + span: + line_start: 35 + line_stop: 35 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " in32: char," + output: + Tuple: + - Array: + - Char + - - value: "33" + - Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let str = [\\\"}\"}" + span: + line_start: 37 + line_stop: 37 + col_start: 9 + col_stop: 12 + path: compiler-test + content: " let str = [" + type_: + Array: + - Char + - - value: "33" + value: + ArrayInline: + elements: + - Expression: + Identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in1,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in2\",\"span\":\"{\\\"line_start\\\":39,\\\"line_stop\\\":39,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in2,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in3\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in3,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in4\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in4,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in5\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in5,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in6\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in6,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in7\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in7,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in8\",\"span\":\"{\\\"line_start\\\":45,\\\"line_stop\\\":45,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in8,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in9\",\"span\":\"{\\\"line_start\\\":46,\\\"line_stop\\\":46,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in9,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in10\",\"span\":\"{\\\"line_start\\\":47,\\\"line_stop\\\":47,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in10,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in11\",\"span\":\"{\\\"line_start\\\":48,\\\"line_stop\\\":48,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in11,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in12\",\"span\":\"{\\\"line_start\\\":49,\\\"line_stop\\\":49,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in12,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in13\",\"span\":\"{\\\"line_start\\\":50,\\\"line_stop\\\":50,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in13,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in14\",\"span\":\"{\\\"line_start\\\":51,\\\"line_stop\\\":51,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in14,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in15\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in15,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in16\",\"span\":\"{\\\"line_start\\\":53,\\\"line_stop\\\":53,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in16,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in17\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in17,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in18\",\"span\":\"{\\\"line_start\\\":55,\\\"line_stop\\\":55,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in18,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in19\",\"span\":\"{\\\"line_start\\\":56,\\\"line_stop\\\":56,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in19,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in20\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in20,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in21\",\"span\":\"{\\\"line_start\\\":58,\\\"line_stop\\\":58,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in21,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in22\",\"span\":\"{\\\"line_start\\\":59,\\\"line_stop\\\":59,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in22,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in23\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in23,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in24\",\"span\":\"{\\\"line_start\\\":61,\\\"line_stop\\\":61,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in24,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in25\",\"span\":\"{\\\"line_start\\\":62,\\\"line_stop\\\":62,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in25,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in26\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in26,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in27\",\"span\":\"{\\\"line_start\\\":64,\\\"line_stop\\\":64,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in27,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in28\",\"span\":\"{\\\"line_start\\\":65,\\\"line_stop\\\":65,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in28,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in29\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in29,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in30\",\"span\":\"{\\\"line_start\\\":67,\\\"line_stop\\\":67,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in30,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in31\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in31,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":69,\\\"line_stop\\\":69,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32,\\\"}\"}" + - Expression: + Identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":70,\\\"line_stop\\\":70,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32,\\\"}\"}" + span: + line_start: 37 + line_stop: 71 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " let str = [\n...\n ];" + span: + line_start: 37 + line_stop: 71 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " let str = [\n...\n ];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + - Console: + function: + Log: + parts: + - Const: "" + - Container + parameters: + - Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":72,\\\"line_stop\\\":72,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", str);\\\"}\"}" + span: + line_start: 72 + line_stop: 72 + col_start: 17 + col_stop: 26 + path: compiler-test + content: " console.log(\"{}\", str);" + span: + line_start: 72 + line_stop: 72 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.log(\"{}\", str);" + - Return: + expression: + TupleInit: + elements: + - Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":73,\\\"line_stop\\\":73,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (str, in1 == '\\\\\\\\x00');\\\"}\"}" + - Binary: + left: + Identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":73,\\\"line_stop\\\":73,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (str, in1 == '\\\\\\\\x00');\\\"}\"}" + right: + Value: + Char: + character: + Scalar: 0 + span: + line_start: 73 + line_stop: 73 + col_start: 25 + col_stop: 31 + path: compiler-test + content: " return (str, in1 == '\\x00');" + op: Eq + span: + line_start: 73 + line_stop: 73 + col_start: 18 + col_stop: 31 + path: compiler-test + content: " return (str, in1 == '\\x00');" + span: + line_start: 73 + line_stop: 73 + col_start: 12 + col_stop: 32 + path: compiler-test + content: " return (str, in1 == '\\x00');" + span: + line_start: 73 + line_stop: 73 + col_start: 5 + col_stop: 32 + path: compiler-test + content: " return (str, in1 == '\\x00');" + span: + line_start: 36 + line_stop: 74 + col_start: 25 + col_stop: 2 + path: compiler-test + content: ") -> ([char; 33], bool) {\n...\n}" + span: + line_start: 2 + line_stop: 74 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(\n...\n) -> ([char; 33], bool) {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/char/out.leo.out b/tests/expectations/compiler/compiler/char/out.leo.out index 8e14cd904d..78567e6b92 100644 --- a/tests/expectations/compiler/compiler/char/out.leo.out +++ b/tests/expectations/compiler/compiler/char/out.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out index b9b6741851..ec1112efcd 100644 --- a/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out b/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out index 3a379f9f90..785a81e0d2 100644 --- a/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out b/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out index b9b6741851..88271720fb 100644 --- a/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out +++ b/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/circuits/inline.leo.out b/tests/expectations/compiler/compiler/circuits/inline.leo.out index 3f39906b02..2fd7ea2888 100644 --- a/tests/expectations/compiler/compiler/circuits/inline.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out index 1b78f6ccca..6d5a1a9960 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/circuits/member_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_function.leo.out index b9b6741851..c6599e4d95 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out index 791f18dd00..7254d088e3 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out index b9b6741851..6fb70d5fc6 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out index b9b6741851..c54c745db0 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/circuits/member_variable.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out index b9b6741851..e35d378d39 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out index b9b6741851..36642ae2d2 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out index b9b6741851..17c02bf1fd 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out index b9b6741851..5fe0b729e8 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out @@ -16,3 +16,1287 @@ 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, condition: bool, 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, condition: bool, new: u8) {\\\"}\"}" + - Variable: + identifier: "{\"name\":\"condition\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":30,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, condition: bool, new: u8) {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 39 + path: compiler-test + content: " function set_a(mut self, condition: bool, new: u8) {" + - Variable: + identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":47,\\\"col_stop\\\":50,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, condition: bool, new: u8) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " function set_a(mut self, condition: bool, new: u8) {" + output: ~ + block: + statements: + - Conditional: + condition: + Identifier: "{\"name\":\"condition\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if condition {\\\"}\"}" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" + accesses: + - Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " self.a = new;" + value: + Identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 25 + path: compiler-test + content: " self.a = new;" + span: + line_start: 7 + line_stop: 9 + col_start: 22 + col_stop: 10 + path: compiler-test + content: " if condition {\n...\n }" + next: ~ + span: + line_start: 7 + line_stop: 9 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " if condition {\n...\n }" + span: + line_start: 6 + line_stop: 10 + col_start: 56 + col_stop: 6 + path: compiler-test + content: " function set_a(mut self, condition: bool, new: u8) {\n...\n }" + span: + line_start: 6 + line_stop: 10 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function set_a(mut self, condition: bool, new: u8) {\n...\n }\n\n" + global_consts: {} + functions: + "{\"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: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" + span: + line_start: 14 + line_stop: 14 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let f = Foo { a: 0u8 };" + type_: ~ + value: + CircuitInit: + name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" + members: + - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" + expression: + Value: + Integer: + - U8 + - "0" + - line_start: 14 + line_stop: 14 + col_start: 22 + col_stop: 25 + path: compiler-test + content: " let f = Foo { a: 0u8 };" + span: + line_start: 14 + line_stop: 14 + col_start: 13 + col_stop: 27 + path: compiler-test + content: " let f = Foo { a: 0u8 };" + span: + line_start: 14 + line_stop: 14 + 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\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 1u8);\\\"}\"}" + name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 1u8);\\\"}\"}" + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " f.set_a(false, 1u8);" + arguments: + - Value: + Boolean: + - "false" + - line_start: 16 + line_stop: 16 + col_start: 13 + col_stop: 18 + path: compiler-test + content: " f.set_a(false, 1u8);" + - Value: + Integer: + - U8 + - "1" + - line_start: 16 + line_stop: 16 + col_start: 20 + col_stop: 23 + path: compiler-test + content: " f.set_a(false, 1u8);" + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " f.set_a(false, 1u8);" + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " f.set_a(false, 1u8);" + - Expression: + expression: + Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 1u8);\\\"}\"}" + name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 1u8);\\\"}\"}" + span: + line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " f.set_a(true, 1u8);" + arguments: + - Value: + Boolean: + - "true" + - line_start: 17 + line_stop: 17 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " f.set_a(true, 1u8);" + - Value: + Integer: + - U8 + - "1" + - line_start: 17 + line_stop: 17 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " f.set_a(true, 1u8);" + span: + line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " f.set_a(true, 1u8);" + span: + line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " f.set_a(true, 1u8);" + - Expression: + expression: + Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 2u8);\\\"}\"}" + name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 2u8);\\\"}\"}" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " f.set_a(false, 2u8);" + arguments: + - Value: + Boolean: + - "false" + - line_start: 18 + line_stop: 18 + col_start: 13 + col_stop: 18 + path: compiler-test + content: " f.set_a(false, 2u8);" + - Value: + Integer: + - U8 + - "2" + - line_start: 18 + line_stop: 18 + col_start: 20 + col_stop: 23 + path: compiler-test + content: " f.set_a(false, 2u8);" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " f.set_a(false, 2u8);" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " f.set_a(false, 2u8);" + - Expression: + expression: + Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 2u8);\\\"}\"}" + name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 2u8);\\\"}\"}" + span: + line_start: 19 + line_stop: 19 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " f.set_a(true, 2u8);" + arguments: + - Value: + Boolean: + - "true" + - line_start: 19 + line_stop: 19 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " f.set_a(true, 2u8);" + - Value: + Integer: + - U8 + - "2" + - line_start: 19 + line_stop: 19 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " f.set_a(true, 2u8);" + span: + line_start: 19 + line_stop: 19 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " f.set_a(true, 2u8);" + span: + line_start: 19 + line_stop: 19 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " f.set_a(true, 2u8);" + - Return: + expression: + Binary: + left: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" + name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" + span: + line_start: 21 + line_stop: 21 + col_start: 12 + col_stop: 15 + path: compiler-test + content: " return f.a == 2u8 == y;" + right: + Value: + Integer: + - U8 + - "2" + - line_start: 21 + line_stop: 21 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " return f.a == 2u8 == y;" + op: Eq + span: + line_start: 21 + line_stop: 21 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return f.a == 2u8 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" + op: Eq + span: + line_start: 21 + line_stop: 21 + col_start: 12 + col_stop: 27 + path: compiler-test + content: " return f.a == 2u8 == y;" + span: + line_start: 21 + line_stop: 21 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " return f.a == 2u8 == y;" + span: + line_start: 13 + line_stop: 22 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 13 + line_stop: 22 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\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, condition: bool, 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, condition: bool, new: u8) {\\\"}\"}" + - Variable: + identifier: "{\"name\":\"condition\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":30,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, condition: bool, new: u8) {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 39 + path: compiler-test + content: " function set_a(mut self, condition: bool, new: u8) {" + - Variable: + identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":47,\\\"col_stop\\\":50,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, condition: bool, new: u8) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " function set_a(mut self, condition: bool, new: u8) {" + output: + Tuple: [] + block: + statements: + - Conditional: + condition: + Identifier: "{\"name\":\"condition\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if condition {\\\"}\"}" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" + accesses: + - Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " self.a = new;" + value: + Identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 25 + path: compiler-test + content: " self.a = new;" + span: + line_start: 7 + line_stop: 9 + col_start: 22 + col_stop: 10 + path: compiler-test + content: " if condition {\n...\n }" + next: ~ + span: + line_start: 7 + line_stop: 9 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " if condition {\n...\n }" + span: + line_start: 6 + line_stop: 10 + col_start: 56 + col_stop: 6 + path: compiler-test + content: " function set_a(mut self, condition: bool, new: u8) {\n...\n }" + span: + line_start: 6 + line_stop: 10 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function set_a(mut self, condition: bool, new: u8) {\n...\n }\n\n" + global_consts: {} + functions: + "{\"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: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" + span: + line_start: 14 + line_stop: 14 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let f = Foo { a: 0u8 };" + type_: ~ + value: + CircuitInit: + name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" + members: + - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" + expression: + Value: + Integer: + - U8 + - "0" + - line_start: 14 + line_stop: 14 + col_start: 22 + col_stop: 25 + path: compiler-test + content: " let f = Foo { a: 0u8 };" + span: + line_start: 14 + line_stop: 14 + col_start: 13 + col_stop: 27 + path: compiler-test + content: " let f = Foo { a: 0u8 };" + span: + line_start: 14 + line_stop: 14 + 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\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 1u8);\\\"}\"}" + name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 1u8);\\\"}\"}" + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " f.set_a(false, 1u8);" + arguments: + - Value: + Boolean: + - "false" + - line_start: 16 + line_stop: 16 + col_start: 13 + col_stop: 18 + path: compiler-test + content: " f.set_a(false, 1u8);" + - Value: + Integer: + - U8 + - "1" + - line_start: 16 + line_stop: 16 + col_start: 20 + col_stop: 23 + path: compiler-test + content: " f.set_a(false, 1u8);" + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " f.set_a(false, 1u8);" + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " f.set_a(false, 1u8);" + - Expression: + expression: + Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 1u8);\\\"}\"}" + name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 1u8);\\\"}\"}" + span: + line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " f.set_a(true, 1u8);" + arguments: + - Value: + Boolean: + - "true" + - line_start: 17 + line_stop: 17 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " f.set_a(true, 1u8);" + - Value: + Integer: + - U8 + - "1" + - line_start: 17 + line_stop: 17 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " f.set_a(true, 1u8);" + span: + line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " f.set_a(true, 1u8);" + span: + line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " f.set_a(true, 1u8);" + - Expression: + expression: + Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 2u8);\\\"}\"}" + name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 2u8);\\\"}\"}" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " f.set_a(false, 2u8);" + arguments: + - Value: + Boolean: + - "false" + - line_start: 18 + line_stop: 18 + col_start: 13 + col_stop: 18 + path: compiler-test + content: " f.set_a(false, 2u8);" + - Value: + Integer: + - U8 + - "2" + - line_start: 18 + line_stop: 18 + col_start: 20 + col_stop: 23 + path: compiler-test + content: " f.set_a(false, 2u8);" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " f.set_a(false, 2u8);" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " f.set_a(false, 2u8);" + - Expression: + expression: + Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 2u8);\\\"}\"}" + name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 2u8);\\\"}\"}" + span: + line_start: 19 + line_stop: 19 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " f.set_a(true, 2u8);" + arguments: + - Value: + Boolean: + - "true" + - line_start: 19 + line_stop: 19 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " f.set_a(true, 2u8);" + - Value: + Integer: + - U8 + - "2" + - line_start: 19 + line_stop: 19 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " f.set_a(true, 2u8);" + span: + line_start: 19 + line_stop: 19 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " f.set_a(true, 2u8);" + span: + line_start: 19 + line_stop: 19 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " f.set_a(true, 2u8);" + - Return: + expression: + Binary: + left: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" + name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" + span: + line_start: 21 + line_stop: 21 + col_start: 12 + col_stop: 15 + path: compiler-test + content: " return f.a == 2u8 == y;" + right: + Value: + Integer: + - U8 + - "2" + - line_start: 21 + line_stop: 21 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " return f.a == 2u8 == y;" + op: Eq + span: + line_start: 21 + line_stop: 21 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return f.a == 2u8 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" + op: Eq + span: + line_start: 21 + line_stop: 21 + col_start: 12 + col_stop: 27 + path: compiler-test + content: " return f.a == 2u8 == y;" + span: + line_start: 21 + line_stop: 21 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " return f.a == 2u8 == y;" + span: + line_start: 13 + line_stop: 22 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 13 + line_stop: 22 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\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, condition: bool, 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, condition: bool, new: u8) {\\\"}\"}" + - Variable: + identifier: "{\"name\":\"condition\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":30,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, condition: bool, new: u8) {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 6 + line_stop: 6 + col_start: 30 + col_stop: 39 + path: compiler-test + content: " function set_a(mut self, condition: bool, new: u8) {" + - Variable: + identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":47,\\\"col_stop\\\":50,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, condition: bool, new: u8) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 6 + line_stop: 6 + col_start: 47 + col_stop: 50 + path: compiler-test + content: " function set_a(mut self, condition: bool, new: u8) {" + output: + Tuple: [] + block: + statements: + - Conditional: + condition: + Identifier: "{\"name\":\"condition\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if condition {\\\"}\"}" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" + accesses: + - Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " self.a = new;" + value: + Identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 25 + path: compiler-test + content: " self.a = new;" + span: + line_start: 7 + line_stop: 9 + col_start: 22 + col_stop: 10 + path: compiler-test + content: " if condition {\n...\n }" + next: ~ + span: + line_start: 7 + line_stop: 9 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " if condition {\n...\n }" + span: + line_start: 6 + line_stop: 10 + col_start: 56 + col_stop: 6 + path: compiler-test + content: " function set_a(mut self, condition: bool, new: u8) {\n...\n }" + span: + line_start: 6 + line_stop: 10 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function set_a(mut self, condition: bool, new: u8) {\n...\n }\n\n" + global_consts: {} + functions: + "{\"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: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" + span: + line_start: 14 + line_stop: 14 + 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\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" + members: + - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" + expression: + Value: + Integer: + - U8 + - "0" + - line_start: 14 + line_stop: 14 + col_start: 22 + col_stop: 25 + path: compiler-test + content: " let f = Foo { a: 0u8 };" + span: + line_start: 14 + line_stop: 14 + col_start: 13 + col_stop: 27 + path: compiler-test + content: " let f = Foo { a: 0u8 };" + span: + line_start: 14 + line_stop: 14 + 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\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 1u8);\\\"}\"}" + name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 1u8);\\\"}\"}" + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " f.set_a(false, 1u8);" + arguments: + - Value: + Boolean: + - "false" + - line_start: 16 + line_stop: 16 + col_start: 13 + col_stop: 18 + path: compiler-test + content: " f.set_a(false, 1u8);" + - Value: + Integer: + - U8 + - "1" + - line_start: 16 + line_stop: 16 + col_start: 20 + col_stop: 23 + path: compiler-test + content: " f.set_a(false, 1u8);" + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " f.set_a(false, 1u8);" + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " f.set_a(false, 1u8);" + - Expression: + expression: + Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 1u8);\\\"}\"}" + name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 1u8);\\\"}\"}" + span: + line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " f.set_a(true, 1u8);" + arguments: + - Value: + Boolean: + - "true" + - line_start: 17 + line_stop: 17 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " f.set_a(true, 1u8);" + - Value: + Integer: + - U8 + - "1" + - line_start: 17 + line_stop: 17 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " f.set_a(true, 1u8);" + span: + line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " f.set_a(true, 1u8);" + span: + line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " f.set_a(true, 1u8);" + - Expression: + expression: + Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 2u8);\\\"}\"}" + name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 2u8);\\\"}\"}" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " f.set_a(false, 2u8);" + arguments: + - Value: + Boolean: + - "false" + - line_start: 18 + line_stop: 18 + col_start: 13 + col_stop: 18 + path: compiler-test + content: " f.set_a(false, 2u8);" + - Value: + Integer: + - U8 + - "2" + - line_start: 18 + line_stop: 18 + col_start: 20 + col_stop: 23 + path: compiler-test + content: " f.set_a(false, 2u8);" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " f.set_a(false, 2u8);" + span: + line_start: 18 + line_stop: 18 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " f.set_a(false, 2u8);" + - Expression: + expression: + Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 2u8);\\\"}\"}" + name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 2u8);\\\"}\"}" + span: + line_start: 19 + line_stop: 19 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " f.set_a(true, 2u8);" + arguments: + - Value: + Boolean: + - "true" + - line_start: 19 + line_stop: 19 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " f.set_a(true, 2u8);" + - Value: + Integer: + - U8 + - "2" + - line_start: 19 + line_stop: 19 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " f.set_a(true, 2u8);" + span: + line_start: 19 + line_stop: 19 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " f.set_a(true, 2u8);" + span: + line_start: 19 + line_stop: 19 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " f.set_a(true, 2u8);" + - Return: + expression: + Binary: + left: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" + name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" + span: + line_start: 21 + line_stop: 21 + col_start: 12 + col_stop: 15 + path: compiler-test + content: " return f.a == 2u8 == y;" + right: + Value: + Integer: + - U8 + - "2" + - line_start: 21 + line_stop: 21 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " return f.a == 2u8 == y;" + op: Eq + span: + line_start: 21 + line_stop: 21 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return f.a == 2u8 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" + op: Eq + span: + line_start: 21 + line_stop: 21 + col_start: 12 + col_stop: 27 + path: compiler-test + content: " return f.a == 2u8 == y;" + span: + line_start: 21 + line_stop: 21 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " return f.a == 2u8 == y;" + span: + line_start: 13 + line_stop: 22 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 13 + line_stop: 22 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out index b9b6741851..6b2a403d8b 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out index b9b6741851..319cfb938e 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out index b9b6741851..82c7db6f1c 100644 --- a/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out @@ -16,3 +16,1385 @@ outputs: r0: type: bool value: "true" + initial_theorem: + name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}": + circuit_name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}" + 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\":\"test_me\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function test_me(mut self) -> u8 {\\\"}\"}" + input: + - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":22,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function test_me(mut self) -> u8 {\\\"}\"}" + output: + IntegerType: U8 + block: + statements: + - Assign: + operation: Add + assignee: + identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" + accesses: + - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " self.x += 1;" + value: + Value: + Implicit: + - "1" + - line_start: 7 + line_stop: 7 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " self.x += 1;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 20 + path: compiler-test + content: " self.x += 1;" + - Return: + expression: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 16 + col_stop: 22 + path: compiler-test + content: " return self.x;" + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 22 + path: compiler-test + content: " return self.x;" + span: + line_start: 6 + line_stop: 9 + col_start: 38 + col_stop: 6 + path: compiler-test + content: " function test_me(mut self) -> u8 {\n...\n }" + span: + line_start: 6 + line_stop: 9 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function test_me(mut self) -> u8 {\n...\n }\n" + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new() -> Self {\\\"}\"}" + input: [] + output: SelfType + block: + statements: + - Return: + expression: + CircuitInit: + name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { x: 1u8 };\\\"}\"}" + members: + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { x: 1u8 };\\\"}\"}" + expression: + Value: + Integer: + - U8 + - "1" + - line_start: 12 + line_stop: 12 + col_start: 26 + col_stop: 29 + path: compiler-test + content: " return Self { x: 1u8 };" + span: + line_start: 12 + line_stop: 12 + col_start: 16 + col_stop: 31 + path: compiler-test + content: " return Self { x: 1u8 };" + span: + line_start: 12 + line_stop: 12 + col_start: 9 + col_stop: 31 + path: compiler-test + content: " return Self { x: 1u8 };" + span: + line_start: 11 + line_stop: 13 + col_start: 28 + col_stop: 6 + path: compiler-test + content: " function new() -> Self {\n...\n }" + span: + line_start: 11 + line_stop: 13 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function new() -> Self {\n...\n }" + global_consts: {} + functions: + "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}" + input: [] + output: + Circuit: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":21,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}" + block: + statements: + - Return: + expression: + CircuitInit: + name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":10,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return TestMe { x: 0u8 };\\\"}\"}" + members: + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return TestMe { x: 0u8 };\\\"}\"}" + expression: + Value: + Integer: + - U8 + - "0" + - line_start: 17 + line_stop: 17 + col_start: 22 + col_stop: 25 + path: compiler-test + content: " return TestMe { x: 0u8 };" + span: + line_start: 17 + line_stop: 17 + col_start: 10 + col_stop: 27 + path: compiler-test + content: " return TestMe { x: 0u8 };" + span: + line_start: 17 + line_stop: 17 + col_start: 3 + col_stop: 27 + path: compiler-test + content: " return TestMe { x: 0u8 };" + span: + line_start: 16 + line_stop: 18 + col_start: 28 + col_stop: 2 + path: compiler-test + content: "function my_fn() -> TestMe {\n...\n}" + span: + line_start: 16 + line_stop: 18 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function my_fn() -> TestMe {\n...\n}" + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 20 + line_stop: 20 + 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\":\"t\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" + span: + line_start: 21 + line_stop: 21 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + type_: ~ + value: + Call: + function: + CircuitMemberAccess: + circuit: + CircuitInit: + name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" + members: + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" + expression: + Value: + Integer: + - U8 + - "6" + - line_start: 21 + line_stop: 21 + col_start: 26 + col_stop: 29 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + span: + line_start: 21 + line_stop: 21 + col_start: 15 + col_stop: 30 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":31,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" + span: + line_start: 21 + line_stop: 21 + col_start: 15 + col_stop: 38 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + arguments: [] + span: + line_start: 21 + line_stop: 21 + col_start: 15 + col_stop: 40 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + span: + line_start: 21 + line_stop: 21 + col_start: 5 + col_stop: 40 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"u\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" + span: + line_start: 22 + line_stop: 22 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const u = my_fn().test_me();" + type_: ~ + value: + Call: + function: + CircuitMemberAccess: + circuit: + Call: + function: + Identifier: "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":15,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" + arguments: [] + span: + line_start: 22 + line_stop: 22 + col_start: 15 + col_stop: 22 + path: compiler-test + content: " const u = my_fn().test_me();" + name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":23,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" + span: + line_start: 22 + line_stop: 22 + col_start: 15 + col_stop: 30 + path: compiler-test + content: " const u = my_fn().test_me();" + arguments: [] + span: + line_start: 22 + line_stop: 22 + col_start: 15 + col_stop: 32 + path: compiler-test + content: " const u = my_fn().test_me();" + span: + line_start: 22 + line_stop: 22 + col_start: 5 + col_stop: 32 + path: compiler-test + content: " const u = my_fn().test_me();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"v\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const v = TestMe::new().test_me();" + type_: ~ + value: + Call: + function: + CircuitMemberAccess: + circuit: + Call: + function: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" + name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 15 + col_stop: 26 + path: compiler-test + content: " const v = TestMe::new().test_me();" + arguments: [] + span: + line_start: 23 + line_stop: 23 + col_start: 15 + col_stop: 28 + path: compiler-test + content: " const v = TestMe::new().test_me();" + name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":29,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 15 + col_stop: 36 + path: compiler-test + content: " const v = TestMe::new().test_me();" + arguments: [] + span: + line_start: 23 + line_stop: 23 + col_start: 15 + col_stop: 38 + path: compiler-test + content: " const v = TestMe::new().test_me();" + span: + line_start: 23 + line_stop: 23 + col_start: 5 + col_stop: 38 + path: compiler-test + content: " const v = TestMe::new().test_me();" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"v\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return v == 2u8 == y;\\\"}\"}" + right: + Value: + Integer: + - U8 + - "2" + - line_start: 24 + line_stop: 24 + col_start: 17 + col_stop: 20 + path: compiler-test + content: " return v == 2u8 == y;" + op: Eq + span: + line_start: 24 + line_stop: 24 + col_start: 12 + col_stop: 20 + path: compiler-test + content: " return v == 2u8 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return v == 2u8 == y;\\\"}\"}" + op: Eq + span: + line_start: 24 + line_stop: 24 + col_start: 12 + col_stop: 25 + path: compiler-test + content: " return v == 2u8 == y;" + span: + line_start: 24 + line_stop: 24 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " return v == 2u8 == y;" + span: + line_start: 20 + line_stop: 25 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 20 + line_stop: 25 + 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\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}": + circuit_name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}" + 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\":\"test_me\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function test_me(mut self) -> u8 {\\\"}\"}" + input: + - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":22,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function test_me(mut self) -> u8 {\\\"}\"}" + output: + IntegerType: U8 + 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.x += 1;\\\"}\"}" + accesses: + - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " self.x += 1;" + value: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 20 + path: compiler-test + content: " self.x += 1;" + right: + Value: + Implicit: + - "1" + - line_start: 7 + line_stop: 7 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " self.x += 1;" + op: Add + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 20 + path: compiler-test + content: " self.x += 1;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 20 + path: compiler-test + content: " self.x += 1;" + - Return: + expression: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 16 + col_stop: 22 + path: compiler-test + content: " return self.x;" + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 22 + path: compiler-test + content: " return self.x;" + span: + line_start: 6 + line_stop: 9 + col_start: 38 + col_stop: 6 + path: compiler-test + content: " function test_me(mut self) -> u8 {\n...\n }" + span: + line_start: 6 + line_stop: 9 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function test_me(mut self) -> u8 {\n...\n }\n" + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new() -> Self {\\\"}\"}" + input: [] + output: + Circuit: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}" + block: + statements: + - Return: + expression: + CircuitInit: + name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}" + members: + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { x: 1u8 };\\\"}\"}" + expression: + Value: + Integer: + - U8 + - "1" + - line_start: 12 + line_stop: 12 + col_start: 26 + col_stop: 29 + path: compiler-test + content: " return Self { x: 1u8 };" + span: + line_start: 12 + line_stop: 12 + col_start: 16 + col_stop: 31 + path: compiler-test + content: " return Self { x: 1u8 };" + span: + line_start: 12 + line_stop: 12 + col_start: 9 + col_stop: 31 + path: compiler-test + content: " return Self { x: 1u8 };" + span: + line_start: 11 + line_stop: 13 + col_start: 28 + col_stop: 6 + path: compiler-test + content: " function new() -> Self {\n...\n }" + span: + line_start: 11 + line_stop: 13 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function new() -> Self {\n...\n }" + global_consts: {} + functions: + "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}" + input: [] + output: + Circuit: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":21,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}" + block: + statements: + - Return: + expression: + CircuitInit: + name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":10,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return TestMe { x: 0u8 };\\\"}\"}" + members: + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return TestMe { x: 0u8 };\\\"}\"}" + expression: + Value: + Integer: + - U8 + - "0" + - line_start: 17 + line_stop: 17 + col_start: 22 + col_stop: 25 + path: compiler-test + content: " return TestMe { x: 0u8 };" + span: + line_start: 17 + line_stop: 17 + col_start: 10 + col_stop: 27 + path: compiler-test + content: " return TestMe { x: 0u8 };" + span: + line_start: 17 + line_stop: 17 + col_start: 3 + col_stop: 27 + path: compiler-test + content: " return TestMe { x: 0u8 };" + span: + line_start: 16 + line_stop: 18 + col_start: 28 + col_stop: 2 + path: compiler-test + content: "function my_fn() -> TestMe {\n...\n}" + span: + line_start: 16 + line_stop: 18 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function my_fn() -> TestMe {\n...\n}" + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 20 + line_stop: 20 + 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\":\"t\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" + span: + line_start: 21 + line_stop: 21 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + type_: ~ + value: + Call: + function: + CircuitMemberAccess: + circuit: + CircuitInit: + name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" + members: + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" + expression: + Value: + Integer: + - U8 + - "6" + - line_start: 21 + line_stop: 21 + col_start: 26 + col_stop: 29 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + span: + line_start: 21 + line_stop: 21 + col_start: 15 + col_stop: 30 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":31,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" + span: + line_start: 21 + line_stop: 21 + col_start: 15 + col_stop: 38 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + arguments: [] + span: + line_start: 21 + line_stop: 21 + col_start: 15 + col_stop: 40 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + span: + line_start: 21 + line_stop: 21 + col_start: 5 + col_stop: 40 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"u\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" + span: + line_start: 22 + line_stop: 22 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const u = my_fn().test_me();" + type_: ~ + value: + Call: + function: + CircuitMemberAccess: + circuit: + Call: + function: + Identifier: "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":15,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" + arguments: [] + span: + line_start: 22 + line_stop: 22 + col_start: 15 + col_stop: 22 + path: compiler-test + content: " const u = my_fn().test_me();" + name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":23,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" + span: + line_start: 22 + line_stop: 22 + col_start: 15 + col_stop: 30 + path: compiler-test + content: " const u = my_fn().test_me();" + arguments: [] + span: + line_start: 22 + line_stop: 22 + col_start: 15 + col_stop: 32 + path: compiler-test + content: " const u = my_fn().test_me();" + span: + line_start: 22 + line_stop: 22 + col_start: 5 + col_stop: 32 + path: compiler-test + content: " const u = my_fn().test_me();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"v\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const v = TestMe::new().test_me();" + type_: ~ + value: + Call: + function: + CircuitMemberAccess: + circuit: + Call: + function: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" + name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 15 + col_stop: 26 + path: compiler-test + content: " const v = TestMe::new().test_me();" + arguments: [] + span: + line_start: 23 + line_stop: 23 + col_start: 15 + col_stop: 28 + path: compiler-test + content: " const v = TestMe::new().test_me();" + name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":29,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 15 + col_stop: 36 + path: compiler-test + content: " const v = TestMe::new().test_me();" + arguments: [] + span: + line_start: 23 + line_stop: 23 + col_start: 15 + col_stop: 38 + path: compiler-test + content: " const v = TestMe::new().test_me();" + span: + line_start: 23 + line_stop: 23 + col_start: 5 + col_stop: 38 + path: compiler-test + content: " const v = TestMe::new().test_me();" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"v\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return v == 2u8 == y;\\\"}\"}" + right: + Value: + Integer: + - U8 + - "2" + - line_start: 24 + line_stop: 24 + col_start: 17 + col_stop: 20 + path: compiler-test + content: " return v == 2u8 == y;" + op: Eq + span: + line_start: 24 + line_stop: 24 + col_start: 12 + col_stop: 20 + path: compiler-test + content: " return v == 2u8 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return v == 2u8 == y;\\\"}\"}" + op: Eq + span: + line_start: 24 + line_stop: 24 + col_start: 12 + col_stop: 25 + path: compiler-test + content: " return v == 2u8 == y;" + span: + line_start: 24 + line_stop: 24 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " return v == 2u8 == y;" + span: + line_start: 20 + line_stop: 25 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 20 + line_stop: 25 + 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\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}": + circuit_name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}" + 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\":\"test_me\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function test_me(mut self) -> u8 {\\\"}\"}" + input: + - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":22,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function test_me(mut self) -> u8 {\\\"}\"}" + output: + IntegerType: U8 + 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.x += 1;\\\"}\"}" + accesses: + - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " self.x += 1;" + value: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 20 + path: compiler-test + content: " self.x += 1;" + right: + Value: + Integer: + - U8 + - "1" + - line_start: 7 + line_stop: 7 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " self.x += 1;" + op: Add + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 20 + path: compiler-test + content: " self.x += 1;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 20 + path: compiler-test + content: " self.x += 1;" + - Return: + expression: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 16 + col_stop: 22 + path: compiler-test + content: " return self.x;" + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 22 + path: compiler-test + content: " return self.x;" + span: + line_start: 6 + line_stop: 9 + col_start: 38 + col_stop: 6 + path: compiler-test + content: " function test_me(mut self) -> u8 {\n...\n }" + span: + line_start: 6 + line_stop: 9 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function test_me(mut self) -> u8 {\n...\n }\n" + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new() -> Self {\\\"}\"}" + input: [] + output: + Circuit: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}" + block: + statements: + - Return: + expression: + CircuitInit: + name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}" + members: + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { x: 1u8 };\\\"}\"}" + expression: + Value: + Integer: + - U8 + - "1" + - line_start: 12 + line_stop: 12 + col_start: 26 + col_stop: 29 + path: compiler-test + content: " return Self { x: 1u8 };" + span: + line_start: 12 + line_stop: 12 + col_start: 16 + col_stop: 31 + path: compiler-test + content: " return Self { x: 1u8 };" + span: + line_start: 12 + line_stop: 12 + col_start: 9 + col_stop: 31 + path: compiler-test + content: " return Self { x: 1u8 };" + span: + line_start: 11 + line_stop: 13 + col_start: 28 + col_stop: 6 + path: compiler-test + content: " function new() -> Self {\n...\n }" + span: + line_start: 11 + line_stop: 13 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function new() -> Self {\n...\n }" + global_consts: {} + functions: + "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}" + input: [] + output: + Circuit: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":21,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}" + block: + statements: + - Return: + expression: + CircuitInit: + name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":10,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return TestMe { x: 0u8 };\\\"}\"}" + members: + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return TestMe { x: 0u8 };\\\"}\"}" + expression: + Value: + Integer: + - U8 + - "0" + - line_start: 17 + line_stop: 17 + col_start: 22 + col_stop: 25 + path: compiler-test + content: " return TestMe { x: 0u8 };" + span: + line_start: 17 + line_stop: 17 + col_start: 10 + col_stop: 27 + path: compiler-test + content: " return TestMe { x: 0u8 };" + span: + line_start: 17 + line_stop: 17 + col_start: 3 + col_stop: 27 + path: compiler-test + content: " return TestMe { x: 0u8 };" + span: + line_start: 16 + line_stop: 18 + col_start: 28 + col_stop: 2 + path: compiler-test + content: "function my_fn() -> TestMe {\n...\n}" + span: + line_start: 16 + line_stop: 18 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function my_fn() -> TestMe {\n...\n}" + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 20 + line_stop: 20 + 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\":\"t\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" + span: + line_start: 21 + line_stop: 21 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + type_: + IntegerType: U8 + value: + Call: + function: + CircuitMemberAccess: + circuit: + CircuitInit: + name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" + members: + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" + expression: + Value: + Integer: + - U8 + - "6" + - line_start: 21 + line_stop: 21 + col_start: 26 + col_stop: 29 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + span: + line_start: 21 + line_stop: 21 + col_start: 15 + col_stop: 30 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":31,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" + span: + line_start: 21 + line_stop: 21 + col_start: 15 + col_stop: 38 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + arguments: [] + span: + line_start: 21 + line_stop: 21 + col_start: 15 + col_stop: 40 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + span: + line_start: 21 + line_stop: 21 + col_start: 5 + col_stop: 40 + path: compiler-test + content: " const t = TestMe {x: 6u8}.test_me();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"u\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" + span: + line_start: 22 + line_stop: 22 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const u = my_fn().test_me();" + type_: + IntegerType: U8 + value: + Call: + function: + CircuitMemberAccess: + circuit: + Call: + function: + Identifier: "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":15,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" + arguments: [] + span: + line_start: 22 + line_stop: 22 + col_start: 15 + col_stop: 22 + path: compiler-test + content: " const u = my_fn().test_me();" + name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":23,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" + span: + line_start: 22 + line_stop: 22 + col_start: 15 + col_stop: 30 + path: compiler-test + content: " const u = my_fn().test_me();" + arguments: [] + span: + line_start: 22 + line_stop: 22 + col_start: 15 + col_stop: 32 + path: compiler-test + content: " const u = my_fn().test_me();" + span: + line_start: 22 + line_stop: 22 + col_start: 5 + col_stop: 32 + path: compiler-test + content: " const u = my_fn().test_me();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"v\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const v = TestMe::new().test_me();" + type_: + IntegerType: U8 + value: + Call: + function: + CircuitMemberAccess: + circuit: + Call: + function: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" + name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 15 + col_stop: 26 + path: compiler-test + content: " const v = TestMe::new().test_me();" + arguments: [] + span: + line_start: 23 + line_stop: 23 + col_start: 15 + col_stop: 28 + path: compiler-test + content: " const v = TestMe::new().test_me();" + name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":29,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 15 + col_stop: 36 + path: compiler-test + content: " const v = TestMe::new().test_me();" + arguments: [] + span: + line_start: 23 + line_stop: 23 + col_start: 15 + col_stop: 38 + path: compiler-test + content: " const v = TestMe::new().test_me();" + span: + line_start: 23 + line_stop: 23 + col_start: 5 + col_stop: 38 + path: compiler-test + content: " const v = TestMe::new().test_me();" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"v\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return v == 2u8 == y;\\\"}\"}" + right: + Value: + Integer: + - U8 + - "2" + - line_start: 24 + line_stop: 24 + col_start: 17 + col_stop: 20 + path: compiler-test + content: " return v == 2u8 == y;" + op: Eq + span: + line_start: 24 + line_stop: 24 + col_start: 12 + col_stop: 20 + path: compiler-test + content: " return v == 2u8 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return v == 2u8 == y;\\\"}\"}" + op: Eq + span: + line_start: 24 + line_stop: 24 + col_start: 12 + col_stop: 25 + path: compiler-test + content: " return v == 2u8 == y;" + span: + line_start: 24 + line_stop: 24 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " return v == 2u8 == y;" + span: + line_start: 20 + line_stop: 25 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 20 + line_stop: 25 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\n\n\n" diff --git a/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out b/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out index 51c1c16196..2aea77d43b 100644 --- a/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out +++ b/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out @@ -16,3 +16,1484 @@ outputs: r0: type: bool value: "true" + initial_theorem: + name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}": + circuit_name: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" + members: + - CircuitVariable: + - "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" parameters: [u32; 512];\\\"}\"}" + - Array: + - IntegerType: U32 + - - value: "512" + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(parameters: [u32; 512]) -> Self {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(parameters: [u32; 512]) -> Self {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: U32 + - - value: "512" + span: + line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 28 + path: compiler-test + content: " function new(parameters: [u32; 512]) -> 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 { parameters: parameters };\\\"}\"}" + members: + - identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":23,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}" + expression: + Identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":35,\\\"col_stop\\\":45,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 47 + path: compiler-test + content: " return Self { parameters: parameters };" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 47 + path: compiler-test + content: " return Self { parameters: parameters };" + span: + line_start: 6 + line_stop: 8 + col_start: 50 + col_stop: 6 + path: compiler-test + content: " function new(parameters: [u32; 512]) -> Self {\n...\n }" + span: + line_start: 6 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function new(parameters: [u32; 512]) -> Self {\n...\n }" + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" + input: + - ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":19,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" + - Variable: + identifier: "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":31,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Boolean + - - value: "512" + span: + line_start: 10 + line_stop: 10 + col_start: 31 + col_stop: 35 + path: compiler-test + content: " function hash(const self, bits: [bool; 512]) -> u32 {" + output: + IntegerType: U32 + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let digest: u32 = 0;\\\"}\"}" + span: + line_start: 11 + line_stop: 11 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " let digest: u32 = 0;" + type_: + IntegerType: U32 + value: + Value: + Implicit: + - "0" + - line_start: 11 + line_stop: 11 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " let digest: u32 = 0;" + span: + line_start: 11 + line_stop: 11 + col_start: 9 + col_stop: 28 + path: compiler-test + content: " let digest: u32 = 0;" + - Iteration: + variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..512 {\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 12 + line_stop: 12 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " for i in 0..512 {" + stop: + Value: + Implicit: + - "512" + - line_start: 12 + line_stop: 12 + col_start: 21 + col_stop: 24 + path: compiler-test + content: " for i in 0..512 {" + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"base\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + type_: ~ + value: + Ternary: + condition: + ArrayAccess: + array: + Identifier: "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + index: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 24 + col_stop: 31 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + if_true: + ArrayAccess: + array: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":34,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + name: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":39,\\\"col_stop\\\":49,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 34 + col_stop: 49 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + index: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":50,\\\"col_stop\\\":51,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 34 + col_stop: 52 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + if_false: + Value: + Integer: + - U32 + - "0" + - line_start: 13 + line_stop: 13 + col_start: 55 + col_stop: 59 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + span: + line_start: 13 + line_stop: 13 + col_start: 24 + col_stop: 59 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + span: + line_start: 13 + line_stop: 13 + col_start: 13 + col_stop: 59 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + - Assign: + operation: Add + assignee: + identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" + accesses: [] + span: + line_start: 14 + line_stop: 14 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " digest += base;" + value: + Identifier: "{\"name\":\"base\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":23,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" + span: + line_start: 14 + line_stop: 14 + col_start: 13 + col_stop: 27 + path: compiler-test + content: " digest += base;" + span: + line_start: 12 + line_stop: 15 + col_start: 25 + col_stop: 10 + path: compiler-test + content: " for i in 0..512 {\n...\n }" + span: + line_start: 12 + line_stop: 15 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " for i in 0..512 {\n...\n }\n" + - Return: + expression: + Identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":16,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return digest;\\\"}\"}" + span: + line_start: 16 + line_stop: 16 + col_start: 9 + col_stop: 22 + path: compiler-test + content: " return digest;" + span: + line_start: 10 + line_stop: 17 + col_start: 57 + col_stop: 6 + path: compiler-test + content: " function hash(const self, bits: [bool; 512]) -> u32 {\n...\n }" + span: + line_start: 10 + line_stop: 17 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function hash(const self, bits: [bool; 512]) -> u32 {\n...\n }\n\n\n\n\n" + global_consts: {} + functions: + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":15,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Boolean + - - value: "512" + span: + line_start: 21 + line_stop: 21 + col_start: 15 + col_stop: 25 + path: compiler-test + content: "function main(hash_input: [bool; 512]) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":11,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const parameters = [0u32; 512];\\\"}\"}" + span: + line_start: 22 + line_stop: 22 + col_start: 11 + col_stop: 21 + path: compiler-test + content: " const parameters = [0u32; 512];" + type_: ~ + value: + ArrayInit: + element: + Value: + Integer: + - U32 + - "0" + - line_start: 22 + line_stop: 22 + col_start: 25 + col_stop: 29 + path: compiler-test + content: " const parameters = [0u32; 512];" + dimensions: + - value: "512" + span: + line_start: 22 + line_stop: 22 + col_start: 24 + col_stop: 35 + path: compiler-test + content: " const parameters = [0u32; 512];" + span: + line_start: 22 + line_stop: 22 + col_start: 5 + col_stop: 35 + path: compiler-test + content: " const parameters = [0u32; 512];" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 11 + col_stop: 19 + path: compiler-test + content: " const pedersen = PedersenHash::new(parameters);" + type_: ~ + value: + Call: + function: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":22,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" + name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":36,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 22 + col_stop: 39 + path: compiler-test + content: " const pedersen = PedersenHash::new(parameters);" + arguments: + - Identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":40,\\\"col_stop\\\":50,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 22 + col_stop: 51 + path: compiler-test + content: " const pedersen = PedersenHash::new(parameters);" + span: + line_start: 23 + line_stop: 23 + col_start: 5 + col_stop: 51 + path: compiler-test + content: " const pedersen = PedersenHash::new(parameters);" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"res\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" + span: + line_start: 24 + line_stop: 24 + col_start: 9 + col_stop: 12 + path: compiler-test + content: " let res = pedersen.hash(hash_input);" + type_: ~ + value: + Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":15,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" + name: "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" + span: + line_start: 24 + line_stop: 24 + col_start: 15 + col_stop: 28 + path: compiler-test + content: " let res = pedersen.hash(hash_input);" + arguments: + - Identifier: "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":29,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" + span: + line_start: 24 + line_stop: 24 + col_start: 15 + col_stop: 40 + path: compiler-test + content: " let res = pedersen.hash(hash_input);" + span: + line_start: 24 + line_stop: 24 + col_start: 5 + col_stop: 40 + path: compiler-test + content: " let res = pedersen.hash(hash_input);" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"res\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return res == 0u32;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "0" + - line_start: 26 + line_stop: 26 + col_start: 19 + col_stop: 23 + path: compiler-test + content: " return res == 0u32;" + op: Eq + span: + line_start: 26 + line_stop: 26 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return res == 0u32;" + span: + line_start: 26 + line_stop: 26 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return res == 0u32;" + span: + line_start: 21 + line_stop: 27 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(hash_input: [bool; 512]) -> bool {\n...\n}" + span: + line_start: 21 + line_stop: 27 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(hash_input: [bool; 512]) -> bool {\n...\n}\n\n\n\n" + canonicalized_theorem: + name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}": + circuit_name: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" + members: + - CircuitVariable: + - "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" parameters: [u32; 512];\\\"}\"}" + - Array: + - IntegerType: U32 + - - value: "512" + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(parameters: [u32; 512]) -> Self {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(parameters: [u32; 512]) -> Self {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: U32 + - - value: "512" + span: + line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 28 + path: compiler-test + content: " function new(parameters: [u32; 512]) -> Self {" + output: + Circuit: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" + block: + statements: + - Return: + expression: + CircuitInit: + name: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" + members: + - identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":23,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}" + expression: + Identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":35,\\\"col_stop\\\":45,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 47 + path: compiler-test + content: " return Self { parameters: parameters };" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 47 + path: compiler-test + content: " return Self { parameters: parameters };" + span: + line_start: 6 + line_stop: 8 + col_start: 50 + col_stop: 6 + path: compiler-test + content: " function new(parameters: [u32; 512]) -> Self {\n...\n }" + span: + line_start: 6 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function new(parameters: [u32; 512]) -> Self {\n...\n }" + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" + input: + - ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":19,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" + - Variable: + identifier: "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":31,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Boolean + - - value: "512" + span: + line_start: 10 + line_stop: 10 + col_start: 31 + col_stop: 35 + path: compiler-test + content: " function hash(const self, bits: [bool; 512]) -> u32 {" + output: + IntegerType: U32 + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let digest: u32 = 0;\\\"}\"}" + span: + line_start: 11 + line_stop: 11 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " let digest: u32 = 0;" + type_: + IntegerType: U32 + value: + Value: + Implicit: + - "0" + - line_start: 11 + line_stop: 11 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " let digest: u32 = 0;" + span: + line_start: 11 + line_stop: 11 + col_start: 9 + col_stop: 28 + path: compiler-test + content: " let digest: u32 = 0;" + - Iteration: + variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..512 {\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 12 + line_stop: 12 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " for i in 0..512 {" + stop: + Value: + Implicit: + - "512" + - line_start: 12 + line_stop: 12 + col_start: 21 + col_stop: 24 + path: compiler-test + content: " for i in 0..512 {" + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"base\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + type_: ~ + value: + Ternary: + condition: + ArrayAccess: + array: + Identifier: "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + index: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 24 + col_stop: 31 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + if_true: + ArrayAccess: + array: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":34,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + name: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":39,\\\"col_stop\\\":49,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 34 + col_stop: 49 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + index: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":50,\\\"col_stop\\\":51,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 34 + col_stop: 52 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + if_false: + Value: + Integer: + - U32 + - "0" + - line_start: 13 + line_stop: 13 + col_start: 55 + col_stop: 59 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + span: + line_start: 13 + line_stop: 13 + col_start: 24 + col_stop: 59 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + span: + line_start: 13 + line_stop: 13 + col_start: 13 + col_stop: 59 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" + accesses: [] + span: + line_start: 14 + line_stop: 14 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " digest += base;" + value: + Binary: + left: + Identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" + right: + Identifier: "{\"name\":\"base\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":23,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" + op: Add + span: + line_start: 14 + line_stop: 14 + col_start: 13 + col_stop: 27 + path: compiler-test + content: " digest += base;" + span: + line_start: 14 + line_stop: 14 + col_start: 13 + col_stop: 27 + path: compiler-test + content: " digest += base;" + span: + line_start: 12 + line_stop: 15 + col_start: 25 + col_stop: 10 + path: compiler-test + content: " for i in 0..512 {\n...\n }" + span: + line_start: 12 + line_stop: 15 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " for i in 0..512 {\n...\n }\n" + - Return: + expression: + Identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":16,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return digest;\\\"}\"}" + span: + line_start: 16 + line_stop: 16 + col_start: 9 + col_stop: 22 + path: compiler-test + content: " return digest;" + span: + line_start: 10 + line_stop: 17 + col_start: 57 + col_stop: 6 + path: compiler-test + content: " function hash(const self, bits: [bool; 512]) -> u32 {\n...\n }" + span: + line_start: 10 + line_stop: 17 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function hash(const self, bits: [bool; 512]) -> u32 {\n...\n }\n\n\n\n\n" + global_consts: {} + functions: + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":15,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Boolean + - - value: "512" + span: + line_start: 21 + line_stop: 21 + col_start: 15 + col_stop: 25 + path: compiler-test + content: "function main(hash_input: [bool; 512]) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":11,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const parameters = [0u32; 512];\\\"}\"}" + span: + line_start: 22 + line_stop: 22 + col_start: 11 + col_stop: 21 + path: compiler-test + content: " const parameters = [0u32; 512];" + type_: ~ + value: + ArrayInit: + element: + Value: + Integer: + - U32 + - "0" + - line_start: 22 + line_stop: 22 + col_start: 25 + col_stop: 29 + path: compiler-test + content: " const parameters = [0u32; 512];" + dimensions: + - value: "512" + span: + line_start: 22 + line_stop: 22 + col_start: 24 + col_stop: 35 + path: compiler-test + content: " const parameters = [0u32; 512];" + span: + line_start: 22 + line_stop: 22 + col_start: 5 + col_stop: 35 + path: compiler-test + content: " const parameters = [0u32; 512];" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 11 + col_stop: 19 + path: compiler-test + content: " const pedersen = PedersenHash::new(parameters);" + type_: ~ + value: + Call: + function: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":22,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" + name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":36,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 22 + col_stop: 39 + path: compiler-test + content: " const pedersen = PedersenHash::new(parameters);" + arguments: + - Identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":40,\\\"col_stop\\\":50,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 22 + col_stop: 51 + path: compiler-test + content: " const pedersen = PedersenHash::new(parameters);" + span: + line_start: 23 + line_stop: 23 + col_start: 5 + col_stop: 51 + path: compiler-test + content: " const pedersen = PedersenHash::new(parameters);" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"res\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" + span: + line_start: 24 + line_stop: 24 + col_start: 9 + col_stop: 12 + path: compiler-test + content: " let res = pedersen.hash(hash_input);" + type_: ~ + value: + Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":15,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" + name: "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" + span: + line_start: 24 + line_stop: 24 + col_start: 15 + col_stop: 28 + path: compiler-test + content: " let res = pedersen.hash(hash_input);" + arguments: + - Identifier: "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":29,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" + span: + line_start: 24 + line_stop: 24 + col_start: 15 + col_stop: 40 + path: compiler-test + content: " let res = pedersen.hash(hash_input);" + span: + line_start: 24 + line_stop: 24 + col_start: 5 + col_stop: 40 + path: compiler-test + content: " let res = pedersen.hash(hash_input);" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"res\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return res == 0u32;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "0" + - line_start: 26 + line_stop: 26 + col_start: 19 + col_stop: 23 + path: compiler-test + content: " return res == 0u32;" + op: Eq + span: + line_start: 26 + line_stop: 26 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return res == 0u32;" + span: + line_start: 26 + line_stop: 26 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return res == 0u32;" + span: + line_start: 21 + line_stop: 27 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(hash_input: [bool; 512]) -> bool {\n...\n}" + span: + line_start: 21 + line_stop: 27 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(hash_input: [bool; 512]) -> bool {\n...\n}\n\n\n\n" + type_inferenced_theorem: + name: test + expected_input: [] + imports: [] + circuits: + "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}": + circuit_name: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" + members: + - CircuitVariable: + - "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" parameters: [u32; 512];\\\"}\"}" + - Array: + - IntegerType: U32 + - - value: "512" + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(parameters: [u32; 512]) -> Self {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(parameters: [u32; 512]) -> Self {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: U32 + - - value: "512" + span: + line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 28 + path: compiler-test + content: " function new(parameters: [u32; 512]) -> Self {" + output: + Circuit: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" + block: + statements: + - Return: + expression: + CircuitInit: + name: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" + members: + - identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":23,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}" + expression: + Identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":35,\\\"col_stop\\\":45,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 47 + path: compiler-test + content: " return Self { parameters: parameters };" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 47 + path: compiler-test + content: " return Self { parameters: parameters };" + span: + line_start: 6 + line_stop: 8 + col_start: 50 + col_stop: 6 + path: compiler-test + content: " function new(parameters: [u32; 512]) -> Self {\n...\n }" + span: + line_start: 6 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function new(parameters: [u32; 512]) -> Self {\n...\n }" + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" + input: + - ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":19,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" + - Variable: + identifier: "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":31,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Boolean + - - value: "512" + span: + line_start: 10 + line_stop: 10 + col_start: 31 + col_stop: 35 + path: compiler-test + content: " function hash(const self, bits: [bool; 512]) -> u32 {" + output: + IntegerType: U32 + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let digest: u32 = 0;\\\"}\"}" + span: + line_start: 11 + line_stop: 11 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " let digest: u32 = 0;" + type_: + IntegerType: U32 + value: + Value: + Integer: + - U32 + - "0" + - line_start: 11 + line_stop: 11 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " let digest: u32 = 0;" + span: + line_start: 11 + line_stop: 11 + col_start: 9 + col_stop: 28 + path: compiler-test + content: " let digest: u32 = 0;" + - Iteration: + variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..512 {\\\"}\"}" + start: + Value: + Integer: + - U32 + - "0" + - line_start: 12 + line_stop: 12 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " for i in 0..512 {" + stop: + Value: + Integer: + - U32 + - "512" + - line_start: 12 + line_stop: 12 + col_start: 21 + col_stop: 24 + path: compiler-test + content: " for i in 0..512 {" + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"base\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + type_: + IntegerType: U32 + value: + Ternary: + condition: + ArrayAccess: + array: + Identifier: "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + index: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 24 + col_stop: 31 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + if_true: + ArrayAccess: + array: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":34,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + name: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":39,\\\"col_stop\\\":49,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 34 + col_stop: 49 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + index: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":50,\\\"col_stop\\\":51,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 34 + col_stop: 52 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + if_false: + Value: + Integer: + - U32 + - "0" + - line_start: 13 + line_stop: 13 + col_start: 55 + col_stop: 59 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + span: + line_start: 13 + line_stop: 13 + col_start: 24 + col_stop: 59 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + span: + line_start: 13 + line_stop: 13 + col_start: 13 + col_stop: 59 + path: compiler-test + content: " let base = bits[i] ? self.parameters[i] : 0u32;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" + accesses: [] + span: + line_start: 14 + line_stop: 14 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " digest += base;" + value: + Binary: + left: + Identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" + right: + Identifier: "{\"name\":\"base\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":23,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" + op: Add + span: + line_start: 14 + line_stop: 14 + col_start: 13 + col_stop: 27 + path: compiler-test + content: " digest += base;" + span: + line_start: 14 + line_stop: 14 + col_start: 13 + col_stop: 27 + path: compiler-test + content: " digest += base;" + span: + line_start: 12 + line_stop: 15 + col_start: 25 + col_stop: 10 + path: compiler-test + content: " for i in 0..512 {\n...\n }" + span: + line_start: 12 + line_stop: 15 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " for i in 0..512 {\n...\n }\n" + - Return: + expression: + Identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":16,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return digest;\\\"}\"}" + span: + line_start: 16 + line_stop: 16 + col_start: 9 + col_stop: 22 + path: compiler-test + content: " return digest;" + span: + line_start: 10 + line_stop: 17 + col_start: 57 + col_stop: 6 + path: compiler-test + content: " function hash(const self, bits: [bool; 512]) -> u32 {\n...\n }" + span: + line_start: 10 + line_stop: 17 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function hash(const self, bits: [bool; 512]) -> u32 {\n...\n }\n\n\n\n\n" + global_consts: {} + functions: + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":15,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Boolean + - - value: "512" + span: + line_start: 21 + line_stop: 21 + col_start: 15 + col_stop: 25 + path: compiler-test + content: "function main(hash_input: [bool; 512]) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":11,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const parameters = [0u32; 512];\\\"}\"}" + span: + line_start: 22 + line_stop: 22 + col_start: 11 + col_stop: 21 + path: compiler-test + content: " const parameters = [0u32; 512];" + type_: + Array: + - IntegerType: U32 + - - value: "512" + value: + ArrayInit: + element: + Value: + Integer: + - U32 + - "0" + - line_start: 22 + line_stop: 22 + col_start: 25 + col_stop: 29 + path: compiler-test + content: " const parameters = [0u32; 512];" + dimensions: + - value: "512" + span: + line_start: 22 + line_stop: 22 + col_start: 24 + col_stop: 35 + path: compiler-test + content: " const parameters = [0u32; 512];" + span: + line_start: 22 + line_stop: 22 + col_start: 5 + col_stop: 35 + path: compiler-test + content: " const parameters = [0u32; 512];" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 11 + col_stop: 19 + path: compiler-test + content: " const pedersen = PedersenHash::new(parameters);" + type_: + Circuit: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" + value: + Call: + function: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":22,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" + name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":36,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 22 + col_stop: 39 + path: compiler-test + content: " const pedersen = PedersenHash::new(parameters);" + arguments: + - Identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":40,\\\"col_stop\\\":50,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" + span: + line_start: 23 + line_stop: 23 + col_start: 22 + col_stop: 51 + path: compiler-test + content: " const pedersen = PedersenHash::new(parameters);" + span: + line_start: 23 + line_stop: 23 + col_start: 5 + col_stop: 51 + path: compiler-test + content: " const pedersen = PedersenHash::new(parameters);" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"res\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" + span: + line_start: 24 + line_stop: 24 + col_start: 9 + col_stop: 12 + path: compiler-test + content: " let res = pedersen.hash(hash_input);" + type_: + IntegerType: U32 + value: + Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":15,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" + name: "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" + span: + line_start: 24 + line_stop: 24 + col_start: 15 + col_stop: 28 + path: compiler-test + content: " let res = pedersen.hash(hash_input);" + arguments: + - Identifier: "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":29,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" + span: + line_start: 24 + line_stop: 24 + col_start: 15 + col_stop: 40 + path: compiler-test + content: " let res = pedersen.hash(hash_input);" + span: + line_start: 24 + line_stop: 24 + col_start: 5 + col_stop: 40 + path: compiler-test + content: " let res = pedersen.hash(hash_input);" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"res\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return res == 0u32;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "0" + - line_start: 26 + line_stop: 26 + col_start: 19 + col_stop: 23 + path: compiler-test + content: " return res == 0u32;" + op: Eq + span: + line_start: 26 + line_stop: 26 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return res == 0u32;" + span: + line_start: 26 + line_stop: 26 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return res == 0u32;" + span: + line_start: 21 + line_stop: 27 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(hash_input: [bool; 512]) -> bool {\n...\n}" + span: + line_start: 21 + line_stop: 27 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(hash_input: [bool; 512]) -> bool {\n...\n}\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/circuits/self_member.leo.out b/tests/expectations/compiler/compiler/circuits/self_member.leo.out index b9b6741851..6362b2de99 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/console/assert.leo.out b/tests/expectations/compiler/compiler/console/assert.leo.out index d7bb5b5651..dfce25db88 100644 --- a/tests/expectations/compiler/compiler/console/assert.leo.out +++ b/tests/expectations/compiler/compiler/console/assert.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/console/conditional_assert.leo.out b/tests/expectations/compiler/compiler/console/conditional_assert.leo.out index 042b72aef2..c32c1f786a 100644 --- a/tests/expectations/compiler/compiler/console/conditional_assert.leo.out +++ b/tests/expectations/compiler/compiler/console/conditional_assert.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/console/debug.leo.out b/tests/expectations/compiler/compiler/console/debug.leo.out index b9b6741851..b5d85a9473 100644 --- a/tests/expectations/compiler/compiler/console/debug.leo.out +++ b/tests/expectations/compiler/compiler/console/debug.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/console/error.leo.out b/tests/expectations/compiler/compiler/console/error.leo.out index b9b6741851..7b9e61dadc 100644 --- a/tests/expectations/compiler/compiler/console/error.leo.out +++ b/tests/expectations/compiler/compiler/console/error.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/console/log.leo.out b/tests/expectations/compiler/compiler/console/log.leo.out index b9b6741851..f63951cffd 100644 --- a/tests/expectations/compiler/compiler/console/log.leo.out +++ b/tests/expectations/compiler/compiler/console/log.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/console/log_conditional.leo.out b/tests/expectations/compiler/compiler/console/log_conditional.leo.out index d9359f5bb1..c5c3326d29 100644 --- a/tests/expectations/compiler/compiler/console/log_conditional.leo.out +++ b/tests/expectations/compiler/compiler/console/log_conditional.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/console/log_input.leo.out b/tests/expectations/compiler/compiler/console/log_input.leo.out index b9b6741851..89ba5907a8 100644 --- a/tests/expectations/compiler/compiler/console/log_input.leo.out +++ b/tests/expectations/compiler/compiler/console/log_input.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/console/log_parameter.leo.out b/tests/expectations/compiler/compiler/console/log_parameter.leo.out index b9b6741851..f0fae22697 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out index b9b6741851..1df965e2f3 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/definition/out_of_order.leo.out b/tests/expectations/compiler/compiler/definition/out_of_order.leo.out index b9b6741851..0afe69e606 100644 --- a/tests/expectations/compiler/compiler/definition/out_of_order.leo.out +++ b/tests/expectations/compiler/compiler/definition/out_of_order.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out b/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out index b9b6741851..5da5abd884 100644 --- a/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out +++ b/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/field/add.leo.out b/tests/expectations/compiler/compiler/field/add.leo.out index b2d25bf815..c38310a3c5 100644 --- a/tests/expectations/compiler/compiler/field/add.leo.out +++ b/tests/expectations/compiler/compiler/field/add.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/field/div.leo.out b/tests/expectations/compiler/compiler/field/div.leo.out index 49a15b380a..7fbd756b76 100644 --- a/tests/expectations/compiler/compiler/field/div.leo.out +++ b/tests/expectations/compiler/compiler/field/div.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/field/eq.leo.out b/tests/expectations/compiler/compiler/field/eq.leo.out index 9dcbe87829..f1e4bf7630 100644 --- a/tests/expectations/compiler/compiler/field/eq.leo.out +++ b/tests/expectations/compiler/compiler/field/eq.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/field/field.leo.out b/tests/expectations/compiler/compiler/field/field.leo.out index f7461da86f..8ed520a566 100644 --- a/tests/expectations/compiler/compiler/field/field.leo.out +++ b/tests/expectations/compiler/compiler/field/field.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/field/mul.leo.out b/tests/expectations/compiler/compiler/field/mul.leo.out index 6c7beec523..dd8098121f 100644 --- a/tests/expectations/compiler/compiler/field/mul.leo.out +++ b/tests/expectations/compiler/compiler/field/mul.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/field/negate.leo.out b/tests/expectations/compiler/compiler/field/negate.leo.out index eb7c04c512..e6d6f78c8e 100644 --- a/tests/expectations/compiler/compiler/field/negate.leo.out +++ b/tests/expectations/compiler/compiler/field/negate.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/function/array_input.leo.out b/tests/expectations/compiler/compiler/function/array_input.leo.out index b9b6741851..434e041669 100644 --- a/tests/expectations/compiler/compiler/function/array_input.leo.out +++ b/tests/expectations/compiler/compiler/function/array_input.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out b/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out index b9b6741851..7df5aee17d 100644 --- a/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out +++ b/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/function/conditional_return.leo.out b/tests/expectations/compiler/compiler/function/conditional_return.leo.out index 7df9b53406..8f987b3ccd 100644 --- a/tests/expectations/compiler/compiler/function/conditional_return.leo.out +++ b/tests/expectations/compiler/compiler/function/conditional_return.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/function/empty.leo.out b/tests/expectations/compiler/compiler/function/empty.leo.out index b9b6741851..715075a1f9 100644 --- a/tests/expectations/compiler/compiler/function/empty.leo.out +++ b/tests/expectations/compiler/compiler/function/empty.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/function/iteration.leo.out b/tests/expectations/compiler/compiler/function/iteration.leo.out index b9b6741851..6e01c13ac6 100644 --- a/tests/expectations/compiler/compiler/function/iteration.leo.out +++ b/tests/expectations/compiler/compiler/function/iteration.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out index b9b6741851..4028add681 100644 --- a/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out +++ b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns.leo.out index b9b6741851..241d6d0380 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out index 0fee82a9e7..436a12404b 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/function/newlines.leo.out b/tests/expectations/compiler/compiler/function/newlines.leo.out index 6313305a72..79728f6a37 100644 --- a/tests/expectations/compiler/compiler/function/newlines.leo.out +++ b/tests/expectations/compiler/compiler/function/newlines.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/function/repeated.leo.out b/tests/expectations/compiler/compiler/function/repeated.leo.out index b9b6741851..0688f6ddbd 100644 --- a/tests/expectations/compiler/compiler/function/repeated.leo.out +++ b/tests/expectations/compiler/compiler/function/repeated.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/function/return.leo.out b/tests/expectations/compiler/compiler/function/return.leo.out index b9b6741851..ae30fe9263 100644 --- a/tests/expectations/compiler/compiler/function/return.leo.out +++ b/tests/expectations/compiler/compiler/function/return.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out index b9b6741851..1c73cf4025 100644 --- a/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out index b9b6741851..161228d942 100644 --- a/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/function/return_tuple.leo.out b/tests/expectations/compiler/compiler/function/return_tuple.leo.out index 14ac5cbb7c..575c7d5980 100644 --- a/tests/expectations/compiler/compiler/function/return_tuple.leo.out +++ b/tests/expectations/compiler/compiler/function/return_tuple.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out b/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out index 1e514933cf..ab04a65819 100644 --- a/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out +++ b/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/function/value_unchanged.leo.out b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out index b9b6741851..6ab00e5a1e 100644 --- a/tests/expectations/compiler/compiler/function/value_unchanged.leo.out +++ b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out b/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out index 18e9de1712..10f9dea199 100644 --- a/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out +++ b/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out @@ -16,3 +16,4551 @@ outputs: r0: type: bool value: "false" + initial_theorem: + name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}": + circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" + members: + - CircuitVariable: + - "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" width: u32,\\\"}\"}" + - IntegerType: U32 + - CircuitVariable: + - "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" height: u32,\\\"}\"}" + - IntegerType: U32 + global_consts: + basic: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const basic: u32 = 8;\\\"}\"}" + span: + line_start: 3 + line_stop: 3 + col_start: 7 + col_stop: 12 + path: compiler-test + content: "const basic: u32 = 8;" + type_: + IntegerType: U32 + value: + Value: + Implicit: + - "8" + - line_start: 3 + line_stop: 3 + col_start: 20 + col_stop: 21 + path: compiler-test + content: "const basic: u32 = 8;" + span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 21 + path: compiler-test + content: "const basic: u32 = 8;" + array: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const array: [u8; (3, 2)] = [[0u8; 2]; 3];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 7 + col_stop: 12 + path: compiler-test + content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" + type_: + Array: + - IntegerType: U8 + - - value: "3" + - value: "2" + value: + ArrayInit: + element: + ArrayInit: + element: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 31 + col_stop: 34 + path: compiler-test + content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" + dimensions: + - value: "2" + span: + line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 38 + path: compiler-test + content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" + dimensions: + - value: "3" + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 42 + path: compiler-test + content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" + span: + line_start: 4 + line_stop: 4 + col_start: 1 + col_stop: 42 + path: compiler-test + content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" + tuple: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"tuple\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const tuple = (1u32, 2u32);\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 12 + path: compiler-test + content: "const tuple = (1u32, 2u32);" + type_: ~ + value: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "1" + - line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 20 + path: compiler-test + content: "const tuple = (1u32, 2u32);" + - Value: + Integer: + - U32 + - "2" + - line_start: 5 + line_stop: 5 + col_start: 22 + col_stop: 26 + path: compiler-test + content: "const tuple = (1u32, 2u32);" + span: + line_start: 5 + line_stop: 5 + col_start: 15 + col_stop: 27 + path: compiler-test + content: "const tuple = (1u32, 2u32);" + span: + line_start: 5 + line_stop: 5 + col_start: 1 + col_stop: 27 + path: compiler-test + content: "const tuple = (1u32, 2u32);" + "a,b": + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const (a, b) = (1u32, 2u32);\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 9 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + - mutable: false + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const (a, b) = (1u32, 2u32);\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 11 + col_stop: 12 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + type_: ~ + value: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "1" + - line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 21 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + - Value: + Integer: + - U32 + - "2" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 27 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 28 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + span: + line_start: 6 + line_stop: 6 + col_start: 1 + col_stop: 28 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + simple_group: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"simple_group\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const simple_group: group = 1group;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 7 + col_stop: 19 + path: compiler-test + content: "const simple_group: group = 1group;" + type_: Group + value: + Value: + Group: + Single: + - "1" + - line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 35 + path: compiler-test + content: "const simple_group: group = 1group;" + span: + line_start: 7 + line_stop: 7 + col_start: 1 + col_stop: 35 + path: compiler-test + content: "const simple_group: group = 1group;" + complex_group: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"complex_group\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":7,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const complex_group = (_, 1)group;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 7 + col_stop: 20 + path: compiler-test + content: "const complex_group = (_, 1)group;" + type_: ~ + value: + Value: + Group: + Tuple: + x: Inferred + y: + Number: + - "1" + - line_start: 8 + line_stop: 8 + col_start: 27 + col_stop: 28 + path: compiler-test + content: "const complex_group = (_, 1)group;" + span: + line_start: 8 + line_stop: 8 + col_start: 24 + col_stop: 34 + path: compiler-test + content: "const complex_group = (_, 1)group;" + span: + line_start: 8 + line_stop: 8 + col_start: 1 + col_stop: 34 + path: compiler-test + content: "const complex_group = (_, 1)group;" + field_test: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"field_test\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":7,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const field_test: field = 2;\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 7 + col_stop: 17 + path: compiler-test + content: "const field_test: field = 2;" + type_: Field + value: + Value: + Implicit: + - "2" + - line_start: 9 + line_stop: 9 + col_start: 27 + col_stop: 28 + path: compiler-test + content: "const field_test: field = 2;" + span: + line_start: 9 + line_stop: 9 + col_start: 1 + col_stop: 28 + path: compiler-test + content: "const field_test: field = 2;" + use_another_const: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"use_another_const\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":7,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const use_another_const = basic + 1;\\\"}\"}" + span: + line_start: 10 + line_stop: 10 + col_start: 7 + col_stop: 24 + path: compiler-test + content: const use_another_const = basic + 1; + type_: ~ + value: + Binary: + left: + Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":27,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const use_another_const = basic + 1;\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 10 + line_stop: 10 + col_start: 35 + col_stop: 36 + path: compiler-test + content: const use_another_const = basic + 1; + op: Add + span: + line_start: 10 + line_stop: 10 + col_start: 27 + col_stop: 36 + path: compiler-test + content: const use_another_const = basic + 1; + span: + line_start: 10 + line_stop: 10 + col_start: 1 + col_stop: 36 + path: compiler-test + content: const use_another_const = basic + 1; + foo: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" + span: + line_start: 11 + line_stop: 11 + col_start: 7 + col_stop: 10 + path: compiler-test + content: "const foo = Foo { width: 10, height: 20 };" + type_: ~ + value: + CircuitInit: + name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" + members: + - identifier: "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":19,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" + expression: + Value: + Implicit: + - "10" + - line_start: 11 + line_stop: 11 + col_start: 26 + col_stop: 28 + path: compiler-test + content: "const foo = Foo { width: 10, height: 20 };" + - identifier: "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":30,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" + expression: + Value: + Implicit: + - "20" + - line_start: 11 + line_stop: 11 + col_start: 38 + col_stop: 40 + path: compiler-test + content: "const foo = Foo { width: 10, height: 20 };" + span: + line_start: 11 + line_stop: 11 + col_start: 13 + col_stop: 42 + path: compiler-test + content: "const foo = Foo { width: 10, height: 20 };" + span: + line_start: 11 + line_stop: 11 + col_start: 1 + col_stop: 42 + path: compiler-test + content: "const foo = Foo { width: 10, height: 20 };" + uno: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const uno = uno();\\\"}\"}" + span: + line_start: 12 + line_stop: 12 + col_start: 7 + col_stop: 10 + path: compiler-test + content: const uno = uno(); + type_: ~ + value: + Call: + function: + Identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const uno = uno();\\\"}\"}" + arguments: [] + span: + line_start: 12 + line_stop: 12 + col_start: 13 + col_stop: 18 + path: compiler-test + content: const uno = uno(); + span: + line_start: 12 + line_stop: 12 + col_start: 1 + col_stop: 18 + path: compiler-test + content: const uno = uno(); + character: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":7,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const character = 'a';\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 7 + col_stop: 16 + path: compiler-test + content: "const character = 'a';" + type_: ~ + value: + Value: + Char: + character: + Scalar: 97 + span: + line_start: 13 + line_stop: 13 + col_start: 19 + col_stop: 22 + path: compiler-test + content: "const character = 'a';" + span: + line_start: 13 + line_stop: 13 + col_start: 1 + col_stop: 22 + path: compiler-test + content: "const character = 'a';" + hello: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const hello = \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" + span: + line_start: 14 + line_stop: 14 + col_start: 7 + col_stop: 12 + path: compiler-test + content: "const hello = \"Hello, World!\";" + type_: ~ + value: + Value: + String: + - - Scalar: 72 + - Scalar: 101 + - Scalar: 108 + - Scalar: 108 + - Scalar: 111 + - Scalar: 44 + - Scalar: 32 + - Scalar: 87 + - Scalar: 111 + - Scalar: 114 + - Scalar: 108 + - Scalar: 100 + - Scalar: 33 + - line_start: 14 + line_stop: 14 + col_start: 15 + col_stop: 30 + path: compiler-test + content: "const hello = \"Hello, World!\";" + span: + line_start: 14 + line_stop: 14 + col_start: 1 + col_stop: 30 + path: compiler-test + content: "const hello = \"Hello, World!\";" + functions: + "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function uno() -> u32 {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function uno() -> u32 {\\\"}\"}" + input: [] + output: + IntegerType: U32 + block: + statements: + - Return: + expression: + Value: + Integer: + - U32 + - "1" + - line_start: 22 + line_stop: 22 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return 1u32;" + span: + line_start: 22 + line_stop: 22 + col_start: 5 + col_stop: 16 + path: compiler-test + content: " return 1u32;" + span: + line_start: 21 + line_stop: 23 + col_start: 23 + col_stop: 2 + path: compiler-test + content: "function uno() -> u32 {\n...\n}" + span: + line_start: 21 + line_stop: 23 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function uno() -> u32 {\n...\n}" + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"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: 25 + line_stop: 25 + 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\":\"x\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (x, y) = (1u32, 2u32);\\\"}\"}" + span: + line_start: 26 + line_stop: 26 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (x, y) = (1u32, 2u32);\\\"}\"}" + span: + line_start: 26 + line_stop: 26 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + type_: ~ + value: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "1" + - line_start: 26 + line_stop: 26 + col_start: 19 + col_stop: 23 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + - Value: + Integer: + - U32 + - "2" + - line_start: 26 + line_stop: 26 + col_start: 25 + col_stop: 29 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + span: + line_start: 26 + line_stop: 26 + col_start: 18 + col_stop: 30 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + span: + line_start: 26 + line_stop: 26 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + - Return: + expression: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == basic\\\"}\"}" + right: + Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == basic\\\"}\"}" + op: Eq + span: + line_start: 28 + line_stop: 28 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return a == basic" + right: + Binary: + left: + Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && basic == 8u32\\\"}\"}" + right: + Value: + Integer: + - U32 + - "8" + - line_start: 29 + line_stop: 29 + col_start: 21 + col_stop: 25 + path: compiler-test + content: " && basic == 8u32" + op: Eq + span: + line_start: 29 + line_stop: 29 + col_start: 12 + col_stop: 25 + path: compiler-test + content: " && basic == 8u32" + op: And + span: + line_start: 28 + line_stop: 29 + col_start: 12 + col_stop: 25 + path: compiler-test + content: " return a == basic\n && basic == 8u32" + right: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && array[0][0] == 0 // arrays\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 30 + line_stop: 30 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + span: + line_start: 30 + line_stop: 30 + col_start: 12 + col_stop: 20 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + index: + Value: + Implicit: + - "0" + - line_start: 30 + line_stop: 30 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + span: + line_start: 30 + line_stop: 30 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + right: + Value: + Implicit: + - "0" + - line_start: 30 + line_stop: 30 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + op: Eq + span: + line_start: 30 + line_stop: 30 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + op: And + span: + line_start: 28 + line_stop: 30 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays" + right: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && array[2][1] == 0\\\"}\"}" + index: + Value: + Implicit: + - "2" + - line_start: 31 + line_stop: 31 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " && array[2][1] == 0" + span: + line_start: 31 + line_stop: 31 + col_start: 12 + col_stop: 20 + path: compiler-test + content: " && array[2][1] == 0" + index: + Value: + Implicit: + - "1" + - line_start: 31 + line_stop: 31 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " && array[2][1] == 0" + span: + line_start: 31 + line_stop: 31 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " && array[2][1] == 0" + right: + Value: + Implicit: + - "0" + - line_start: 31 + line_stop: 31 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " && array[2][1] == 0" + op: Eq + span: + line_start: 31 + line_stop: 31 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " && array[2][1] == 0" + op: And + span: + line_start: 28 + line_stop: 31 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0" + right: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && x == 1u32 // tuple test\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 32 + line_stop: 32 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && x == 1u32 // tuple test" + op: Eq + span: + line_start: 32 + line_stop: 32 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && x == 1u32 // tuple test" + op: And + span: + line_start: 28 + line_stop: 32 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test" + right: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == 2u32 \\\"}\"}" + right: + Value: + Integer: + - U32 + - "2" + - line_start: 33 + line_stop: 33 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && y == 2u32 " + op: Eq + span: + line_start: 33 + line_stop: 33 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && y == 2u32 " + op: And + span: + line_start: 28 + line_stop: 33 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 " + right: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a == 1u32 // tuple extraction test\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 34 + line_stop: 34 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && a == 1u32 // tuple extraction test" + op: Eq + span: + line_start: 34 + line_stop: 34 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && a == 1u32 // tuple extraction test" + op: And + span: + line_start: 28 + line_stop: 34 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test" + right: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && b == 2u32\\\"}\"}" + right: + Value: + Integer: + - U32 + - "2" + - line_start: 35 + line_stop: 35 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && b == 2u32" + op: Eq + span: + line_start: 35 + line_stop: 35 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && b == 2u32" + op: And + span: + line_start: 28 + line_stop: 35 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32" + right: + Binary: + left: + Identifier: "{\"name\":\"simple_group\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":12,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && simple_group == 1group // group test\\\"}\"}" + right: + Value: + Group: + Single: + - "1" + - line_start: 36 + line_stop: 36 + col_start: 28 + col_stop: 34 + path: compiler-test + content: " && simple_group == 1group // group test" + op: Eq + span: + line_start: 36 + line_stop: 36 + col_start: 12 + col_stop: 34 + path: compiler-test + content: " && simple_group == 1group // group test" + op: And + span: + line_start: 28 + line_stop: 36 + col_start: 12 + col_stop: 34 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test" + right: + Binary: + left: + Identifier: "{\"name\":\"complex_group\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":12,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && complex_group == (_, 1)group\\\"}\"}" + right: + Value: + Group: + Tuple: + x: Inferred + y: + Number: + - "1" + - line_start: 37 + line_stop: 37 + col_start: 33 + col_stop: 34 + path: compiler-test + content: " && complex_group == (_, 1)group" + span: + line_start: 37 + line_stop: 37 + col_start: 30 + col_stop: 40 + path: compiler-test + content: " && complex_group == (_, 1)group" + op: Eq + span: + line_start: 37 + line_stop: 37 + col_start: 12 + col_stop: 40 + path: compiler-test + content: " && complex_group == (_, 1)group" + op: And + span: + line_start: 28 + line_stop: 37 + col_start: 12 + col_stop: 40 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group" + right: + Binary: + left: + Identifier: "{\"name\":\"field_test\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":12,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && field_test == 2field // field test\\\"}\"}" + right: + Value: + Field: + - "2" + - line_start: 38 + line_stop: 38 + col_start: 26 + col_stop: 32 + path: compiler-test + content: " && field_test == 2field // field test" + op: Eq + span: + line_start: 38 + line_stop: 38 + col_start: 12 + col_stop: 32 + path: compiler-test + content: " && field_test == 2field // field test" + op: And + span: + line_start: 28 + line_stop: 38 + col_start: 12 + col_stop: 32 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test" + right: + Binary: + left: + Identifier: "{\"name\":\"use_another_const\",\"span\":\"{\\\"line_start\\\":39,\\\"line_stop\\\":39,\\\"col_start\\\":12,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && use_another_const == 9u32 // use another const test\\\"}\"}" + right: + Value: + Integer: + - U32 + - "9" + - line_start: 39 + line_stop: 39 + col_start: 33 + col_stop: 37 + path: compiler-test + content: " && use_another_const == 9u32 // use another const test" + op: Eq + span: + line_start: 39 + line_stop: 39 + col_start: 12 + col_stop: 37 + path: compiler-test + content: " && use_another_const == 9u32 // use another const test" + op: And + span: + line_start: 28 + line_stop: 39 + col_start: 12 + col_stop: 37 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test" + right: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.width == 10u32 // circuit test\\\"}\"}" + name: "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":16,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.width == 10u32 // circuit test\\\"}\"}" + span: + line_start: 40 + line_stop: 40 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && foo.width == 10u32 // circuit test" + right: + Value: + Integer: + - U32 + - "10" + - line_start: 40 + line_stop: 40 + col_start: 25 + col_stop: 30 + path: compiler-test + content: " && foo.width == 10u32 // circuit test" + op: Eq + span: + line_start: 40 + line_stop: 40 + col_start: 12 + col_stop: 30 + path: compiler-test + content: " && foo.width == 10u32 // circuit test" + op: And + span: + line_start: 28 + line_stop: 40 + col_start: 12 + col_stop: 30 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test" + right: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.height == 20u32\\\"}\"}" + name: "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":16,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.height == 20u32\\\"}\"}" + span: + line_start: 41 + line_stop: 41 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " && foo.height == 20u32" + right: + Value: + Integer: + - U32 + - "20" + - line_start: 41 + line_stop: 41 + col_start: 26 + col_stop: 31 + path: compiler-test + content: " && foo.height == 20u32" + op: Eq + span: + line_start: 41 + line_stop: 41 + col_start: 12 + col_stop: 31 + path: compiler-test + content: " && foo.height == 20u32" + op: And + span: + line_start: 28 + line_stop: 41 + col_start: 12 + col_stop: 31 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32" + right: + Binary: + left: + Identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && uno == 1u32 // function test\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 42 + line_stop: 42 + col_start: 19 + col_stop: 23 + path: compiler-test + content: " && uno == 1u32 // function test" + op: Eq + span: + line_start: 42 + line_stop: 42 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " && uno == 1u32 // function test" + op: And + span: + line_start: 28 + line_stop: 42 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test" + right: + Binary: + left: + Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && character == 'a' // char test\\\"}\"}" + right: + Value: + Char: + character: + Scalar: 97 + span: + line_start: 43 + line_stop: 43 + col_start: 25 + col_stop: 28 + path: compiler-test + content: " && character == 'a' // char test" + op: Eq + span: + line_start: 43 + line_stop: 43 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " && character == 'a' // char test" + op: And + span: + line_start: 28 + line_stop: 43 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test" + right: + Binary: + left: + Identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && hello == \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" + right: + Value: + String: + - - Scalar: 72 + - Scalar: 101 + - Scalar: 108 + - Scalar: 108 + - Scalar: 111 + - Scalar: 44 + - Scalar: 32 + - Scalar: 87 + - Scalar: 111 + - Scalar: 114 + - Scalar: 108 + - Scalar: 100 + - Scalar: 33 + - line_start: 44 + line_stop: 44 + col_start: 21 + col_stop: 36 + path: compiler-test + content: " && hello == \"Hello, World!\";" + op: Eq + span: + line_start: 44 + line_stop: 44 + col_start: 12 + col_stop: 36 + path: compiler-test + content: " && hello == \"Hello, World!\";" + op: And + span: + line_start: 28 + line_stop: 44 + col_start: 12 + col_stop: 36 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test\n && hello == \"Hello, World!\";" + span: + line_start: 28 + line_stop: 44 + col_start: 5 + col_stop: 36 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test\n && hello == \"Hello, World!\";" + span: + line_start: 25 + line_stop: 45 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(a: u32) -> bool {\n...\n}" + span: + line_start: 25 + line_stop: 45 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + canonicalized_theorem: + name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}": + circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" + members: + - CircuitVariable: + - "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" width: u32,\\\"}\"}" + - IntegerType: U32 + - CircuitVariable: + - "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" height: u32,\\\"}\"}" + - IntegerType: U32 + global_consts: + basic: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const basic: u32 = 8;\\\"}\"}" + span: + line_start: 3 + line_stop: 3 + col_start: 7 + col_stop: 12 + path: compiler-test + content: "const basic: u32 = 8;" + type_: + IntegerType: U32 + value: + Value: + Implicit: + - "8" + - line_start: 3 + line_stop: 3 + col_start: 20 + col_stop: 21 + path: compiler-test + content: "const basic: u32 = 8;" + span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 21 + path: compiler-test + content: "const basic: u32 = 8;" + array: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const array: [u8; (3, 2)] = [[0u8; 2]; 3];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 7 + col_stop: 12 + path: compiler-test + content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" + type_: + Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + value: + ArrayInit: + element: + ArrayInit: + element: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 31 + col_stop: 34 + path: compiler-test + content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" + dimensions: + - value: "2" + span: + line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 38 + path: compiler-test + content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" + dimensions: + - value: "3" + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 42 + path: compiler-test + content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" + span: + line_start: 4 + line_stop: 4 + col_start: 1 + col_stop: 42 + path: compiler-test + content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" + tuple: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"tuple\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const tuple = (1u32, 2u32);\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 12 + path: compiler-test + content: "const tuple = (1u32, 2u32);" + type_: ~ + value: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "1" + - line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 20 + path: compiler-test + content: "const tuple = (1u32, 2u32);" + - Value: + Integer: + - U32 + - "2" + - line_start: 5 + line_stop: 5 + col_start: 22 + col_stop: 26 + path: compiler-test + content: "const tuple = (1u32, 2u32);" + span: + line_start: 5 + line_stop: 5 + col_start: 15 + col_stop: 27 + path: compiler-test + content: "const tuple = (1u32, 2u32);" + span: + line_start: 5 + line_stop: 5 + col_start: 1 + col_stop: 27 + path: compiler-test + content: "const tuple = (1u32, 2u32);" + "a,b": + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const (a, b) = (1u32, 2u32);\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 9 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + - mutable: false + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const (a, b) = (1u32, 2u32);\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 11 + col_stop: 12 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + type_: ~ + value: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "1" + - line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 21 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + - Value: + Integer: + - U32 + - "2" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 27 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 28 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + span: + line_start: 6 + line_stop: 6 + col_start: 1 + col_stop: 28 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + simple_group: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"simple_group\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const simple_group: group = 1group;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 7 + col_stop: 19 + path: compiler-test + content: "const simple_group: group = 1group;" + type_: Group + value: + Value: + Group: + Single: + - "1" + - line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 35 + path: compiler-test + content: "const simple_group: group = 1group;" + span: + line_start: 7 + line_stop: 7 + col_start: 1 + col_stop: 35 + path: compiler-test + content: "const simple_group: group = 1group;" + complex_group: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"complex_group\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":7,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const complex_group = (_, 1)group;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 7 + col_stop: 20 + path: compiler-test + content: "const complex_group = (_, 1)group;" + type_: ~ + value: + Value: + Group: + Tuple: + x: Inferred + y: + Number: + - "1" + - line_start: 8 + line_stop: 8 + col_start: 27 + col_stop: 28 + path: compiler-test + content: "const complex_group = (_, 1)group;" + span: + line_start: 8 + line_stop: 8 + col_start: 24 + col_stop: 34 + path: compiler-test + content: "const complex_group = (_, 1)group;" + span: + line_start: 8 + line_stop: 8 + col_start: 1 + col_stop: 34 + path: compiler-test + content: "const complex_group = (_, 1)group;" + field_test: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"field_test\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":7,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const field_test: field = 2;\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 7 + col_stop: 17 + path: compiler-test + content: "const field_test: field = 2;" + type_: Field + value: + Value: + Implicit: + - "2" + - line_start: 9 + line_stop: 9 + col_start: 27 + col_stop: 28 + path: compiler-test + content: "const field_test: field = 2;" + span: + line_start: 9 + line_stop: 9 + col_start: 1 + col_stop: 28 + path: compiler-test + content: "const field_test: field = 2;" + use_another_const: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"use_another_const\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":7,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const use_another_const = basic + 1;\\\"}\"}" + span: + line_start: 10 + line_stop: 10 + col_start: 7 + col_stop: 24 + path: compiler-test + content: const use_another_const = basic + 1; + type_: ~ + value: + Binary: + left: + Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":27,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const use_another_const = basic + 1;\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 10 + line_stop: 10 + col_start: 35 + col_stop: 36 + path: compiler-test + content: const use_another_const = basic + 1; + op: Add + span: + line_start: 10 + line_stop: 10 + col_start: 27 + col_stop: 36 + path: compiler-test + content: const use_another_const = basic + 1; + span: + line_start: 10 + line_stop: 10 + col_start: 1 + col_stop: 36 + path: compiler-test + content: const use_another_const = basic + 1; + foo: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" + span: + line_start: 11 + line_stop: 11 + col_start: 7 + col_stop: 10 + path: compiler-test + content: "const foo = Foo { width: 10, height: 20 };" + type_: ~ + value: + CircuitInit: + name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" + members: + - identifier: "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":19,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" + expression: + Value: + Implicit: + - "10" + - line_start: 11 + line_stop: 11 + col_start: 26 + col_stop: 28 + path: compiler-test + content: "const foo = Foo { width: 10, height: 20 };" + - identifier: "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":30,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" + expression: + Value: + Implicit: + - "20" + - line_start: 11 + line_stop: 11 + col_start: 38 + col_stop: 40 + path: compiler-test + content: "const foo = Foo { width: 10, height: 20 };" + span: + line_start: 11 + line_stop: 11 + col_start: 13 + col_stop: 42 + path: compiler-test + content: "const foo = Foo { width: 10, height: 20 };" + span: + line_start: 11 + line_stop: 11 + col_start: 1 + col_stop: 42 + path: compiler-test + content: "const foo = Foo { width: 10, height: 20 };" + uno: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const uno = uno();\\\"}\"}" + span: + line_start: 12 + line_stop: 12 + col_start: 7 + col_stop: 10 + path: compiler-test + content: const uno = uno(); + type_: ~ + value: + Call: + function: + Identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const uno = uno();\\\"}\"}" + arguments: [] + span: + line_start: 12 + line_stop: 12 + col_start: 13 + col_stop: 18 + path: compiler-test + content: const uno = uno(); + span: + line_start: 12 + line_stop: 12 + col_start: 1 + col_stop: 18 + path: compiler-test + content: const uno = uno(); + character: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":7,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const character = 'a';\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 7 + col_stop: 16 + path: compiler-test + content: "const character = 'a';" + type_: ~ + value: + Value: + Char: + character: + Scalar: 97 + span: + line_start: 13 + line_stop: 13 + col_start: 19 + col_stop: 22 + path: compiler-test + content: "const character = 'a';" + span: + line_start: 13 + line_stop: 13 + col_start: 1 + col_stop: 22 + path: compiler-test + content: "const character = 'a';" + hello: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const hello = \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" + span: + line_start: 14 + line_stop: 14 + col_start: 7 + col_stop: 12 + path: compiler-test + content: "const hello = \"Hello, World!\";" + type_: ~ + value: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 72 + span: + line_start: 14 + line_stop: 14 + col_start: 16 + col_stop: 17 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 14 + line_stop: 14 + col_start: 17 + col_stop: 18 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 14 + line_stop: 14 + col_start: 18 + col_stop: 19 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 14 + line_stop: 14 + col_start: 19 + col_stop: 20 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 14 + line_stop: 14 + col_start: 20 + col_stop: 21 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 44 + span: + line_start: 14 + line_stop: 14 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 14 + line_stop: 14 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 87 + span: + line_start: 14 + line_stop: 14 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 14 + line_stop: 14 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 114 + span: + line_start: 14 + line_stop: 14 + col_start: 25 + col_stop: 26 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 14 + line_stop: 14 + col_start: 26 + col_stop: 27 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 14 + line_stop: 14 + col_start: 27 + col_stop: 28 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 14 + line_stop: 14 + col_start: 28 + col_stop: 29 + path: compiler-test + content: "const hello = \"Hello, World!\";" + span: + line_start: 14 + line_stop: 14 + col_start: 15 + col_stop: 30 + path: compiler-test + content: "const hello = \"Hello, World!\";" + span: + line_start: 14 + line_stop: 14 + col_start: 1 + col_stop: 30 + path: compiler-test + content: "const hello = \"Hello, World!\";" + functions: + "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function uno() -> u32 {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function uno() -> u32 {\\\"}\"}" + input: [] + output: + IntegerType: U32 + block: + statements: + - Return: + expression: + Value: + Integer: + - U32 + - "1" + - line_start: 22 + line_stop: 22 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return 1u32;" + span: + line_start: 22 + line_stop: 22 + col_start: 5 + col_stop: 16 + path: compiler-test + content: " return 1u32;" + span: + line_start: 21 + line_stop: 23 + col_start: 23 + col_stop: 2 + path: compiler-test + content: "function uno() -> u32 {\n...\n}" + span: + line_start: 21 + line_stop: 23 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function uno() -> u32 {\n...\n}" + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"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: 25 + line_stop: 25 + 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\":\"x\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (x, y) = (1u32, 2u32);\\\"}\"}" + span: + line_start: 26 + line_stop: 26 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (x, y) = (1u32, 2u32);\\\"}\"}" + span: + line_start: 26 + line_stop: 26 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + type_: ~ + value: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "1" + - line_start: 26 + line_stop: 26 + col_start: 19 + col_stop: 23 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + - Value: + Integer: + - U32 + - "2" + - line_start: 26 + line_stop: 26 + col_start: 25 + col_stop: 29 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + span: + line_start: 26 + line_stop: 26 + col_start: 18 + col_stop: 30 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + span: + line_start: 26 + line_stop: 26 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + - Return: + expression: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == basic\\\"}\"}" + right: + Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == basic\\\"}\"}" + op: Eq + span: + line_start: 28 + line_stop: 28 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return a == basic" + right: + Binary: + left: + Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && basic == 8u32\\\"}\"}" + right: + Value: + Integer: + - U32 + - "8" + - line_start: 29 + line_stop: 29 + col_start: 21 + col_stop: 25 + path: compiler-test + content: " && basic == 8u32" + op: Eq + span: + line_start: 29 + line_stop: 29 + col_start: 12 + col_stop: 25 + path: compiler-test + content: " && basic == 8u32" + op: And + span: + line_start: 28 + line_stop: 29 + col_start: 12 + col_stop: 25 + path: compiler-test + content: " return a == basic\n && basic == 8u32" + right: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && array[0][0] == 0 // arrays\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 30 + line_stop: 30 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + span: + line_start: 30 + line_stop: 30 + col_start: 12 + col_stop: 20 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + index: + Value: + Implicit: + - "0" + - line_start: 30 + line_stop: 30 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + span: + line_start: 30 + line_stop: 30 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + right: + Value: + Implicit: + - "0" + - line_start: 30 + line_stop: 30 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + op: Eq + span: + line_start: 30 + line_stop: 30 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + op: And + span: + line_start: 28 + line_stop: 30 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays" + right: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && array[2][1] == 0\\\"}\"}" + index: + Value: + Implicit: + - "2" + - line_start: 31 + line_stop: 31 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " && array[2][1] == 0" + span: + line_start: 31 + line_stop: 31 + col_start: 12 + col_stop: 20 + path: compiler-test + content: " && array[2][1] == 0" + index: + Value: + Implicit: + - "1" + - line_start: 31 + line_stop: 31 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " && array[2][1] == 0" + span: + line_start: 31 + line_stop: 31 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " && array[2][1] == 0" + right: + Value: + Implicit: + - "0" + - line_start: 31 + line_stop: 31 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " && array[2][1] == 0" + op: Eq + span: + line_start: 31 + line_stop: 31 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " && array[2][1] == 0" + op: And + span: + line_start: 28 + line_stop: 31 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0" + right: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && x == 1u32 // tuple test\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 32 + line_stop: 32 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && x == 1u32 // tuple test" + op: Eq + span: + line_start: 32 + line_stop: 32 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && x == 1u32 // tuple test" + op: And + span: + line_start: 28 + line_stop: 32 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test" + right: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == 2u32 \\\"}\"}" + right: + Value: + Integer: + - U32 + - "2" + - line_start: 33 + line_stop: 33 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && y == 2u32 " + op: Eq + span: + line_start: 33 + line_stop: 33 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && y == 2u32 " + op: And + span: + line_start: 28 + line_stop: 33 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 " + right: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a == 1u32 // tuple extraction test\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 34 + line_stop: 34 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && a == 1u32 // tuple extraction test" + op: Eq + span: + line_start: 34 + line_stop: 34 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && a == 1u32 // tuple extraction test" + op: And + span: + line_start: 28 + line_stop: 34 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test" + right: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && b == 2u32\\\"}\"}" + right: + Value: + Integer: + - U32 + - "2" + - line_start: 35 + line_stop: 35 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && b == 2u32" + op: Eq + span: + line_start: 35 + line_stop: 35 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && b == 2u32" + op: And + span: + line_start: 28 + line_stop: 35 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32" + right: + Binary: + left: + Identifier: "{\"name\":\"simple_group\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":12,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && simple_group == 1group // group test\\\"}\"}" + right: + Value: + Group: + Single: + - "1" + - line_start: 36 + line_stop: 36 + col_start: 28 + col_stop: 34 + path: compiler-test + content: " && simple_group == 1group // group test" + op: Eq + span: + line_start: 36 + line_stop: 36 + col_start: 12 + col_stop: 34 + path: compiler-test + content: " && simple_group == 1group // group test" + op: And + span: + line_start: 28 + line_stop: 36 + col_start: 12 + col_stop: 34 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test" + right: + Binary: + left: + Identifier: "{\"name\":\"complex_group\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":12,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && complex_group == (_, 1)group\\\"}\"}" + right: + Value: + Group: + Tuple: + x: Inferred + y: + Number: + - "1" + - line_start: 37 + line_stop: 37 + col_start: 33 + col_stop: 34 + path: compiler-test + content: " && complex_group == (_, 1)group" + span: + line_start: 37 + line_stop: 37 + col_start: 30 + col_stop: 40 + path: compiler-test + content: " && complex_group == (_, 1)group" + op: Eq + span: + line_start: 37 + line_stop: 37 + col_start: 12 + col_stop: 40 + path: compiler-test + content: " && complex_group == (_, 1)group" + op: And + span: + line_start: 28 + line_stop: 37 + col_start: 12 + col_stop: 40 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group" + right: + Binary: + left: + Identifier: "{\"name\":\"field_test\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":12,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && field_test == 2field // field test\\\"}\"}" + right: + Value: + Field: + - "2" + - line_start: 38 + line_stop: 38 + col_start: 26 + col_stop: 32 + path: compiler-test + content: " && field_test == 2field // field test" + op: Eq + span: + line_start: 38 + line_stop: 38 + col_start: 12 + col_stop: 32 + path: compiler-test + content: " && field_test == 2field // field test" + op: And + span: + line_start: 28 + line_stop: 38 + col_start: 12 + col_stop: 32 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test" + right: + Binary: + left: + Identifier: "{\"name\":\"use_another_const\",\"span\":\"{\\\"line_start\\\":39,\\\"line_stop\\\":39,\\\"col_start\\\":12,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && use_another_const == 9u32 // use another const test\\\"}\"}" + right: + Value: + Integer: + - U32 + - "9" + - line_start: 39 + line_stop: 39 + col_start: 33 + col_stop: 37 + path: compiler-test + content: " && use_another_const == 9u32 // use another const test" + op: Eq + span: + line_start: 39 + line_stop: 39 + col_start: 12 + col_stop: 37 + path: compiler-test + content: " && use_another_const == 9u32 // use another const test" + op: And + span: + line_start: 28 + line_stop: 39 + col_start: 12 + col_stop: 37 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test" + right: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.width == 10u32 // circuit test\\\"}\"}" + name: "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":16,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.width == 10u32 // circuit test\\\"}\"}" + span: + line_start: 40 + line_stop: 40 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && foo.width == 10u32 // circuit test" + right: + Value: + Integer: + - U32 + - "10" + - line_start: 40 + line_stop: 40 + col_start: 25 + col_stop: 30 + path: compiler-test + content: " && foo.width == 10u32 // circuit test" + op: Eq + span: + line_start: 40 + line_stop: 40 + col_start: 12 + col_stop: 30 + path: compiler-test + content: " && foo.width == 10u32 // circuit test" + op: And + span: + line_start: 28 + line_stop: 40 + col_start: 12 + col_stop: 30 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test" + right: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.height == 20u32\\\"}\"}" + name: "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":16,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.height == 20u32\\\"}\"}" + span: + line_start: 41 + line_stop: 41 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " && foo.height == 20u32" + right: + Value: + Integer: + - U32 + - "20" + - line_start: 41 + line_stop: 41 + col_start: 26 + col_stop: 31 + path: compiler-test + content: " && foo.height == 20u32" + op: Eq + span: + line_start: 41 + line_stop: 41 + col_start: 12 + col_stop: 31 + path: compiler-test + content: " && foo.height == 20u32" + op: And + span: + line_start: 28 + line_stop: 41 + col_start: 12 + col_stop: 31 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32" + right: + Binary: + left: + Identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && uno == 1u32 // function test\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 42 + line_stop: 42 + col_start: 19 + col_stop: 23 + path: compiler-test + content: " && uno == 1u32 // function test" + op: Eq + span: + line_start: 42 + line_stop: 42 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " && uno == 1u32 // function test" + op: And + span: + line_start: 28 + line_stop: 42 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test" + right: + Binary: + left: + Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && character == 'a' // char test\\\"}\"}" + right: + Value: + Char: + character: + Scalar: 97 + span: + line_start: 43 + line_stop: 43 + col_start: 25 + col_stop: 28 + path: compiler-test + content: " && character == 'a' // char test" + op: Eq + span: + line_start: 43 + line_stop: 43 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " && character == 'a' // char test" + op: And + span: + line_start: 28 + line_stop: 43 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test" + right: + Binary: + left: + Identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && hello == \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 72 + span: + line_start: 44 + line_stop: 44 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 44 + line_stop: 44 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 44 + line_stop: 44 + col_start: 24 + col_stop: 25 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 44 + line_stop: 44 + col_start: 25 + col_stop: 26 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 44 + line_stop: 44 + col_start: 26 + col_stop: 27 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 44 + span: + line_start: 44 + line_stop: 44 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 44 + line_stop: 44 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 87 + span: + line_start: 44 + line_stop: 44 + col_start: 29 + col_stop: 30 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 44 + line_stop: 44 + col_start: 30 + col_stop: 31 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 114 + span: + line_start: 44 + line_stop: 44 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 44 + line_stop: 44 + col_start: 32 + col_stop: 33 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 44 + line_stop: 44 + col_start: 33 + col_stop: 34 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 44 + line_stop: 44 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " && hello == \"Hello, World!\";" + span: + line_start: 44 + line_stop: 44 + col_start: 21 + col_stop: 36 + path: compiler-test + content: " && hello == \"Hello, World!\";" + op: Eq + span: + line_start: 44 + line_stop: 44 + col_start: 12 + col_stop: 36 + path: compiler-test + content: " && hello == \"Hello, World!\";" + op: And + span: + line_start: 28 + line_stop: 44 + col_start: 12 + col_stop: 36 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test\n && hello == \"Hello, World!\";" + span: + line_start: 28 + line_stop: 44 + col_start: 5 + col_stop: 36 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test\n && hello == \"Hello, World!\";" + span: + line_start: 25 + line_stop: 45 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(a: u32) -> bool {\n...\n}" + span: + line_start: 25 + line_stop: 45 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + type_inferenced_theorem: + name: test + expected_input: [] + imports: [] + circuits: + "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}": + circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" + members: + - CircuitVariable: + - "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" width: u32,\\\"}\"}" + - IntegerType: U32 + - CircuitVariable: + - "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" height: u32,\\\"}\"}" + - IntegerType: U32 + global_consts: + basic: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const basic: u32 = 8;\\\"}\"}" + span: + line_start: 3 + line_stop: 3 + col_start: 7 + col_stop: 12 + path: compiler-test + content: "const basic: u32 = 8;" + type_: + IntegerType: U32 + value: + Value: + Integer: + - U32 + - "8" + - line_start: 3 + line_stop: 3 + col_start: 20 + col_stop: 21 + path: compiler-test + content: "const basic: u32 = 8;" + span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 21 + path: compiler-test + content: "const basic: u32 = 8;" + array: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const array: [u8; (3, 2)] = [[0u8; 2]; 3];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 7 + col_stop: 12 + path: compiler-test + content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" + type_: + Array: + - Array: + - IntegerType: U8 + - - value: "2" + - - value: "3" + value: + ArrayInit: + element: + ArrayInit: + element: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 31 + col_stop: 34 + path: compiler-test + content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" + dimensions: + - value: "2" + span: + line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 38 + path: compiler-test + content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" + dimensions: + - value: "3" + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 42 + path: compiler-test + content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" + span: + line_start: 4 + line_stop: 4 + col_start: 1 + col_stop: 42 + path: compiler-test + content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" + tuple: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"tuple\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const tuple = (1u32, 2u32);\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 12 + path: compiler-test + content: "const tuple = (1u32, 2u32);" + type_: + Tuple: + - IntegerType: U32 + - IntegerType: U32 + value: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "1" + - line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 20 + path: compiler-test + content: "const tuple = (1u32, 2u32);" + - Value: + Integer: + - U32 + - "2" + - line_start: 5 + line_stop: 5 + col_start: 22 + col_stop: 26 + path: compiler-test + content: "const tuple = (1u32, 2u32);" + span: + line_start: 5 + line_stop: 5 + col_start: 15 + col_stop: 27 + path: compiler-test + content: "const tuple = (1u32, 2u32);" + span: + line_start: 5 + line_stop: 5 + col_start: 1 + col_stop: 27 + path: compiler-test + content: "const tuple = (1u32, 2u32);" + "a,b": + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const (a, b) = (1u32, 2u32);\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 9 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + - mutable: false + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const (a, b) = (1u32, 2u32);\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 11 + col_stop: 12 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + type_: + Tuple: + - IntegerType: U32 + - IntegerType: U32 + value: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "1" + - line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 21 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + - Value: + Integer: + - U32 + - "2" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 27 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 28 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + span: + line_start: 6 + line_stop: 6 + col_start: 1 + col_stop: 28 + path: compiler-test + content: "const (a, b) = (1u32, 2u32);" + simple_group: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"simple_group\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const simple_group: group = 1group;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 7 + col_stop: 19 + path: compiler-test + content: "const simple_group: group = 1group;" + type_: Group + value: + Value: + Group: + Single: + - "1" + - line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 35 + path: compiler-test + content: "const simple_group: group = 1group;" + span: + line_start: 7 + line_stop: 7 + col_start: 1 + col_stop: 35 + path: compiler-test + content: "const simple_group: group = 1group;" + complex_group: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"complex_group\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":7,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const complex_group = (_, 1)group;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 7 + col_stop: 20 + path: compiler-test + content: "const complex_group = (_, 1)group;" + type_: Group + value: + Value: + Group: + Tuple: + x: Inferred + y: + Number: + - "1" + - line_start: 8 + line_stop: 8 + col_start: 27 + col_stop: 28 + path: compiler-test + content: "const complex_group = (_, 1)group;" + span: + line_start: 8 + line_stop: 8 + col_start: 24 + col_stop: 34 + path: compiler-test + content: "const complex_group = (_, 1)group;" + span: + line_start: 8 + line_stop: 8 + col_start: 1 + col_stop: 34 + path: compiler-test + content: "const complex_group = (_, 1)group;" + field_test: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"field_test\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":7,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const field_test: field = 2;\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 7 + col_stop: 17 + path: compiler-test + content: "const field_test: field = 2;" + type_: Field + value: + Value: + Field: + - "2" + - line_start: 9 + line_stop: 9 + col_start: 27 + col_stop: 28 + path: compiler-test + content: "const field_test: field = 2;" + span: + line_start: 9 + line_stop: 9 + col_start: 1 + col_stop: 28 + path: compiler-test + content: "const field_test: field = 2;" + use_another_const: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"use_another_const\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":7,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const use_another_const = basic + 1;\\\"}\"}" + span: + line_start: 10 + line_stop: 10 + col_start: 7 + col_stop: 24 + path: compiler-test + content: const use_another_const = basic + 1; + type_: + IntegerType: U32 + value: + Binary: + left: + Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":27,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const use_another_const = basic + 1;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 10 + line_stop: 10 + col_start: 35 + col_stop: 36 + path: compiler-test + content: const use_another_const = basic + 1; + op: Add + span: + line_start: 10 + line_stop: 10 + col_start: 27 + col_stop: 36 + path: compiler-test + content: const use_another_const = basic + 1; + span: + line_start: 10 + line_stop: 10 + col_start: 1 + col_stop: 36 + path: compiler-test + content: const use_another_const = basic + 1; + foo: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" + span: + line_start: 11 + line_stop: 11 + col_start: 7 + col_stop: 10 + path: compiler-test + content: "const foo = Foo { width: 10, height: 20 };" + type_: + Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" + value: + CircuitInit: + name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" + members: + - identifier: "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":19,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" + expression: + Value: + Integer: + - U32 + - "10" + - line_start: 11 + line_stop: 11 + col_start: 26 + col_stop: 28 + path: compiler-test + content: "const foo = Foo { width: 10, height: 20 };" + - identifier: "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":30,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" + expression: + Value: + Integer: + - U32 + - "20" + - line_start: 11 + line_stop: 11 + col_start: 38 + col_stop: 40 + path: compiler-test + content: "const foo = Foo { width: 10, height: 20 };" + span: + line_start: 11 + line_stop: 11 + col_start: 13 + col_stop: 42 + path: compiler-test + content: "const foo = Foo { width: 10, height: 20 };" + span: + line_start: 11 + line_stop: 11 + col_start: 1 + col_stop: 42 + path: compiler-test + content: "const foo = Foo { width: 10, height: 20 };" + uno: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const uno = uno();\\\"}\"}" + span: + line_start: 12 + line_stop: 12 + col_start: 7 + col_stop: 10 + path: compiler-test + content: const uno = uno(); + type_: + IntegerType: U32 + value: + Call: + function: + Identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const uno = uno();\\\"}\"}" + arguments: [] + span: + line_start: 12 + line_stop: 12 + col_start: 13 + col_stop: 18 + path: compiler-test + content: const uno = uno(); + span: + line_start: 12 + line_stop: 12 + col_start: 1 + col_stop: 18 + path: compiler-test + content: const uno = uno(); + character: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":7,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const character = 'a';\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 7 + col_stop: 16 + path: compiler-test + content: "const character = 'a';" + type_: Char + value: + Value: + Char: + character: + Scalar: 97 + span: + line_start: 13 + line_stop: 13 + col_start: 19 + col_stop: 22 + path: compiler-test + content: "const character = 'a';" + span: + line_start: 13 + line_stop: 13 + col_start: 1 + col_stop: 22 + path: compiler-test + content: "const character = 'a';" + hello: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const hello = \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" + span: + line_start: 14 + line_stop: 14 + col_start: 7 + col_stop: 12 + path: compiler-test + content: "const hello = \"Hello, World!\";" + type_: + Array: + - Char + - - value: "13" + value: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 72 + span: + line_start: 14 + line_stop: 14 + col_start: 16 + col_stop: 17 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 14 + line_stop: 14 + col_start: 17 + col_stop: 18 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 14 + line_stop: 14 + col_start: 18 + col_stop: 19 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 14 + line_stop: 14 + col_start: 19 + col_stop: 20 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 14 + line_stop: 14 + col_start: 20 + col_stop: 21 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 44 + span: + line_start: 14 + line_stop: 14 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 14 + line_stop: 14 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 87 + span: + line_start: 14 + line_stop: 14 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 14 + line_stop: 14 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 114 + span: + line_start: 14 + line_stop: 14 + col_start: 25 + col_stop: 26 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 14 + line_stop: 14 + col_start: 26 + col_stop: 27 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 14 + line_stop: 14 + col_start: 27 + col_stop: 28 + path: compiler-test + content: "const hello = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 14 + line_stop: 14 + col_start: 28 + col_stop: 29 + path: compiler-test + content: "const hello = \"Hello, World!\";" + span: + line_start: 14 + line_stop: 14 + col_start: 15 + col_stop: 30 + path: compiler-test + content: "const hello = \"Hello, World!\";" + span: + line_start: 14 + line_stop: 14 + col_start: 1 + col_stop: 30 + path: compiler-test + content: "const hello = \"Hello, World!\";" + functions: + "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function uno() -> u32 {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function uno() -> u32 {\\\"}\"}" + input: [] + output: + IntegerType: U32 + block: + statements: + - Return: + expression: + Value: + Integer: + - U32 + - "1" + - line_start: 22 + line_stop: 22 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return 1u32;" + span: + line_start: 22 + line_stop: 22 + col_start: 5 + col_stop: 16 + path: compiler-test + content: " return 1u32;" + span: + line_start: 21 + line_stop: 23 + col_start: 23 + col_stop: 2 + path: compiler-test + content: "function uno() -> u32 {\n...\n}" + span: + line_start: 21 + line_stop: 23 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function uno() -> u32 {\n...\n}" + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"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: 25 + line_stop: 25 + 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\":\"x\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (x, y) = (1u32, 2u32);\\\"}\"}" + span: + line_start: 26 + line_stop: 26 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (x, y) = (1u32, 2u32);\\\"}\"}" + span: + line_start: 26 + line_stop: 26 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + type_: + Tuple: + - IntegerType: U32 + - IntegerType: U32 + value: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "1" + - line_start: 26 + line_stop: 26 + col_start: 19 + col_stop: 23 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + - Value: + Integer: + - U32 + - "2" + - line_start: 26 + line_stop: 26 + col_start: 25 + col_stop: 29 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + span: + line_start: 26 + line_stop: 26 + col_start: 18 + col_stop: 30 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + span: + line_start: 26 + line_stop: 26 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " let (x, y) = (1u32, 2u32);" + - Return: + expression: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == basic\\\"}\"}" + right: + Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == basic\\\"}\"}" + op: Eq + span: + line_start: 28 + line_stop: 28 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return a == basic" + right: + Binary: + left: + Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && basic == 8u32\\\"}\"}" + right: + Value: + Integer: + - U32 + - "8" + - line_start: 29 + line_stop: 29 + col_start: 21 + col_stop: 25 + path: compiler-test + content: " && basic == 8u32" + op: Eq + span: + line_start: 29 + line_stop: 29 + col_start: 12 + col_stop: 25 + path: compiler-test + content: " && basic == 8u32" + op: And + span: + line_start: 28 + line_stop: 29 + col_start: 12 + col_stop: 25 + path: compiler-test + content: " return a == basic\n && basic == 8u32" + right: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && array[0][0] == 0 // arrays\\\"}\"}" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 30 + line_stop: 30 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + span: + line_start: 30 + line_stop: 30 + col_start: 12 + col_stop: 20 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 30 + line_stop: 30 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + span: + line_start: 30 + line_stop: 30 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + right: + Value: + Integer: + - U8 + - "0" + - line_start: 30 + line_stop: 30 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + op: Eq + span: + line_start: 30 + line_stop: 30 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " && array[0][0] == 0 // arrays" + op: And + span: + line_start: 28 + line_stop: 30 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays" + right: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && array[2][1] == 0\\\"}\"}" + index: + Value: + Integer: + - U32 + - "2" + - line_start: 31 + line_stop: 31 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " && array[2][1] == 0" + span: + line_start: 31 + line_stop: 31 + col_start: 12 + col_stop: 20 + path: compiler-test + content: " && array[2][1] == 0" + index: + Value: + Integer: + - U32 + - "1" + - line_start: 31 + line_stop: 31 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " && array[2][1] == 0" + span: + line_start: 31 + line_stop: 31 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " && array[2][1] == 0" + right: + Value: + Integer: + - U8 + - "0" + - line_start: 31 + line_stop: 31 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " && array[2][1] == 0" + op: Eq + span: + line_start: 31 + line_stop: 31 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " && array[2][1] == 0" + op: And + span: + line_start: 28 + line_stop: 31 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0" + right: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && x == 1u32 // tuple test\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 32 + line_stop: 32 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && x == 1u32 // tuple test" + op: Eq + span: + line_start: 32 + line_stop: 32 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && x == 1u32 // tuple test" + op: And + span: + line_start: 28 + line_stop: 32 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test" + right: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == 2u32 \\\"}\"}" + right: + Value: + Integer: + - U32 + - "2" + - line_start: 33 + line_stop: 33 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && y == 2u32 " + op: Eq + span: + line_start: 33 + line_stop: 33 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && y == 2u32 " + op: And + span: + line_start: 28 + line_stop: 33 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 " + right: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a == 1u32 // tuple extraction test\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 34 + line_stop: 34 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && a == 1u32 // tuple extraction test" + op: Eq + span: + line_start: 34 + line_stop: 34 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && a == 1u32 // tuple extraction test" + op: And + span: + line_start: 28 + line_stop: 34 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test" + right: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && b == 2u32\\\"}\"}" + right: + Value: + Integer: + - U32 + - "2" + - line_start: 35 + line_stop: 35 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && b == 2u32" + op: Eq + span: + line_start: 35 + line_stop: 35 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && b == 2u32" + op: And + span: + line_start: 28 + line_stop: 35 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32" + right: + Binary: + left: + Identifier: "{\"name\":\"simple_group\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":12,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && simple_group == 1group // group test\\\"}\"}" + right: + Value: + Group: + Single: + - "1" + - line_start: 36 + line_stop: 36 + col_start: 28 + col_stop: 34 + path: compiler-test + content: " && simple_group == 1group // group test" + op: Eq + span: + line_start: 36 + line_stop: 36 + col_start: 12 + col_stop: 34 + path: compiler-test + content: " && simple_group == 1group // group test" + op: And + span: + line_start: 28 + line_stop: 36 + col_start: 12 + col_stop: 34 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test" + right: + Binary: + left: + Identifier: "{\"name\":\"complex_group\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":12,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && complex_group == (_, 1)group\\\"}\"}" + right: + Value: + Group: + Tuple: + x: Inferred + y: + Number: + - "1" + - line_start: 37 + line_stop: 37 + col_start: 33 + col_stop: 34 + path: compiler-test + content: " && complex_group == (_, 1)group" + span: + line_start: 37 + line_stop: 37 + col_start: 30 + col_stop: 40 + path: compiler-test + content: " && complex_group == (_, 1)group" + op: Eq + span: + line_start: 37 + line_stop: 37 + col_start: 12 + col_stop: 40 + path: compiler-test + content: " && complex_group == (_, 1)group" + op: And + span: + line_start: 28 + line_stop: 37 + col_start: 12 + col_stop: 40 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group" + right: + Binary: + left: + Identifier: "{\"name\":\"field_test\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":12,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && field_test == 2field // field test\\\"}\"}" + right: + Value: + Field: + - "2" + - line_start: 38 + line_stop: 38 + col_start: 26 + col_stop: 32 + path: compiler-test + content: " && field_test == 2field // field test" + op: Eq + span: + line_start: 38 + line_stop: 38 + col_start: 12 + col_stop: 32 + path: compiler-test + content: " && field_test == 2field // field test" + op: And + span: + line_start: 28 + line_stop: 38 + col_start: 12 + col_stop: 32 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test" + right: + Binary: + left: + Identifier: "{\"name\":\"use_another_const\",\"span\":\"{\\\"line_start\\\":39,\\\"line_stop\\\":39,\\\"col_start\\\":12,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && use_another_const == 9u32 // use another const test\\\"}\"}" + right: + Value: + Integer: + - U32 + - "9" + - line_start: 39 + line_stop: 39 + col_start: 33 + col_stop: 37 + path: compiler-test + content: " && use_another_const == 9u32 // use another const test" + op: Eq + span: + line_start: 39 + line_stop: 39 + col_start: 12 + col_stop: 37 + path: compiler-test + content: " && use_another_const == 9u32 // use another const test" + op: And + span: + line_start: 28 + line_stop: 39 + col_start: 12 + col_stop: 37 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test" + right: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.width == 10u32 // circuit test\\\"}\"}" + name: "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":16,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.width == 10u32 // circuit test\\\"}\"}" + span: + line_start: 40 + line_stop: 40 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && foo.width == 10u32 // circuit test" + right: + Value: + Integer: + - U32 + - "10" + - line_start: 40 + line_stop: 40 + col_start: 25 + col_stop: 30 + path: compiler-test + content: " && foo.width == 10u32 // circuit test" + op: Eq + span: + line_start: 40 + line_stop: 40 + col_start: 12 + col_stop: 30 + path: compiler-test + content: " && foo.width == 10u32 // circuit test" + op: And + span: + line_start: 28 + line_stop: 40 + col_start: 12 + col_stop: 30 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test" + right: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.height == 20u32\\\"}\"}" + name: "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":16,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.height == 20u32\\\"}\"}" + span: + line_start: 41 + line_stop: 41 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " && foo.height == 20u32" + right: + Value: + Integer: + - U32 + - "20" + - line_start: 41 + line_stop: 41 + col_start: 26 + col_stop: 31 + path: compiler-test + content: " && foo.height == 20u32" + op: Eq + span: + line_start: 41 + line_stop: 41 + col_start: 12 + col_stop: 31 + path: compiler-test + content: " && foo.height == 20u32" + op: And + span: + line_start: 28 + line_stop: 41 + col_start: 12 + col_stop: 31 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32" + right: + Binary: + left: + Identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && uno == 1u32 // function test\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 42 + line_stop: 42 + col_start: 19 + col_stop: 23 + path: compiler-test + content: " && uno == 1u32 // function test" + op: Eq + span: + line_start: 42 + line_stop: 42 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " && uno == 1u32 // function test" + op: And + span: + line_start: 28 + line_stop: 42 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test" + right: + Binary: + left: + Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && character == 'a' // char test\\\"}\"}" + right: + Value: + Char: + character: + Scalar: 97 + span: + line_start: 43 + line_stop: 43 + col_start: 25 + col_stop: 28 + path: compiler-test + content: " && character == 'a' // char test" + op: Eq + span: + line_start: 43 + line_stop: 43 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " && character == 'a' // char test" + op: And + span: + line_start: 28 + line_stop: 43 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test" + right: + Binary: + left: + Identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && hello == \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 72 + span: + line_start: 44 + line_stop: 44 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 44 + line_stop: 44 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 44 + line_stop: 44 + col_start: 24 + col_stop: 25 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 44 + line_stop: 44 + col_start: 25 + col_stop: 26 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 44 + line_stop: 44 + col_start: 26 + col_stop: 27 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 44 + span: + line_start: 44 + line_stop: 44 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 44 + line_stop: 44 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 87 + span: + line_start: 44 + line_stop: 44 + col_start: 29 + col_stop: 30 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 44 + line_stop: 44 + col_start: 30 + col_stop: 31 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 114 + span: + line_start: 44 + line_stop: 44 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 44 + line_stop: 44 + col_start: 32 + col_stop: 33 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 44 + line_stop: 44 + col_start: 33 + col_stop: 34 + path: compiler-test + content: " && hello == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 44 + line_stop: 44 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " && hello == \"Hello, World!\";" + span: + line_start: 44 + line_stop: 44 + col_start: 21 + col_stop: 36 + path: compiler-test + content: " && hello == \"Hello, World!\";" + op: Eq + span: + line_start: 44 + line_stop: 44 + col_start: 12 + col_stop: 36 + path: compiler-test + content: " && hello == \"Hello, World!\";" + op: And + span: + line_start: 28 + line_stop: 44 + col_start: 12 + col_stop: 36 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test\n && hello == \"Hello, World!\";" + span: + line_start: 28 + line_stop: 44 + col_start: 5 + col_stop: 36 + path: compiler-test + content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test\n && hello == \"Hello, World!\";" + span: + line_start: 25 + line_stop: 45 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(a: u32) -> bool {\n...\n}" + span: + line_start: 25 + line_stop: 45 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out index d78efc7c73..23bca74e7b 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out index dbeaf93fae..2d51d9001a 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out index affe8fd229..06c2f7aa2e 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out index 540ef1782d..c708787a32 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out index cb46b9203e..6c7dad39ad 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out index b7dec511c8..7ac14841ca 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out @@ -16,3 +16,1299 @@ 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; (2, 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(x: [i16; (2, 2, 3)]) -> 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; (2, 2, 3)]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: I16 + - - value: "2" + - value: "2" + - value: "3" + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(x: [i16; (2, 2, 3)]) -> bool {" + output: Boolean + block: + statements: + - Console: + function: + Log: + parts: + - Const: "x: " + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"x: {}\\\\\\\", x);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " console.log(\"x: {}\", x);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " console.log(\"x: {}\", x);" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + type_: + Array: + - IntegerType: I16 + - - value: "2" + - value: "2" + - value: "3" + value: + ArrayInit: + element: + Value: + Integer: + - I16 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 34 + col_stop: 38 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + dimensions: + - value: "2" + - value: "2" + - value: "3" + span: + line_start: 6 + line_stop: 6 + col_start: 33 + col_stop: 50 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 50 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + - Console: + function: + Log: + parts: + - Const: "y: " + - Container + parameters: + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"y: {}\\\\\\\", y);\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " console.log(\"y: {}\", y);" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " console.log(\"y: {}\", y);" + - Return: + expression: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 26 + col_stop: 30 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 26 + col_stop: 33 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 26 + col_stop: 36 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 36 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 9 + line_stop: 9 + col_start: 42 + col_stop: 43 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 40 + col_stop: 44 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "1" + - line_start: 9 + line_stop: 9 + col_start: 45 + col_stop: 46 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 40 + col_stop: 47 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "2" + - line_start: 9 + line_stop: 9 + col_start: 48 + col_stop: 49 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 40 + col_stop: 50 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":54,\\\"col_stop\\\":55,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 9 + line_stop: 9 + col_start: 56 + col_stop: 57 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 54 + col_stop: 58 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "1" + - line_start: 9 + line_stop: 9 + col_start: 59 + col_stop: 60 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 54 + col_stop: 61 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "2" + - line_start: 9 + line_stop: 9 + col_start: 62 + col_stop: 63 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 54 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 40 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: And + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 3 + line_stop: 10 + col_start: 44 + col_stop: 2 + path: compiler-test + content: "function main(x: [i16; (2, 2, 3)]) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 10 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: [i16; (2, 2, 3)]) -> 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(x: [i16; (2, 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(x: [i16; (2, 2, 3)]) -> 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; (2, 2, 3)]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Array: + - Array: + - IntegerType: I16 + - - value: "3" + - - value: "2" + - - value: "2" + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(x: [i16; (2, 2, 3)]) -> bool {" + output: Boolean + block: + statements: + - Console: + function: + Log: + parts: + - Const: "x: " + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"x: {}\\\\\\\", x);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " console.log(\"x: {}\", x);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " console.log(\"x: {}\", x);" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + type_: + Array: + - Array: + - Array: + - IntegerType: I16 + - - value: "3" + - - value: "2" + - - value: "2" + value: + ArrayInit: + element: + ArrayInit: + element: + ArrayInit: + element: + Value: + Integer: + - I16 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 34 + col_stop: 38 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + dimensions: + - value: "3" + span: + line_start: 6 + line_stop: 6 + col_start: 33 + col_stop: 50 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + dimensions: + - value: "2" + span: + line_start: 6 + line_stop: 6 + col_start: 33 + col_stop: 50 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + dimensions: + - value: "2" + span: + line_start: 6 + line_stop: 6 + col_start: 33 + col_stop: 50 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 50 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + - Console: + function: + Log: + parts: + - Const: "y: " + - Container + parameters: + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"y: {}\\\\\\\", y);\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " console.log(\"y: {}\", y);" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " console.log(\"y: {}\", y);" + - Return: + expression: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 26 + col_stop: 30 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 26 + col_stop: 33 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 26 + col_stop: 36 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 36 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 9 + line_stop: 9 + col_start: 42 + col_stop: 43 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 40 + col_stop: 44 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "1" + - line_start: 9 + line_stop: 9 + col_start: 45 + col_stop: 46 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 40 + col_stop: 47 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "2" + - line_start: 9 + line_stop: 9 + col_start: 48 + col_stop: 49 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 40 + col_stop: 50 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":54,\\\"col_stop\\\":55,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 9 + line_stop: 9 + col_start: 56 + col_stop: 57 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 54 + col_stop: 58 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "1" + - line_start: 9 + line_stop: 9 + col_start: 59 + col_stop: 60 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 54 + col_stop: 61 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "2" + - line_start: 9 + line_stop: 9 + col_start: 62 + col_stop: 63 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 54 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 40 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: And + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 3 + line_stop: 10 + col_start: 44 + col_stop: 2 + path: compiler-test + content: "function main(x: [i16; (2, 2, 3)]) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 10 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: [i16; (2, 2, 3)]) -> 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(x: [i16; (2, 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(x: [i16; (2, 2, 3)]) -> 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; (2, 2, 3)]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Array: + - Array: + - IntegerType: I16 + - - value: "3" + - - value: "2" + - - value: "2" + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(x: [i16; (2, 2, 3)]) -> bool {" + output: Boolean + block: + statements: + - Console: + function: + Log: + parts: + - Const: "x: " + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"x: {}\\\\\\\", x);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " console.log(\"x: {}\", x);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " console.log(\"x: {}\", x);" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + type_: + Array: + - Array: + - Array: + - IntegerType: I16 + - - value: "3" + - - value: "2" + - - value: "2" + value: + ArrayInit: + element: + ArrayInit: + element: + ArrayInit: + element: + Value: + Integer: + - I16 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 34 + col_stop: 38 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + dimensions: + - value: "3" + span: + line_start: 6 + line_stop: 6 + col_start: 33 + col_stop: 50 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + dimensions: + - value: "2" + span: + line_start: 6 + line_stop: 6 + col_start: 33 + col_stop: 50 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + dimensions: + - value: "2" + span: + line_start: 6 + line_stop: 6 + col_start: 33 + col_stop: 50 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 50 + path: compiler-test + content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" + - Console: + function: + Log: + parts: + - Const: "y: " + - Container + parameters: + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"y: {}\\\\\\\", y);\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 27 + path: compiler-test + content: " console.log(\"y: {}\", y);" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " console.log(\"y: {}\", y);" + - Return: + expression: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 9 + line_stop: 9 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 9 + line_stop: 9 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 9 + line_stop: 9 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 9 + line_stop: 9 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 26 + col_stop: 30 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 9 + line_stop: 9 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 26 + col_stop: 33 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 9 + line_stop: 9 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 26 + col_stop: 36 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 36 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Integer: + - U32 + - "1" + - line_start: 9 + line_stop: 9 + col_start: 42 + col_stop: 43 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 40 + col_stop: 44 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "1" + - line_start: 9 + line_stop: 9 + col_start: 45 + col_stop: 46 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 40 + col_stop: 47 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "2" + - line_start: 9 + line_stop: 9 + col_start: 48 + col_stop: 49 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 40 + col_stop: 50 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":54,\\\"col_stop\\\":55,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Integer: + - U32 + - "1" + - line_start: 9 + line_stop: 9 + col_start: 56 + col_stop: 57 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 54 + col_stop: 58 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "1" + - line_start: 9 + line_stop: 9 + col_start: 59 + col_stop: 60 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 54 + col_stop: 61 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "2" + - line_start: 9 + line_stop: 9 + col_start: 62 + col_stop: 63 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 54 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 40 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: And + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 3 + line_stop: 10 + col_start: 44 + col_stop: 2 + path: compiler-test + content: "function main(x: [i16; (2, 2, 3)]) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 10 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: [i16; (2, 2, 3)]) -> bool {\n...\n}\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out index 3f6e72c3bc..57aa17e8a8 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out index 9f46f19787..8df10fca5c 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out index 9326008186..1b157d941f 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out index 16b6ce6bb4..df3de426fd 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out @@ -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}" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out index 187b24114a..b13abeff08 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out @@ -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" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out index d78efc7c73..b3cc41785c 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out @@ -16,3 +16,285 @@ 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(const 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(const a: bool, b: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, b: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: bool, b: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, b: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 30 + col_stop: 31 + path: compiler-test + content: "function main(const a: bool, b: bool) -> 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 == true == b;\\\"}\"}" + right: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " return a == true == b;" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == true == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 26 + path: compiler-test + content: " return a == true == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " return a == true == b;" + span: + line_start: 3 + line_stop: 5 + col_start: 47 + col_stop: 2 + path: compiler-test + content: "function main(const 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(const 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(const 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(const a: bool, b: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, b: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: bool, b: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, b: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 30 + col_stop: 31 + path: compiler-test + content: "function main(const a: bool, b: bool) -> 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 == true == b;\\\"}\"}" + right: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " return a == true == b;" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == true == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 26 + path: compiler-test + content: " return a == true == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " return a == true == b;" + span: + line_start: 3 + line_stop: 5 + col_start: 47 + col_stop: 2 + path: compiler-test + content: "function main(const 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(const 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(const 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(const a: bool, b: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, b: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: bool, b: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, b: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 30 + col_stop: 31 + path: compiler-test + content: "function main(const a: bool, b: bool) -> 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 == true == b;\\\"}\"}" + right: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " return a == true == b;" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == true == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 26 + path: compiler-test + content: " return a == true == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " return a == true == b;" + span: + line_start: 3 + line_stop: 5 + col_start: 47 + col_stop: 2 + path: compiler-test + content: "function main(const 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(const a: bool, b: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out index d75d62b8b6..de1bfcd5e5 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out @@ -16,3 +16,419 @@ 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(const x: [i16; 1], 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(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: + Array: + - IntegerType: I16 + - - value: "1" + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const x: [i16; 1], y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 34 + col_stop: 35 + path: compiler-test + content: "function main(const x: [i16; 1], y: bool) -> bool {" + output: Boolean + block: + statements: + - Console: + function: + Log: + parts: + - Const: "" + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 24 + path: compiler-test + content: " console.log(\"{}\", x);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " console.log(\"{}\", x);" + - Return: + expression: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0] == 0 == y;\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 5 + line_stop: 5 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " return x[0] == 0 == y;" + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return x[0] == 0 == y;" + right: + Value: + Implicit: + - "0" + - line_start: 5 + line_stop: 5 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " return x[0] == 0 == y;" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return x[0] == 0 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0] == 0 == y;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 26 + path: compiler-test + content: " return x[0] == 0 == y;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " return x[0] == 0 == y;" + span: + line_start: 3 + line_stop: 6 + col_start: 51 + col_stop: 2 + path: compiler-test + content: "function main(const x: [i16; 1], y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(const x: [i16; 1], 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(const x: [i16; 1], 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(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: + Array: + - IntegerType: I16 + - - value: "1" + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const x: [i16; 1], y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 34 + col_stop: 35 + path: compiler-test + content: "function main(const x: [i16; 1], y: bool) -> bool {" + output: Boolean + block: + statements: + - Console: + function: + Log: + parts: + - Const: "" + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 24 + path: compiler-test + content: " console.log(\"{}\", x);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " console.log(\"{}\", x);" + - Return: + expression: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0] == 0 == y;\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 5 + line_stop: 5 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " return x[0] == 0 == y;" + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return x[0] == 0 == y;" + right: + Value: + Implicit: + - "0" + - line_start: 5 + line_stop: 5 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " return x[0] == 0 == y;" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return x[0] == 0 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0] == 0 == y;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 26 + path: compiler-test + content: " return x[0] == 0 == y;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " return x[0] == 0 == y;" + span: + line_start: 3 + line_stop: 6 + col_start: 51 + col_stop: 2 + path: compiler-test + content: "function main(const x: [i16; 1], y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(const x: [i16; 1], 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(const x: [i16; 1], 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(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: + Array: + - IntegerType: I16 + - - value: "1" + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const x: [i16; 1], y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 34 + col_stop: 35 + path: compiler-test + content: "function main(const x: [i16; 1], y: bool) -> bool {" + output: Boolean + block: + statements: + - Console: + function: + Log: + parts: + - Const: "" + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 24 + path: compiler-test + content: " console.log(\"{}\", x);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " console.log(\"{}\", x);" + - Return: + expression: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0] == 0 == y;\\\"}\"}" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " return x[0] == 0 == y;" + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return x[0] == 0 == y;" + right: + Value: + Integer: + - I16 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " return x[0] == 0 == y;" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return x[0] == 0 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0] == 0 == y;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 26 + path: compiler-test + content: " return x[0] == 0 == y;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " return x[0] == 0 == y;" + span: + line_start: 3 + line_stop: 6 + col_start: 51 + col_stop: 2 + path: compiler-test + content: "function main(const x: [i16; 1], y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(const x: [i16; 1], y: bool) -> bool {\n...\n}\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out index cd9948cce2..a87b6a37c2 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out @@ -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(const 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(const a: char, y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: char, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Char + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: char, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: char, y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 30 + col_stop: 31 + path: compiler-test + content: "function main(const 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(const 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(const 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(const 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(const a: char, y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: char, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Char + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: char, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: char, y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 30 + col_stop: 31 + path: compiler-test + content: "function main(const 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(const 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(const 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(const 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(const a: char, y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: char, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Char + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: char, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: char, y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 30 + col_stop: 31 + path: compiler-test + content: "function main(const 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(const 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(const a: char, y: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out index 460734c111..a3ebe4cab5 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out @@ -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(const a: field, const 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(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Field + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: field, const b: field, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Field + span: + line_start: 3 + line_stop: 3 + col_start: 37 + col_stop: 38 + path: compiler-test + content: "function main(const a: field, const b: field, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":47,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 47 + col_stop: 48 + path: compiler-test + content: "function main(const a: field, const 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: 64 + col_stop: 2 + path: compiler-test + content: "function main(const a: field, const 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(const a: field, const 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(const a: field, const 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(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Field + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: field, const b: field, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Field + span: + line_start: 3 + line_stop: 3 + col_start: 37 + col_stop: 38 + path: compiler-test + content: "function main(const a: field, const b: field, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":47,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 47 + col_stop: 48 + path: compiler-test + content: "function main(const a: field, const 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: 64 + col_stop: 2 + path: compiler-test + content: "function main(const a: field, const 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(const a: field, const 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(const a: field, const 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(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Field + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: field, const b: field, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Field + span: + line_start: 3 + line_stop: 3 + col_start: 37 + col_stop: 38 + path: compiler-test + content: "function main(const a: field, const b: field, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":47,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 47 + col_stop: 48 + path: compiler-test + content: "function main(const a: field, const 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: 64 + col_stop: 2 + path: compiler-test + content: "function main(const a: field, const 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(const a: field, const b: field, y: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out index 89fbb0f9a4..46f94575eb 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out @@ -16,3 +16,519 @@ 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(const a: group, const b: group, const c: group, 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(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Group + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Group + span: + line_start: 3 + line_stop: 3 + col_start: 37 + col_stop: 38 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":53,\\\"col_stop\\\":54,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Group + span: + line_start: 3 + line_stop: 3 + col_start: 53 + col_stop: 54 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":63,\\\"col_stop\\\":64,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 63 + col_stop: 64 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" + output: Boolean + 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);" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}" + right: + Value: + Boolean: + - "true" + - line_start: 9 + line_stop: 9 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " return y == true;" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return y == true;" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " return y == true;" + span: + line_start: 3 + line_stop: 10 + col_start: 80 + col_stop: 2 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 10 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, 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(const a: group, const b: group, const c: group, 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(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Group + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Group + span: + line_start: 3 + line_stop: 3 + col_start: 37 + col_stop: 38 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":53,\\\"col_stop\\\":54,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Group + span: + line_start: 3 + line_stop: 3 + col_start: 53 + col_stop: 54 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":63,\\\"col_stop\\\":64,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 63 + col_stop: 64 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" + output: Boolean + 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);" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}" + right: + Value: + Boolean: + - "true" + - line_start: 9 + line_stop: 9 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " return y == true;" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return y == true;" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " return y == true;" + span: + line_start: 3 + line_stop: 10 + col_start: 80 + col_stop: 2 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 10 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, 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(const a: group, const b: group, const c: group, 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(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Group + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Group + span: + line_start: 3 + line_stop: 3 + col_start: 37 + col_stop: 38 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":53,\\\"col_stop\\\":54,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Group + span: + line_start: 3 + line_stop: 3 + col_start: 53 + col_stop: 54 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":63,\\\"col_stop\\\":64,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 63 + col_stop: 64 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" + output: Boolean + 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);" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}" + right: + Value: + Boolean: + - "true" + - line_start: 9 + line_stop: 9 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " return y == true;" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return y == true;" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " return y == true;" + span: + line_start: 3 + line_stop: 10 + col_start: 80 + col_stop: 2 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 10 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {\n...\n}\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out index b7dec511c8..f05a7e68a8 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out @@ -16,3 +16,1031 @@ 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(const x: [i16; (2, 2, 3)], y: [i16; (2, 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(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: + Array: + - IntegerType: I16 + - - value: "2" + - value: "2" + - value: "3" + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: I16 + - - value: "2" + - value: "2" + - value: "3" + span: + line_start: 3 + line_stop: 3 + col_start: 42 + col_stop: 43 + path: compiler-test + content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + 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][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 26 + col_stop: 30 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 26 + col_stop: 33 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 26 + col_stop: 36 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 36 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 43 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 44 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "1" + - line_start: 4 + line_stop: 4 + col_start: 45 + col_stop: 46 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 47 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "2" + - line_start: 4 + line_stop: 4 + col_start: 48 + col_stop: 49 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 50 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":54,\\\"col_stop\\\":55,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 4 + line_stop: 4 + col_start: 56 + col_stop: 57 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 54 + col_stop: 58 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "1" + - line_start: 4 + line_stop: 4 + col_start: 59 + col_stop: 60 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 54 + col_stop: 61 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "2" + - line_start: 4 + line_stop: 4 + col_start: 62 + col_stop: 63 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 54 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: And + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 3 + line_stop: 5 + col_start: 71 + col_stop: 2 + path: compiler-test + content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> 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(const x: [i16; (2, 2, 3)], y: [i16; (2, 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(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: + Array: + - Array: + - Array: + - IntegerType: I16 + - - value: "3" + - - value: "2" + - - value: "2" + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Array: + - Array: + - IntegerType: I16 + - - value: "3" + - - value: "2" + - - value: "2" + span: + line_start: 3 + line_stop: 3 + col_start: 42 + col_stop: 43 + path: compiler-test + content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + 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][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 26 + col_stop: 30 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 26 + col_stop: 33 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 26 + col_stop: 36 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 36 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 43 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 44 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "1" + - line_start: 4 + line_stop: 4 + col_start: 45 + col_stop: 46 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 47 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "2" + - line_start: 4 + line_stop: 4 + col_start: 48 + col_stop: 49 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 50 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":54,\\\"col_stop\\\":55,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 4 + line_stop: 4 + col_start: 56 + col_stop: 57 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 54 + col_stop: 58 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "1" + - line_start: 4 + line_stop: 4 + col_start: 59 + col_stop: 60 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 54 + col_stop: 61 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Implicit: + - "2" + - line_start: 4 + line_stop: 4 + col_start: 62 + col_stop: 63 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 54 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: And + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 3 + line_stop: 5 + col_start: 71 + col_stop: 2 + path: compiler-test + content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> 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(const x: [i16; (2, 2, 3)], y: [i16; (2, 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(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: + Array: + - Array: + - Array: + - IntegerType: I16 + - - value: "3" + - - value: "2" + - - value: "2" + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Array: + - Array: + - IntegerType: I16 + - - value: "3" + - - value: "2" + - - value: "2" + span: + line_start: 3 + line_stop: 3 + col_start: 42 + col_stop: 43 + path: compiler-test + content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + 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][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + 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][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 26 + col_stop: 30 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 26 + col_stop: 33 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 26 + col_stop: 36 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 36 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + Binary: + left: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 43 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 44 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 45 + col_stop: 46 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 47 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 48 + col_stop: 49 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 50 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + right: + ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":54,\\\"col_stop\\\":55,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" + index: + Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 56 + col_stop: 57 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 54 + col_stop: 58 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 59 + col_stop: 60 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 54 + col_stop: 61 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + index: + Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 62 + col_stop: 63 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 54 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + op: And + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 64 + path: compiler-test + content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" + span: + line_start: 3 + line_stop: 5 + col_start: 71 + col_stop: 2 + path: compiler-test + content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out index ad02b7c3e4..c3138e4d00 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out @@ -16,3 +16,297 @@ 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(const a: bool, const b: bool, 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(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: bool, const b: bool, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":36,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 36 + col_stop: 37 + path: compiler-test + content: "function main(const a: bool, const b: bool, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":45,\\\"col_stop\\\":46,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 45 + col_stop: 46 + path: compiler-test + content: "function main(const a: bool, const b: bool, y: bool) -> 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 == y;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == y;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == y;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == y;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == y;" + span: + line_start: 3 + line_stop: 5 + col_start: 62 + col_stop: 2 + path: compiler-test + content: "function main(const a: bool, const b: bool, y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(const a: bool, const b: bool, 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(const a: bool, const b: bool, 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(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: bool, const b: bool, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":36,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 36 + col_stop: 37 + path: compiler-test + content: "function main(const a: bool, const b: bool, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":45,\\\"col_stop\\\":46,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 45 + col_stop: 46 + path: compiler-test + content: "function main(const a: bool, const b: bool, y: bool) -> 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 == y;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == y;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == y;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == y;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == y;" + span: + line_start: 3 + line_stop: 5 + col_start: 62 + col_stop: 2 + path: compiler-test + content: "function main(const a: bool, const b: bool, y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(const a: bool, const b: bool, 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(const a: bool, const b: bool, 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(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: bool, const b: bool, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":36,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 36 + col_stop: 37 + path: compiler-test + content: "function main(const a: bool, const b: bool, y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":45,\\\"col_stop\\\":46,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 45 + col_stop: 46 + path: compiler-test + content: "function main(const a: bool, const b: bool, y: bool) -> 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 == y;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == y;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == y;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == y;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == y;" + span: + line_start: 3 + line_stop: 5 + col_start: 62 + col_stop: 2 + path: compiler-test + content: "function main(const a: bool, const b: bool, y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(const a: bool, const b: bool, y: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out index 779efcb6ea..c27c9c0c2c 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out @@ -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(const 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(const a: [char; 5], y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: [char; 5], y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: + Array: + - Char + - - value: "5" + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: [char; 5], 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(const a: [char; 5], 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(const 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: 52 + col_stop: 2 + path: compiler-test + content: "function main(const 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(const 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(const 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(const a: [char; 5], y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: [char; 5], y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: + Array: + - Char + - - value: "5" + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: [char; 5], 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(const a: [char; 5], 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(const 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: 52 + col_stop: 2 + path: compiler-test + content: "function main(const 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(const 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(const 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(const a: [char; 5], y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: [char; 5], y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: + Array: + - Char + - - value: "5" + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const a: [char; 5], 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(const a: [char; 5], 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(const 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: 52 + col_stop: 2 + path: compiler-test + content: "function main(const 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(const a: [char; 5], y: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out index 3edfe39ca8..68ab21f1cd 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out @@ -16,3 +16,554 @@ 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(const x: (u8, bool, u8), 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(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: + Tuple: + - IntegerType: U8 + - Boolean + - IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const x: (u8, bool, u8), y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(const x: (u8, bool, u8), y: bool) -> 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: 57 + col_stop: 2 + path: compiler-test + content: "function main(const x: (u8, bool, u8), y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(const x: (u8, bool, u8), 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(const x: (u8, bool, u8), 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(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: + Tuple: + - IntegerType: U8 + - Boolean + - IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const x: (u8, bool, u8), y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(const x: (u8, bool, u8), y: bool) -> 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: 57 + col_stop: 2 + path: compiler-test + content: "function main(const x: (u8, bool, u8), y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(const x: (u8, bool, u8), 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(const x: (u8, bool, u8), 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(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" + const_: true + mutable: false + type_: + Tuple: + - IntegerType: U8 + - Boolean + - IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 21 + col_stop: 22 + path: compiler-test + content: "function main(const x: (u8, bool, u8), y: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(const x: (u8, bool, u8), y: bool) -> 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: 57 + col_stop: 2 + path: compiler-test + content: "function main(const x: (u8, bool, u8), y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(const x: (u8, bool, u8), y: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out index 9a500d9abd..eee3e244de 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out @@ -16,3 +16,183 @@ outputs: r2: type: "[[u8; 4]; 2]" value: "\"[0, 0, 0, 0][0, 0, 0, 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(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}": + 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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}" + 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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Array: + - IntegerType: U8 + - - value: "4" + - - value: "2" + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {" + output: + Array: + - Array: + - IntegerType: U8 + - - value: "4" + - - value: "2" + block: + statements: + - Return: + expression: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " return a;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {\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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}": + 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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}" + 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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Array: + - IntegerType: U8 + - - value: "4" + - - value: "2" + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {" + output: + Array: + - Array: + - IntegerType: U8 + - - value: "4" + - - value: "2" + block: + statements: + - Return: + expression: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " return a;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {\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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}": + 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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}" + 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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Array: + - IntegerType: U8 + - - value: "4" + - - value: "2" + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {" + output: + Array: + - Array: + - IntegerType: U8 + - - value: "4" + - - value: "2" + block: + statements: + - Return: + expression: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " return a;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {\n...\n}" diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out index d538ad5c86..34e9fa881a 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out @@ -16,3 +16,222 @@ outputs: r: type: u8 value: "101" + 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) -> u8 {\\\"}\"}": + 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) -> u8 {\\\"}\"}" + 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) -> u8 {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8) -> u8 {" + output: + IntegerType: U8 + block: + statements: + - Return: + expression: + Binary: + left: + Value: + Integer: + - U8 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 15 + path: compiler-test + content: " return 1u8 + a;" + right: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return 1u8 + a;\\\"}\"}" + op: Add + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return 1u8 + a;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " return 1u8 + a;" + span: + line_start: 3 + line_stop: 5 + col_start: 28 + col_stop: 2 + path: compiler-test + content: "function main(a: u8) -> u8 {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8) -> u8 {\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) -> u8 {\\\"}\"}": + 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) -> u8 {\\\"}\"}" + 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) -> u8 {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8) -> u8 {" + output: + IntegerType: U8 + block: + statements: + - Return: + expression: + Binary: + left: + Value: + Integer: + - U8 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 15 + path: compiler-test + content: " return 1u8 + a;" + right: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return 1u8 + a;\\\"}\"}" + op: Add + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return 1u8 + a;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " return 1u8 + a;" + span: + line_start: 3 + line_stop: 5 + col_start: 28 + col_stop: 2 + path: compiler-test + content: "function main(a: u8) -> u8 {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8) -> u8 {\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) -> u8 {\\\"}\"}": + 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) -> u8 {\\\"}\"}" + 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) -> u8 {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8) -> u8 {" + output: + IntegerType: U8 + block: + statements: + - Return: + expression: + Binary: + left: + Value: + Integer: + - U8 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 15 + path: compiler-test + content: " return 1u8 + a;" + right: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return 1u8 + a;\\\"}\"}" + op: Add + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return 1u8 + a;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " return 1u8 + a;" + span: + line_start: 3 + line_stop: 5 + col_start: 28 + col_stop: 2 + path: compiler-test + content: "function main(a: u8) -> u8 {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8) -> u8 {\n...\n}" diff --git a/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out index 3981affaa5..ab5918bc4f 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out @@ -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() -> 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 {\\\"}\"}" + input: [] + output: Boolean + block: + statements: + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 19 + path: compiler-test + content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" + type_: Address + value: + Value: + Address: + - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 + - line_start: 4 + line_stop: 4 + col_start: 31 + col_stop: 94 + path: compiler-test + content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 94 + path: compiler-test + content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" + - Return: + expression: + Binary: + left: + 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\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" + name: "{\"name\":\"state\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return input.state.root == [0u8; 32] " + name: "{\"name\":\"root\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return input.state.root == [0u8; 32] " + right: + ArrayInit: + element: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 33 + col_stop: 36 + path: compiler-test + content: " return input.state.root == [0u8; 32] " + dimensions: + - value: "32" + span: + line_start: 6 + line_stop: 6 + col_start: 32 + col_stop: 41 + path: compiler-test + content: " return input.state.root == [0u8; 32] " + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 41 + path: compiler-test + content: " return input.state.root == [0u8; 32] " + 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: 6 + line_stop: 7 + col_start: 12 + col_stop: 46 + path: compiler-test + content: " return input.state.root == [0u8; 32] \n && input.state_leaf.network_id == 0u8;" + span: + line_start: 6 + line_stop: 7 + col_start: 5 + col_stop: 46 + path: compiler-test + content: " return input.state.root == [0u8; 32] \n && input.state_leaf.network_id == 0u8;" + span: + line_start: 3 + line_stop: 8 + col_start: 25 + col_stop: 2 + path: compiler-test + content: "function main() -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 8 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main() -> 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() -> 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 {\\\"}\"}" + input: [] + output: Boolean + block: + statements: + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 19 + path: compiler-test + content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" + type_: Address + value: + Value: + Address: + - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 + - line_start: 4 + line_stop: 4 + col_start: 31 + col_stop: 94 + path: compiler-test + content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 94 + path: compiler-test + content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" + - Return: + expression: + Binary: + left: + 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\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" + name: "{\"name\":\"state\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return input.state.root == [0u8; 32] " + name: "{\"name\":\"root\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return input.state.root == [0u8; 32] " + right: + ArrayInit: + element: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 33 + col_stop: 36 + path: compiler-test + content: " return input.state.root == [0u8; 32] " + dimensions: + - value: "32" + span: + line_start: 6 + line_stop: 6 + col_start: 32 + col_stop: 41 + path: compiler-test + content: " return input.state.root == [0u8; 32] " + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 41 + path: compiler-test + content: " return input.state.root == [0u8; 32] " + 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: 6 + line_stop: 7 + col_start: 12 + col_stop: 46 + path: compiler-test + content: " return input.state.root == [0u8; 32] \n && input.state_leaf.network_id == 0u8;" + span: + line_start: 6 + line_stop: 7 + col_start: 5 + col_stop: 46 + path: compiler-test + content: " return input.state.root == [0u8; 32] \n && input.state_leaf.network_id == 0u8;" + span: + line_start: 3 + line_stop: 8 + col_start: 25 + col_stop: 2 + path: compiler-test + content: "function main() -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 8 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main() -> 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() -> 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 {\\\"}\"}" + input: [] + output: Boolean + block: + statements: + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 19 + path: compiler-test + content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" + type_: Address + value: + Value: + Address: + - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 + - line_start: 4 + line_stop: 4 + col_start: 31 + col_stop: 94 + path: compiler-test + content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 94 + path: compiler-test + content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" + - Return: + expression: + Binary: + left: + 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\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" + name: "{\"name\":\"state\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return input.state.root == [0u8; 32] " + name: "{\"name\":\"root\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return input.state.root == [0u8; 32] " + right: + ArrayInit: + element: + Value: + Integer: + - U8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 33 + col_stop: 36 + path: compiler-test + content: " return input.state.root == [0u8; 32] " + dimensions: + - value: "32" + span: + line_start: 6 + line_stop: 6 + col_start: 32 + col_stop: 41 + path: compiler-test + content: " return input.state.root == [0u8; 32] " + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 41 + path: compiler-test + content: " return input.state.root == [0u8; 32] " + 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: 6 + line_stop: 7 + col_start: 12 + col_stop: 46 + path: compiler-test + content: " return input.state.root == [0u8; 32] \n && input.state_leaf.network_id == 0u8;" + span: + line_start: 6 + line_stop: 7 + col_start: 5 + col_stop: 46 + path: compiler-test + content: " return input.state.root == [0u8; 32] \n && input.state_leaf.network_id == 0u8;" + span: + line_start: 3 + line_stop: 8 + col_start: 25 + col_stop: 2 + path: compiler-test + content: "function main() -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 8 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main() -> bool {\n...\n}\n\n\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out index ed8115906e..5cb258f8b0 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out @@ -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() -> 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 {\\\"}\"}" + input: [] + output: Boolean + block: + statements: + - Return: + expression: + 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.state.root == [0u8; 32];\\\"}\"}" + name: "{\"name\":\"state\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + name: "{\"name\":\"root\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + right: + ArrayInit: + element: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 33 + col_stop: 36 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + dimensions: + - value: "32" + span: + line_start: 4 + line_stop: 4 + col_start: 32 + col_stop: 41 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 41 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 41 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + span: + line_start: 3 + line_stop: 5 + col_start: 25 + col_stop: 2 + path: compiler-test + content: "function main() -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main() -> 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 {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main() -> bool {\\\"}\"}" + input: [] + output: Boolean + block: + statements: + - Return: + expression: + 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.state.root == [0u8; 32];\\\"}\"}" + name: "{\"name\":\"state\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + name: "{\"name\":\"root\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + right: + ArrayInit: + element: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 33 + col_stop: 36 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + dimensions: + - value: "32" + span: + line_start: 4 + line_stop: 4 + col_start: 32 + col_stop: 41 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 41 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 41 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + span: + line_start: 3 + line_stop: 5 + col_start: 25 + col_stop: 2 + path: compiler-test + content: "function main() -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main() -> 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 {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main() -> bool {\\\"}\"}" + input: [] + output: Boolean + block: + statements: + - Return: + expression: + 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.state.root == [0u8; 32];\\\"}\"}" + name: "{\"name\":\"state\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + name: "{\"name\":\"root\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + right: + ArrayInit: + element: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 33 + col_stop: 36 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + dimensions: + - value: "32" + span: + line_start: 4 + line_stop: 4 + col_start: 32 + col_stop: 41 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 41 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 41 + path: compiler-test + content: " return input.state.root == [0u8; 32];" + span: + line_start: 3 + line_stop: 5 + col_start: 25 + col_stop: 2 + path: compiler-test + content: "function main() -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main() -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out index b9b6741851..3f78a174fa 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out @@ -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(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: + - Return: + expression: + Binary: + left: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return true == y; // hey Yoda" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return true == y; // hey Yoda\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return true == y; // hey Yoda" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " return true == y; // hey Yoda" + span: + line_start: 3 + line_stop: 5 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool { \n...\n}" + span: + line_start: 3 + line_stop: 5 + 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\":\"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: + - Return: + expression: + Binary: + left: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return true == y; // hey Yoda" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return true == y; // hey Yoda\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return true == y; // hey Yoda" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " return true == y; // hey Yoda" + span: + line_start: 3 + line_stop: 5 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool { \n...\n}" + span: + line_start: 3 + line_stop: 5 + 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\":\"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: + - Return: + expression: + Binary: + left: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return true == y; // hey Yoda" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return true == y; // hey Yoda\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return true == y; // hey Yoda" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " return true == y; // hey Yoda" + span: + line_start: 3 + line_stop: 5 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool { \n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool { \n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i128/add.leo.out b/tests/expectations/compiler/compiler/integers/i128/add.leo.out index e15dfe6ddc..0620c464dd 100644 --- a/tests/expectations/compiler/compiler/integers/i128/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/add.leo.out @@ -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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: Add + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: Add + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: Add + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out index ec7c981dac..f351cc0392 100644 --- a/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out @@ -13,3 +13,236 @@ outputs: - input_file: i128.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: i128, b: i128) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128) {\\\"}\"}" + 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: i128, b: i128) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128) {" + output: ~ + 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 3 + line_stop: 5 + col_start: 33 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128) {\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: i128, b: i128) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128) {\\\"}\"}" + 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: i128, b: i128) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128) {" + output: + Tuple: [] + 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 3 + line_stop: 5 + col_start: 33 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128) {\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: i128, b: i128) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128) {\\\"}\"}" + 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: i128, b: i128) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128) {" + output: + Tuple: [] + 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 3 + line_stop: 5 + col_start: 33 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128) {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i128/div.leo.out b/tests/expectations/compiler/compiler/integers/i128/div.leo.out index ee1d268947..18f141676a 100644 --- a/tests/expectations/compiler/compiler/integers/i128/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/div.leo.out @@ -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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i128/eq.leo.out b/tests/expectations/compiler/compiler/integers/i128/eq.leo.out index 9988aec207..49ee474fe9 100644 --- a/tests/expectations/compiler/compiler/integers/i128/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/eq.leo.out @@ -16,3 +16,303 @@ 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i128/ge.leo.out b/tests/expectations/compiler/compiler/integers/i128/ge.leo.out index 47c8b7d3fe..c70f5b4974 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ge.leo.out @@ -22,3 +22,303 @@ 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i128/gt.leo.out b/tests/expectations/compiler/compiler/integers/i128/gt.leo.out index 17a3c5d208..38ca42d5b6 100644 --- a/tests/expectations/compiler/compiler/integers/i128/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/gt.leo.out @@ -22,3 +22,303 @@ 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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: Gt + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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: Gt + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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: Gt + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i128/le.leo.out b/tests/expectations/compiler/compiler/integers/i128/le.leo.out index 62237196f2..7f9831e958 100644 --- a/tests/expectations/compiler/compiler/integers/i128/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/le.leo.out @@ -22,3 +22,303 @@ 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i128/lt.leo.out b/tests/expectations/compiler/compiler/integers/i128/lt.leo.out index bf8f202526..8070c8a4c1 100644 --- a/tests/expectations/compiler/compiler/integers/i128/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/lt.leo.out @@ -22,3 +22,303 @@ 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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: Lt + 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: Eq + 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: 49 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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: Lt + 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: Eq + 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: 49 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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: Lt + 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: Eq + 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: 49 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i128/max.leo.out b/tests/expectations/compiler/compiler/integers/i128/max.leo.out index a8427152b6..9b161dbf7e 100644 --- a/tests/expectations/compiler/compiler/integers/i128/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/max.leo.out @@ -16,3 +16,307 @@ 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: i128 = 170141183460469231731687303715884105727;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i128 = 170141183460469231731687303715884105727;" + type_: + IntegerType: I128 + value: + Value: + Implicit: + - "170141183460469231731687303715884105727" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 60 + path: compiler-test + content: " const a: i128 = 170141183460469231731687303715884105727;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 60 + path: compiler-test + content: " const a: i128 = 170141183460469231731687303715884105727;" + - 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: + - 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: i128 = 170141183460469231731687303715884105727;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i128 = 170141183460469231731687303715884105727;" + type_: + IntegerType: I128 + value: + Value: + Implicit: + - "170141183460469231731687303715884105727" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 60 + path: compiler-test + content: " const a: i128 = 170141183460469231731687303715884105727;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 60 + path: compiler-test + content: " const a: i128 = 170141183460469231731687303715884105727;" + - 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: + - 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: i128 = 170141183460469231731687303715884105727;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i128 = 170141183460469231731687303715884105727;" + type_: + IntegerType: I128 + value: + Value: + Integer: + - I128 + - "170141183460469231731687303715884105727" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 60 + path: compiler-test + content: " const a: i128 = 170141183460469231731687303715884105727;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 60 + path: compiler-test + content: " const a: i128 = 170141183460469231731687303715884105727;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/i128/min.leo.out b/tests/expectations/compiler/compiler/integers/i128/min.leo.out index a8427152b6..e25fb7878b 100644 --- a/tests/expectations/compiler/compiler/integers/i128/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/min.leo.out @@ -16,3 +16,307 @@ 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: i128 = -170141183460469231731687303715884105728;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i128 = -170141183460469231731687303715884105728;" + type_: + IntegerType: I128 + value: + Value: + Implicit: + - "-170141183460469231731687303715884105728" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 61 + path: compiler-test + content: " const a: i128 = -170141183460469231731687303715884105728;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 61 + path: compiler-test + content: " const a: i128 = -170141183460469231731687303715884105728;" + - 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: + - 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: i128 = -170141183460469231731687303715884105728;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i128 = -170141183460469231731687303715884105728;" + type_: + IntegerType: I128 + value: + Value: + Implicit: + - "-170141183460469231731687303715884105728" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 61 + path: compiler-test + content: " const a: i128 = -170141183460469231731687303715884105728;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 61 + path: compiler-test + content: " const a: i128 = -170141183460469231731687303715884105728;" + - 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: + - 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: i128 = -170141183460469231731687303715884105728;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i128 = -170141183460469231731687303715884105728;" + type_: + IntegerType: I128 + value: + Value: + Integer: + - I128 + - "-170141183460469231731687303715884105728" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 61 + path: compiler-test + content: " const a: i128 = -170141183460469231731687303715884105728;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 61 + path: compiler-test + content: " const a: i128 = -170141183460469231731687303715884105728;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/i128/mul.leo.out b/tests/expectations/compiler/compiler/integers/i128/mul.leo.out index eb1f70d7dc..d908159b6c 100644 --- a/tests/expectations/compiler/compiler/integers/i128/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/mul.leo.out @@ -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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: Mul + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: Mul + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: Mul + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i128/ne.leo.out b/tests/expectations/compiler/compiler/integers/i128/ne.leo.out index 1c10d95c1d..0b7df70ae4 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ne.leo.out @@ -22,3 +22,303 @@ 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 49 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 49 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 49 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i128/negate.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate.leo.out index e389c7dcdd..40222011c8 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate.leo.out @@ -22,3 +22,261 @@ 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: i128, b: i128) -> 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: i128, b: i128) -> 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: i128, b: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128) -> 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: i128, b: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Negate + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + 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: i128, b: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128) -> 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: i128, b: i128) -> 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: i128, b: i128) -> 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: i128, b: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128) -> 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: i128, b: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Negate + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + 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: i128, b: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128) -> 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: i128, b: i128) -> 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: i128, b: i128) -> 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: i128, b: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128) -> 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: i128, b: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Negate + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + 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: i128, b: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out index a8427152b6..f8ffc2a1ec 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out @@ -16,3 +16,446 @@ 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 = -128i128;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = -128i128;" + type_: ~ + value: + Value: + Integer: + - I128 + - "-128" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 23 + path: compiler-test + content: " const a = -128i128;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " const a = -128i128;" + - 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 = -a;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b = -a;" + type_: ~ + value: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" + op: Negate + span: + line_start: 5 + line_stop: 5 + col_start: 15 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + right: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = -128i128;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = -128i128;" + type_: ~ + value: + Value: + Integer: + - I128 + - "-128" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 23 + path: compiler-test + content: " const a = -128i128;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " const a = -128i128;" + - 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 = -a;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b = -a;" + type_: ~ + value: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" + op: Negate + span: + line_start: 5 + line_stop: 5 + col_start: 15 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + right: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = -128i128;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = -128i128;" + type_: + IntegerType: I128 + value: + Value: + Integer: + - I128 + - "-128" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 23 + path: compiler-test + content: " const a = -128i128;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " const a = -128i128;" + - 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 = -a;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b = -a;" + type_: + IntegerType: I128 + value: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" + op: Negate + span: + line_start: 5 + line_stop: 5 + col_start: 15 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + right: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out index 6cc283900b..fe618f0df4 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out @@ -16,3 +16,376 @@ 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 = 0i128;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = 0i128;" + type_: ~ + value: + Value: + Integer: + - I128 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 20 + path: compiler-test + content: " const a = 0i128;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 20 + path: compiler-test + content: " const a = 0i128;" + - Return: + expression: + Binary: + left: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i128 == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == 0i128 == y;" + right: + Value: + Integer: + - I128 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 23 + path: compiler-test + content: " return -a == 0i128 == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return -a == 0i128 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i128 == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return -a == 0i128 == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 28 + path: compiler-test + content: " return -a == 0i128 == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = 0i128;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = 0i128;" + type_: ~ + value: + Value: + Integer: + - I128 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 20 + path: compiler-test + content: " const a = 0i128;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 20 + path: compiler-test + content: " const a = 0i128;" + - Return: + expression: + Binary: + left: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i128 == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == 0i128 == y;" + right: + Value: + Integer: + - I128 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 23 + path: compiler-test + content: " return -a == 0i128 == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return -a == 0i128 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i128 == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return -a == 0i128 == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 28 + path: compiler-test + content: " return -a == 0i128 == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = 0i128;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = 0i128;" + type_: + IntegerType: I128 + value: + Value: + Integer: + - I128 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 20 + path: compiler-test + content: " const a = 0i128;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 20 + path: compiler-test + content: " const a = 0i128;" + - Return: + expression: + Binary: + left: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i128 == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == 0i128 == y;" + right: + Value: + Integer: + - I128 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 23 + path: compiler-test + content: " return -a == 0i128 == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return -a == 0i128 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i128 == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return -a == 0i128 == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 28 + path: compiler-test + content: " return -a == 0i128 == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/i128/sub.leo.out b/tests/expectations/compiler/compiler/integers/i128/sub.leo.out index a0d73d3cf3..6cbe17270f 100644 --- a/tests/expectations/compiler/compiler/integers/i128/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/sub.leo.out @@ -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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: Sub + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: Sub + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> 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: Sub + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out index 150572c08f..3d0bf5b0b8 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out @@ -22,3 +22,412 @@ 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(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> 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(s: bool, a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 42 + col_stop: 43 + path: compiler-test + content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 59 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i128, b: i128, c: i128) -> 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(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> 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(s: bool, a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 42 + col_stop: 43 + path: compiler-test + content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 59 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i128, b: i128, c: i128) -> 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(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> 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(s: bool, a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I128 + span: + line_start: 3 + line_stop: 3 + col_start: 42 + col_stop: 43 + path: compiler-test + content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: + IntegerType: I128 + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 59 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/i16/add.leo.out b/tests/expectations/compiler/compiler/integers/i16/add.leo.out index b02794dc30..d9ba547b0b 100644 --- a/tests/expectations/compiler/compiler/integers/i16/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/add.leo.out @@ -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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out index b537789ce3..cd80deb25d 100644 --- a/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out @@ -13,3 +13,236 @@ outputs: - input_file: i16.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: i16, b: i16) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) {\\\"}\"}" + 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: i16, b: i16) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16) {" + output: ~ + 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 3 + line_stop: 5 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16) {\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: i16, b: i16) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) {\\\"}\"}" + 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: i16, b: i16) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16) {" + output: + Tuple: [] + 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 3 + line_stop: 5 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16) {\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: i16, b: i16) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) {\\\"}\"}" + 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: i16, b: i16) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16) {" + output: + Tuple: [] + 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 3 + line_stop: 5 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16) {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i16/div.leo.out b/tests/expectations/compiler/compiler/integers/i16/div.leo.out index 1a096c95e5..fad48443a6 100644 --- a/tests/expectations/compiler/compiler/integers/i16/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/div.leo.out @@ -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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i16/eq.leo.out b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out index e78b53fac1..db25092293 100644 --- a/tests/expectations/compiler/compiler/integers/i16/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out @@ -16,3 +16,303 @@ 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i16/ge.leo.out b/tests/expectations/compiler/compiler/integers/i16/ge.leo.out index dbabe0a6f0..67b0580e65 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ge.leo.out @@ -22,3 +22,303 @@ 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i16/gt.leo.out b/tests/expectations/compiler/compiler/integers/i16/gt.leo.out index 2a29c320f3..db19e7b349 100644 --- a/tests/expectations/compiler/compiler/integers/i16/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/gt.leo.out @@ -22,3 +22,303 @@ 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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: Gt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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: Gt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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: Gt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i16/le.leo.out b/tests/expectations/compiler/compiler/integers/i16/le.leo.out index 4c3e02bb40..f54a185fb4 100644 --- a/tests/expectations/compiler/compiler/integers/i16/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/le.leo.out @@ -22,3 +22,303 @@ 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i16/lt.leo.out b/tests/expectations/compiler/compiler/integers/i16/lt.leo.out index e46644f9b9..d268eed29e 100644 --- a/tests/expectations/compiler/compiler/integers/i16/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/lt.leo.out @@ -22,3 +22,303 @@ 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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: Lt + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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: Lt + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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: Lt + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i16/max.leo.out b/tests/expectations/compiler/compiler/integers/i16/max.leo.out index a8427152b6..a35189a4ff 100644 --- a/tests/expectations/compiler/compiler/integers/i16/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/max.leo.out @@ -16,3 +16,307 @@ 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: i16 = 32767;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i16 = 32767;" + type_: + IntegerType: I16 + value: + Value: + Implicit: + - "32767" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " const a: i16 = 32767;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " const a: i16 = 32767;" + - 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: + - 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: i16 = 32767;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i16 = 32767;" + type_: + IntegerType: I16 + value: + Value: + Implicit: + - "32767" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " const a: i16 = 32767;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " const a: i16 = 32767;" + - 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: + - 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: i16 = 32767;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i16 = 32767;" + type_: + IntegerType: I16 + value: + Value: + Integer: + - I16 + - "32767" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " const a: i16 = 32767;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " const a: i16 = 32767;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/i16/min.leo.out b/tests/expectations/compiler/compiler/integers/i16/min.leo.out index a8427152b6..d831056057 100644 --- a/tests/expectations/compiler/compiler/integers/i16/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/min.leo.out @@ -16,3 +16,307 @@ 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: i16 = -32768;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i16 = -32768;" + type_: + IntegerType: I16 + value: + Value: + Implicit: + - "-32768" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " const a: i16 = -32768;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " const a: i16 = -32768;" + - 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: + - 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: i16 = -32768;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i16 = -32768;" + type_: + IntegerType: I16 + value: + Value: + Implicit: + - "-32768" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " const a: i16 = -32768;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " const a: i16 = -32768;" + - 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: + - 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: i16 = -32768;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i16 = -32768;" + type_: + IntegerType: I16 + value: + Value: + Integer: + - I16 + - "-32768" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " const a: i16 = -32768;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " const a: i16 = -32768;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/i16/mul.leo.out b/tests/expectations/compiler/compiler/integers/i16/mul.leo.out index 21db7821e3..ce56c6cf8d 100644 --- a/tests/expectations/compiler/compiler/integers/i16/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/mul.leo.out @@ -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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i16/ne.leo.out b/tests/expectations/compiler/compiler/integers/i16/ne.leo.out index 9e9bcf7483..78e5086ebd 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ne.leo.out @@ -22,3 +22,303 @@ 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i16/negate.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate.leo.out index b49a64ff1c..47c1b66528 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate.leo.out @@ -22,3 +22,261 @@ 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: i16, b: i16) -> 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: i16, b: i16) -> 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: i16, b: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Negate + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 3 + line_stop: 5 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16) -> 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: i16, b: i16) -> 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: i16, b: i16) -> 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: i16, b: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Negate + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 3 + line_stop: 5 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16) -> 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: i16, b: i16) -> 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: i16, b: i16) -> 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: i16, b: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Negate + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 3 + line_stop: 5 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out index a8427152b6..edd0a87a6b 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out @@ -16,3 +16,446 @@ 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 = -128i16;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = -128i16;" + type_: ~ + value: + Value: + Integer: + - I16 + - "-128" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 22 + path: compiler-test + content: " const a = -128i16;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a = -128i16;" + - 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 = -a;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b = -a;" + type_: ~ + value: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" + op: Negate + span: + line_start: 5 + line_stop: 5 + col_start: 15 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + right: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = -128i16;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = -128i16;" + type_: ~ + value: + Value: + Integer: + - I16 + - "-128" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 22 + path: compiler-test + content: " const a = -128i16;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a = -128i16;" + - 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 = -a;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b = -a;" + type_: ~ + value: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" + op: Negate + span: + line_start: 5 + line_stop: 5 + col_start: 15 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + right: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = -128i16;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = -128i16;" + type_: + IntegerType: I16 + value: + Value: + Integer: + - I16 + - "-128" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 22 + path: compiler-test + content: " const a = -128i16;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a = -128i16;" + - 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 = -a;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b = -a;" + type_: + IntegerType: I16 + value: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" + op: Negate + span: + line_start: 5 + line_stop: 5 + col_start: 15 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + right: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out index 6cc283900b..5191a043db 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out @@ -16,3 +16,376 @@ 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 = 0i16;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = 0i16;" + type_: ~ + value: + Value: + Integer: + - I16 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " const a = 0i16;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " const a = 0i16;" + - Return: + expression: + Binary: + left: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i16 == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == 0i16 == y;" + right: + Value: + Integer: + - I16 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 22 + path: compiler-test + content: " return -a == 0i16 == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return -a == 0i16 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i16 == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 27 + path: compiler-test + content: " return -a == 0i16 == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " return -a == 0i16 == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = 0i16;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = 0i16;" + type_: ~ + value: + Value: + Integer: + - I16 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " const a = 0i16;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " const a = 0i16;" + - Return: + expression: + Binary: + left: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i16 == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == 0i16 == y;" + right: + Value: + Integer: + - I16 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 22 + path: compiler-test + content: " return -a == 0i16 == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return -a == 0i16 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i16 == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 27 + path: compiler-test + content: " return -a == 0i16 == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " return -a == 0i16 == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = 0i16;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = 0i16;" + type_: + IntegerType: I16 + value: + Value: + Integer: + - I16 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " const a = 0i16;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " const a = 0i16;" + - Return: + expression: + Binary: + left: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i16 == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == 0i16 == y;" + right: + Value: + Integer: + - I16 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 22 + path: compiler-test + content: " return -a == 0i16 == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return -a == 0i16 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i16 == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 27 + path: compiler-test + content: " return -a == 0i16 == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " return -a == 0i16 == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/i16/sub.leo.out b/tests/expectations/compiler/compiler/integers/i16/sub.leo.out index c674086426..a84da08900 100644 --- a/tests/expectations/compiler/compiler/integers/i16/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/sub.leo.out @@ -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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out index e451167d8d..7e925263ae 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out @@ -22,3 +22,412 @@ 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(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> 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(s: bool, a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i16, b: i16, c: i16) -> 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(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> 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(s: bool, a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i16, b: i16, c: i16) -> 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(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> 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(s: bool, a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I16 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: + IntegerType: I16 + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/i32/add.leo.out b/tests/expectations/compiler/compiler/integers/i32/add.leo.out index ffaf9b6959..e3e4631bb7 100644 --- a/tests/expectations/compiler/compiler/integers/i32/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/add.leo.out @@ -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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out index c4d4cb27ec..3018d619d7 100644 --- a/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out @@ -13,3 +13,236 @@ outputs: - input_file: i32.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: i32, b: i32) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) {\\\"}\"}" + 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: i32, b: i32) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32) {" + output: ~ + 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 3 + line_stop: 5 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32) {\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: i32, b: i32) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) {\\\"}\"}" + 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: i32, b: i32) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32) {" + output: + Tuple: [] + 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 3 + line_stop: 5 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32) {\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: i32, b: i32) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) {\\\"}\"}" + 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: i32, b: i32) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32) {" + output: + Tuple: [] + 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 3 + line_stop: 5 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32) {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i32/div.leo.out b/tests/expectations/compiler/compiler/integers/i32/div.leo.out index afdd87dd91..1c3441fc80 100644 --- a/tests/expectations/compiler/compiler/integers/i32/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/div.leo.out @@ -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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i32/eq.leo.out b/tests/expectations/compiler/compiler/integers/i32/eq.leo.out index e04c8c25a3..c4709adb5b 100644 --- a/tests/expectations/compiler/compiler/integers/i32/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/eq.leo.out @@ -16,3 +16,303 @@ 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i32/ge.leo.out b/tests/expectations/compiler/compiler/integers/i32/ge.leo.out index 370487b3f6..3a9721b0f6 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ge.leo.out @@ -22,3 +22,303 @@ 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i32/gt.leo.out b/tests/expectations/compiler/compiler/integers/i32/gt.leo.out index 4b91847d9f..47da2b337b 100644 --- a/tests/expectations/compiler/compiler/integers/i32/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/gt.leo.out @@ -22,3 +22,303 @@ 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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: Gt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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: Gt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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: Gt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i32/le.leo.out b/tests/expectations/compiler/compiler/integers/i32/le.leo.out index ce51847c49..31f708a725 100644 --- a/tests/expectations/compiler/compiler/integers/i32/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/le.leo.out @@ -22,3 +22,303 @@ 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i32/lt.leo.out b/tests/expectations/compiler/compiler/integers/i32/lt.leo.out index b510db27df..a39844feb5 100644 --- a/tests/expectations/compiler/compiler/integers/i32/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/lt.leo.out @@ -22,3 +22,303 @@ 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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: Lt + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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: Lt + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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: Lt + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i32/max.leo.out b/tests/expectations/compiler/compiler/integers/i32/max.leo.out index a8427152b6..14156d5c00 100644 --- a/tests/expectations/compiler/compiler/integers/i32/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/max.leo.out @@ -16,3 +16,307 @@ 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: i32 = 2147483647;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i32 = 2147483647;" + type_: + IntegerType: I32 + value: + Value: + Implicit: + - "2147483647" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " const a: i32 = 2147483647;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " const a: i32 = 2147483647;" + - 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: + - 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: i32 = 2147483647;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i32 = 2147483647;" + type_: + IntegerType: I32 + value: + Value: + Implicit: + - "2147483647" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " const a: i32 = 2147483647;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " const a: i32 = 2147483647;" + - 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: + - 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: i32 = 2147483647;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i32 = 2147483647;" + type_: + IntegerType: I32 + value: + Value: + Integer: + - I32 + - "2147483647" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " const a: i32 = 2147483647;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " const a: i32 = 2147483647;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/i32/min.leo.out b/tests/expectations/compiler/compiler/integers/i32/min.leo.out index a8427152b6..89bdd310cb 100644 --- a/tests/expectations/compiler/compiler/integers/i32/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/min.leo.out @@ -16,3 +16,307 @@ 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: i32 = -2147483648;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i32 = -2147483648;" + type_: + IntegerType: I32 + value: + Value: + Implicit: + - "-2147483648" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 31 + path: compiler-test + content: " const a: i32 = -2147483648;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 31 + path: compiler-test + content: " const a: i32 = -2147483648;" + - 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: + - 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: i32 = -2147483648;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i32 = -2147483648;" + type_: + IntegerType: I32 + value: + Value: + Implicit: + - "-2147483648" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 31 + path: compiler-test + content: " const a: i32 = -2147483648;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 31 + path: compiler-test + content: " const a: i32 = -2147483648;" + - 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: + - 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: i32 = -2147483648;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i32 = -2147483648;" + type_: + IntegerType: I32 + value: + Value: + Integer: + - I32 + - "-2147483648" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 31 + path: compiler-test + content: " const a: i32 = -2147483648;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 31 + path: compiler-test + content: " const a: i32 = -2147483648;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/i32/mul.leo.out b/tests/expectations/compiler/compiler/integers/i32/mul.leo.out index f36632b0a9..39e496fcef 100644 --- a/tests/expectations/compiler/compiler/integers/i32/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/mul.leo.out @@ -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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i32/ne.leo.out b/tests/expectations/compiler/compiler/integers/i32/ne.leo.out index 4dc7173375..fd37d27800 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ne.leo.out @@ -22,3 +22,303 @@ 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i32/negate.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate.leo.out index 23e0f41d3a..e118778559 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate.leo.out @@ -22,3 +22,261 @@ 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: i32, b: i32) -> 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: i32, b: i32) -> 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: i32, b: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Negate + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 3 + line_stop: 5 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32) -> 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: i32, b: i32) -> 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: i32, b: i32) -> 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: i32, b: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Negate + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 3 + line_stop: 5 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32) -> 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: i32, b: i32) -> 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: i32, b: i32) -> 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: i32, b: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Negate + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 3 + line_stop: 5 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out index a8427152b6..8035adff3b 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out @@ -16,3 +16,446 @@ 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 = -128i32;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = -128i32;" + type_: ~ + value: + Value: + Integer: + - I32 + - "-128" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 22 + path: compiler-test + content: " const a = -128i32;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a = -128i32;" + - 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 = -a;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b = -a;" + type_: ~ + value: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" + op: Negate + span: + line_start: 5 + line_stop: 5 + col_start: 15 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + right: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = -128i32;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = -128i32;" + type_: ~ + value: + Value: + Integer: + - I32 + - "-128" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 22 + path: compiler-test + content: " const a = -128i32;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a = -128i32;" + - 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 = -a;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b = -a;" + type_: ~ + value: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" + op: Negate + span: + line_start: 5 + line_stop: 5 + col_start: 15 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + right: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = -128i32;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = -128i32;" + type_: + IntegerType: I32 + value: + Value: + Integer: + - I32 + - "-128" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 22 + path: compiler-test + content: " const a = -128i32;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a = -128i32;" + - 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 = -a;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b = -a;" + type_: + IntegerType: I32 + value: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" + op: Negate + span: + line_start: 5 + line_stop: 5 + col_start: 15 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + right: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out index 6cc283900b..5bc77f0a96 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out @@ -16,3 +16,376 @@ 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 = 0i32;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = 0i32;" + type_: ~ + value: + Value: + Integer: + - I32 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " const a = 0i32;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " const a = 0i32;" + - Return: + expression: + Binary: + left: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i32 == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == 0i32 == y;" + right: + Value: + Integer: + - I32 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 22 + path: compiler-test + content: " return -a == 0i32 == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return -a == 0i32 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i32 == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 27 + path: compiler-test + content: " return -a == 0i32 == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " return -a == 0i32 == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = 0i32;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = 0i32;" + type_: ~ + value: + Value: + Integer: + - I32 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " const a = 0i32;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " const a = 0i32;" + - Return: + expression: + Binary: + left: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i32 == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == 0i32 == y;" + right: + Value: + Integer: + - I32 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 22 + path: compiler-test + content: " return -a == 0i32 == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return -a == 0i32 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i32 == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 27 + path: compiler-test + content: " return -a == 0i32 == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " return -a == 0i32 == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = 0i32;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = 0i32;" + type_: + IntegerType: I32 + value: + Value: + Integer: + - I32 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " const a = 0i32;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " const a = 0i32;" + - Return: + expression: + Binary: + left: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i32 == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == 0i32 == y;" + right: + Value: + Integer: + - I32 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 22 + path: compiler-test + content: " return -a == 0i32 == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return -a == 0i32 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i32 == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 27 + path: compiler-test + content: " return -a == 0i32 == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " return -a == 0i32 == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/i32/sub.leo.out b/tests/expectations/compiler/compiler/integers/i32/sub.leo.out index f9d194ed96..66198c3592 100644 --- a/tests/expectations/compiler/compiler/integers/i32/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/sub.leo.out @@ -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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out index 86fb2c9cf8..082065d6b8 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out @@ -22,3 +22,412 @@ 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(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> 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(s: bool, a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i32, b: i32, c: i32) -> 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(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> 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(s: bool, a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i32, b: i32, c: i32) -> 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(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> 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(s: bool, a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: + IntegerType: I32 + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/i64/add.leo.out b/tests/expectations/compiler/compiler/integers/i64/add.leo.out index 6a67c33729..bb82d040df 100644 --- a/tests/expectations/compiler/compiler/integers/i64/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/add.leo.out @@ -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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out index def74a6e3f..2c9c4a6ca7 100644 --- a/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out @@ -13,3 +13,236 @@ outputs: - input_file: i64.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: i64, b: i64) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) {\\\"}\"}" + 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: i64, b: i64) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64) {" + output: ~ + 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 3 + line_stop: 5 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64) {\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: i64, b: i64) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) {\\\"}\"}" + 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: i64, b: i64) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64) {" + output: + Tuple: [] + 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 3 + line_stop: 5 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64) {\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: i64, b: i64) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) {\\\"}\"}" + 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: i64, b: i64) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64) {" + output: + Tuple: [] + 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 3 + line_stop: 5 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64) {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i64/div.leo.out b/tests/expectations/compiler/compiler/integers/i64/div.leo.out index f19f052911..b029d59aea 100644 --- a/tests/expectations/compiler/compiler/integers/i64/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/div.leo.out @@ -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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i64/eq.leo.out b/tests/expectations/compiler/compiler/integers/i64/eq.leo.out index ec98c6de06..233021e0b6 100644 --- a/tests/expectations/compiler/compiler/integers/i64/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/eq.leo.out @@ -16,3 +16,303 @@ 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i64/ge.leo.out b/tests/expectations/compiler/compiler/integers/i64/ge.leo.out index 875aa551f2..7c0e7f5ef7 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ge.leo.out @@ -22,3 +22,303 @@ 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i64/gt.leo.out b/tests/expectations/compiler/compiler/integers/i64/gt.leo.out index 49802c45e4..1736371bdf 100644 --- a/tests/expectations/compiler/compiler/integers/i64/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/gt.leo.out @@ -22,3 +22,303 @@ 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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: Gt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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: Gt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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: Gt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i64/le.leo.out b/tests/expectations/compiler/compiler/integers/i64/le.leo.out index d67b357cde..372d6ad8dd 100644 --- a/tests/expectations/compiler/compiler/integers/i64/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/le.leo.out @@ -22,3 +22,303 @@ 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i64/lt.leo.out b/tests/expectations/compiler/compiler/integers/i64/lt.leo.out index c55af0ea50..5409671159 100644 --- a/tests/expectations/compiler/compiler/integers/i64/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/lt.leo.out @@ -22,3 +22,303 @@ 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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: Lt + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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: Lt + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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: Lt + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i64/max.leo.out b/tests/expectations/compiler/compiler/integers/i64/max.leo.out index a8427152b6..bb76c1851f 100644 --- a/tests/expectations/compiler/compiler/integers/i64/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/max.leo.out @@ -16,3 +16,307 @@ 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: i64 = 9223372036854775807;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i64 = 9223372036854775807;" + type_: + IntegerType: I64 + value: + Value: + Implicit: + - "9223372036854775807" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 39 + path: compiler-test + content: " const a: i64 = 9223372036854775807;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 39 + path: compiler-test + content: " const a: i64 = 9223372036854775807;" + - 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: + - 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: i64 = 9223372036854775807;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i64 = 9223372036854775807;" + type_: + IntegerType: I64 + value: + Value: + Implicit: + - "9223372036854775807" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 39 + path: compiler-test + content: " const a: i64 = 9223372036854775807;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 39 + path: compiler-test + content: " const a: i64 = 9223372036854775807;" + - 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: + - 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: i64 = 9223372036854775807;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i64 = 9223372036854775807;" + type_: + IntegerType: I64 + value: + Value: + Integer: + - I64 + - "9223372036854775807" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 39 + path: compiler-test + content: " const a: i64 = 9223372036854775807;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 39 + path: compiler-test + content: " const a: i64 = 9223372036854775807;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/i64/min.leo.out b/tests/expectations/compiler/compiler/integers/i64/min.leo.out index a8427152b6..16e2b4b1d9 100644 --- a/tests/expectations/compiler/compiler/integers/i64/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/min.leo.out @@ -16,3 +16,307 @@ 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: i64 = -9223372036854775808;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i64 = -9223372036854775808;" + type_: + IntegerType: I64 + value: + Value: + Implicit: + - "-9223372036854775808" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 40 + path: compiler-test + content: " const a: i64 = -9223372036854775808;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 40 + path: compiler-test + content: " const a: i64 = -9223372036854775808;" + - 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: + - 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: i64 = -9223372036854775808;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i64 = -9223372036854775808;" + type_: + IntegerType: I64 + value: + Value: + Implicit: + - "-9223372036854775808" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 40 + path: compiler-test + content: " const a: i64 = -9223372036854775808;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 40 + path: compiler-test + content: " const a: i64 = -9223372036854775808;" + - 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: + - 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: i64 = -9223372036854775808;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i64 = -9223372036854775808;" + type_: + IntegerType: I64 + value: + Value: + Integer: + - I64 + - "-9223372036854775808" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 40 + path: compiler-test + content: " const a: i64 = -9223372036854775808;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 40 + path: compiler-test + content: " const a: i64 = -9223372036854775808;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/i64/mul.leo.out b/tests/expectations/compiler/compiler/integers/i64/mul.leo.out index fc8273d670..5cae1ffaf0 100644 --- a/tests/expectations/compiler/compiler/integers/i64/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/mul.leo.out @@ -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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i64/ne.leo.out b/tests/expectations/compiler/compiler/integers/i64/ne.leo.out index 45d486fcff..6dffb3f8d0 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ne.leo.out @@ -22,3 +22,303 @@ 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i64/negate.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate.leo.out index 72184c1b53..7795eb217a 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate.leo.out @@ -22,3 +22,261 @@ 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: i64, b: i64) -> 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: i64, b: i64) -> 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: i64, b: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Negate + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 3 + line_stop: 5 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64) -> 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: i64, b: i64) -> 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: i64, b: i64) -> 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: i64, b: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Negate + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 3 + line_stop: 5 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64) -> 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: i64, b: i64) -> 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: i64, b: i64) -> 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: i64, b: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Negate + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 3 + line_stop: 5 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out index a8427152b6..390334eb3e 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out @@ -16,3 +16,446 @@ 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 = -128i64;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = -128i64;" + type_: ~ + value: + Value: + Integer: + - I64 + - "-128" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 22 + path: compiler-test + content: " const a = -128i64;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a = -128i64;" + - 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 = -a;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b = -a;" + type_: ~ + value: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" + op: Negate + span: + line_start: 5 + line_stop: 5 + col_start: 15 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + right: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = -128i64;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = -128i64;" + type_: ~ + value: + Value: + Integer: + - I64 + - "-128" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 22 + path: compiler-test + content: " const a = -128i64;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a = -128i64;" + - 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 = -a;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b = -a;" + type_: ~ + value: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" + op: Negate + span: + line_start: 5 + line_stop: 5 + col_start: 15 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + right: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = -128i64;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = -128i64;" + type_: + IntegerType: I64 + value: + Value: + Integer: + - I64 + - "-128" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 22 + path: compiler-test + content: " const a = -128i64;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a = -128i64;" + - 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 = -a;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const b = -a;" + type_: + IntegerType: I64 + value: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" + op: Negate + span: + line_start: 5 + line_stop: 5 + col_start: 15 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " const b = -a;" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + right: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return b == -a == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " return b == -a == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out index 6cc283900b..92f974ccb6 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out @@ -16,3 +16,376 @@ 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 = 0i64;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = 0i64;" + type_: ~ + value: + Value: + Integer: + - I64 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " const a = 0i64;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " const a = 0i64;" + - Return: + expression: + Binary: + left: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i64 == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == 0i64 == y;" + right: + Value: + Integer: + - I64 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 22 + path: compiler-test + content: " return -a == 0i64 == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return -a == 0i64 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i64 == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 27 + path: compiler-test + content: " return -a == 0i64 == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " return -a == 0i64 == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = 0i64;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = 0i64;" + type_: ~ + value: + Value: + Integer: + - I64 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " const a = 0i64;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " const a = 0i64;" + - Return: + expression: + Binary: + left: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i64 == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == 0i64 == y;" + right: + Value: + Integer: + - I64 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 22 + path: compiler-test + content: " return -a == 0i64 == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return -a == 0i64 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i64 == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 27 + path: compiler-test + content: " return -a == 0i64 == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " return -a == 0i64 == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = 0i64;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = 0i64;" + type_: + IntegerType: I64 + value: + Value: + Integer: + - I64 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " const a = 0i64;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " const a = 0i64;" + - Return: + expression: + Binary: + left: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i64 == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == 0i64 == y;" + right: + Value: + Integer: + - I64 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 22 + path: compiler-test + content: " return -a == 0i64 == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return -a == 0i64 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i64 == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 27 + path: compiler-test + content: " return -a == 0i64 == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " return -a == 0i64 == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/i64/sub.leo.out b/tests/expectations/compiler/compiler/integers/i64/sub.leo.out index dcae9e2a73..6b1e821b3d 100644 --- a/tests/expectations/compiler/compiler/integers/i64/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/sub.leo.out @@ -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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out index c2a876bbb8..fd5a210ba2 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out @@ -22,3 +22,412 @@ 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(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> 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(s: bool, a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i64, b: i64, c: i64) -> 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(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> 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(s: bool, a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i64, b: i64, c: i64) -> 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(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> 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(s: bool, a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I64 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: + IntegerType: I64 + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/i8/add.leo.out b/tests/expectations/compiler/compiler/integers/i8/add.leo.out index 1a62db8674..067579ef56 100644 --- a/tests/expectations/compiler/compiler/integers/i8/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/add.leo.out @@ -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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: Add + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: Add + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: Add + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out index df6818f450..45dc8c29bf 100644 --- a/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out @@ -13,3 +13,236 @@ outputs: - input_file: i8.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: i8, b: i8) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) {\\\"}\"}" + 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: i8, b: i8) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8) {" + output: ~ + 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 3 + line_stop: 5 + col_start: 29 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8) {\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: i8, b: i8) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) {\\\"}\"}" + 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: i8, b: i8) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8) {" + output: + Tuple: [] + 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 3 + line_stop: 5 + col_start: 29 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8) {\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: i8, b: i8) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) {\\\"}\"}" + 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: i8, b: i8) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8) {" + output: + Tuple: [] + 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 3 + line_stop: 5 + col_start: 29 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8) {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i8/div.leo.out b/tests/expectations/compiler/compiler/integers/i8/div.leo.out index ba8146ea8c..a5b7d74040 100644 --- a/tests/expectations/compiler/compiler/integers/i8/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/div.leo.out @@ -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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i8/eq.leo.out b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out index c840efb52a..fbc5f0ebf4 100644 --- a/tests/expectations/compiler/compiler/integers/i8/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out @@ -16,3 +16,303 @@ 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i8/ge.leo.out b/tests/expectations/compiler/compiler/integers/i8/ge.leo.out index 74c5990eaf..dca3d8b376 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ge.leo.out @@ -22,3 +22,303 @@ 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i8/gt.leo.out b/tests/expectations/compiler/compiler/integers/i8/gt.leo.out index 2715d90d9c..1ec1163142 100644 --- a/tests/expectations/compiler/compiler/integers/i8/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/gt.leo.out @@ -22,3 +22,303 @@ 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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: Gt + 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: Eq + 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: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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: Gt + 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: Eq + 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: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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: Gt + 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: Eq + 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: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i8/le.leo.out b/tests/expectations/compiler/compiler/integers/i8/le.leo.out index b5a17ebb1d..2e6eb3d917 100644 --- a/tests/expectations/compiler/compiler/integers/i8/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/le.leo.out @@ -22,3 +22,303 @@ 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i8/lt.leo.out b/tests/expectations/compiler/compiler/integers/i8/lt.leo.out index f22f942c43..4244bcb48d 100644 --- a/tests/expectations/compiler/compiler/integers/i8/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/lt.leo.out @@ -22,3 +22,303 @@ 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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: Lt + 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: Eq + 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: 45 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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: Lt + 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: Eq + 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: 45 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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: Lt + 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: Eq + 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: 45 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i8/max.leo.out b/tests/expectations/compiler/compiler/integers/i8/max.leo.out index a8427152b6..6186862f11 100644 --- a/tests/expectations/compiler/compiler/integers/i8/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/max.leo.out @@ -16,3 +16,307 @@ 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: i8 = 127;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i8 = 127;" + type_: + IntegerType: I8 + value: + Value: + Implicit: + - "127" + - line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " const a: i8 = 127;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a: i8 = 127;" + - 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: + - 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: i8 = 127;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i8 = 127;" + type_: + IntegerType: I8 + value: + Value: + Implicit: + - "127" + - line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " const a: i8 = 127;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a: i8 = 127;" + - 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: + - 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: i8 = 127;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i8 = 127;" + type_: + IntegerType: I8 + value: + Value: + Integer: + - I8 + - "127" + - line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " const a: i8 = 127;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a: i8 = 127;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/i8/min.leo.out b/tests/expectations/compiler/compiler/integers/i8/min.leo.out index a8427152b6..44484ed1af 100644 --- a/tests/expectations/compiler/compiler/integers/i8/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/min.leo.out @@ -16,3 +16,307 @@ 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: i8 = -128;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i8 = -128;" + type_: + IntegerType: I8 + value: + Value: + Implicit: + - "-128" + - line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 23 + path: compiler-test + content: " const a: i8 = -128;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " const a: i8 = -128;" + - 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: + - 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: i8 = -128;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i8 = -128;" + type_: + IntegerType: I8 + value: + Value: + Implicit: + - "-128" + - line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 23 + path: compiler-test + content: " const a: i8 = -128;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " const a: i8 = -128;" + - 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: + - 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: i8 = -128;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: i8 = -128;" + type_: + IntegerType: I8 + value: + Value: + Integer: + - I8 + - "-128" + - line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 23 + path: compiler-test + content: " const a: i8 = -128;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " const a: i8 = -128;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/i8/mul.leo.out b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out index 97b51dc4b4..49c2065dc6 100644 --- a/tests/expectations/compiler/compiler/integers/i8/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out @@ -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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: Mul + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: Mul + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: Mul + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out index 309640eea8..412bf2b9b0 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out @@ -22,3 +22,303 @@ 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 45 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 45 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 45 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i8/negate.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out index 047238318b..bd805aa05b 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out @@ -22,3 +22,261 @@ 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: i8, b: i8) -> 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: i8, b: i8) -> 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: i8, b: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Negate + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 3 + line_stop: 5 + col_start: 37 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8) -> 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: i8, b: i8) -> 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: i8, b: i8) -> 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: i8, b: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Negate + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 3 + line_stop: 5 + col_start: 37 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8) -> 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: i8, b: i8) -> 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: i8, b: i8) -> 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: i8, b: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Negate + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == b;" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " return -a == b;" + span: + line_start: 3 + line_stop: 5 + col_start: 37 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out index 6cc283900b..74d9e2aae7 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out @@ -16,3 +16,376 @@ 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 = 0i8;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = 0i8;" + type_: ~ + value: + Value: + Integer: + - I8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 18 + path: compiler-test + content: " const a = 0i8;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " const a = 0i8;" + - Return: + expression: + Binary: + left: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i8 == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == 0i8 == y;" + right: + Value: + Integer: + - I8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " return -a == 0i8 == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return -a == 0i8 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i8 == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 26 + path: compiler-test + content: " return -a == 0i8 == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " return -a == 0i8 == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = 0i8;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = 0i8;" + type_: ~ + value: + Value: + Integer: + - I8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 18 + path: compiler-test + content: " const a = 0i8;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " const a = 0i8;" + - Return: + expression: + Binary: + left: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i8 == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == 0i8 == y;" + right: + Value: + Integer: + - I8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " return -a == 0i8 == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return -a == 0i8 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i8 == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 26 + path: compiler-test + content: " return -a == 0i8 == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " return -a == 0i8 == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + 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\":\"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 = 0i8;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = 0i8;" + type_: + IntegerType: I8 + value: + Value: + Integer: + - I8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 18 + path: compiler-test + content: " const a = 0i8;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " const a = 0i8;" + - Return: + expression: + Binary: + left: + Binary: + left: + Unary: + inner: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i8 == y;\\\"}\"}" + op: Negate + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 14 + path: compiler-test + content: " return -a == 0i8 == y;" + right: + Value: + Integer: + - I8 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " return -a == 0i8 == y;" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return -a == 0i8 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i8 == y;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 26 + path: compiler-test + content: " return -a == 0i8 == y;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " return -a == 0i8 == y;" + span: + line_start: 3 + line_stop: 7 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/i8/sub.leo.out b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out index efffb1ea7e..ee4b9058a8 100644 --- a/tests/expectations/compiler/compiler/integers/i8/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out @@ -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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: Sub + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: Sub + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> 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: Sub + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out index ae48442030..fc75cd4183 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out @@ -22,3 +22,412 @@ 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(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> 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(s: bool, a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 38 + col_stop: 39 + path: compiler-test + content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 53 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i8, b: i8, c: i8) -> 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(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> 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(s: bool, a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 38 + col_stop: 39 + path: compiler-test + content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 53 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i8, b: i8, c: i8) -> 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(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> 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(s: bool, a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I8 + span: + line_start: 3 + line_stop: 3 + col_start: 38 + col_stop: 39 + path: compiler-test + content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: + IntegerType: I8 + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 53 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/u128/add.leo.out b/tests/expectations/compiler/compiler/integers/u128/add.leo.out index c576fc6390..c550b5fd10 100644 --- a/tests/expectations/compiler/compiler/integers/u128/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/add.leo.out @@ -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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: Add + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: Add + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: Add + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out index 6d3aa2ce03..82a0ed418f 100644 --- a/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out @@ -16,3 +16,300 @@ 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: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + - 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 == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 3 + line_stop: 6 + col_start: 41 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + - 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 == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 3 + line_stop: 6 + col_start: 41 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + - 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 == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 3 + line_stop: 6 + col_start: 41 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128) -> bool {\n...\n}\n" diff --git a/tests/expectations/compiler/compiler/integers/u128/div.leo.out b/tests/expectations/compiler/compiler/integers/u128/div.leo.out index 6ad0455f03..db736fb18e 100644 --- a/tests/expectations/compiler/compiler/integers/u128/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/div.leo.out @@ -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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u128/eq.leo.out b/tests/expectations/compiler/compiler/integers/u128/eq.leo.out index 84b7ff4f3f..84d94b4bec 100644 --- a/tests/expectations/compiler/compiler/integers/u128/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/eq.leo.out @@ -22,3 +22,303 @@ 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u128/ge.leo.out b/tests/expectations/compiler/compiler/integers/u128/ge.leo.out index cdc556d3df..18dcb52460 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ge.leo.out @@ -28,3 +28,303 @@ 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u128/gt.leo.out b/tests/expectations/compiler/compiler/integers/u128/gt.leo.out index a1671d6091..98faff1f31 100644 --- a/tests/expectations/compiler/compiler/integers/u128/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/gt.leo.out @@ -16,3 +16,308 @@ outputs: - input_file: u128_f.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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) {" + output: ~ + block: + statements: + - Console: + function: + Assert: + Binary: + left: + 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 > b == c);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Gt + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " console.assert(a > b == c);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 3 + line_stop: 5 + col_start: 42 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) {" + output: + Tuple: [] + block: + statements: + - Console: + function: + Assert: + Binary: + left: + 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 > b == c);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Gt + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " console.assert(a > b == c);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 3 + line_stop: 5 + col_start: 42 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) {" + output: + Tuple: [] + block: + statements: + - Console: + function: + Assert: + Binary: + left: + 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 > b == c);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Gt + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " console.assert(a > b == c);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 3 + line_stop: 5 + col_start: 42 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u128/input.leo.out b/tests/expectations/compiler/compiler/integers/u128/input.leo.out index dd2dc560a3..ae2c11119b 100644 --- a/tests/expectations/compiler/compiler/integers/u128/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/input.leo.out @@ -16,3 +16,231 @@ 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: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u128/le.leo.out b/tests/expectations/compiler/compiler/integers/u128/le.leo.out index cec3fb7e7b..69b20dc799 100644 --- a/tests/expectations/compiler/compiler/integers/u128/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/le.leo.out @@ -28,3 +28,303 @@ 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u128/lt.leo.out b/tests/expectations/compiler/compiler/integers/u128/lt.leo.out index b69a4ceffa..5bdae121ce 100644 --- a/tests/expectations/compiler/compiler/integers/u128/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/lt.leo.out @@ -22,3 +22,303 @@ 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> 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: Lt + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> 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: Lt + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> 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: Lt + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u128/max.leo.out b/tests/expectations/compiler/compiler/integers/u128/max.leo.out index a8427152b6..9d69c7c923 100644 --- a/tests/expectations/compiler/compiler/integers/u128/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/max.leo.out @@ -16,3 +16,307 @@ 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: u128 = 340282366920938463463374607431768211455;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u128 = 340282366920938463463374607431768211455;" + type_: + IntegerType: U128 + value: + Value: + Implicit: + - "340282366920938463463374607431768211455" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 60 + path: compiler-test + content: " const a: u128 = 340282366920938463463374607431768211455;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 60 + path: compiler-test + content: " const a: u128 = 340282366920938463463374607431768211455;" + - 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: + - 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: u128 = 340282366920938463463374607431768211455;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u128 = 340282366920938463463374607431768211455;" + type_: + IntegerType: U128 + value: + Value: + Implicit: + - "340282366920938463463374607431768211455" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 60 + path: compiler-test + content: " const a: u128 = 340282366920938463463374607431768211455;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 60 + path: compiler-test + content: " const a: u128 = 340282366920938463463374607431768211455;" + - 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: + - 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: u128 = 340282366920938463463374607431768211455;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u128 = 340282366920938463463374607431768211455;" + type_: + IntegerType: U128 + value: + Value: + Integer: + - U128 + - "340282366920938463463374607431768211455" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 60 + path: compiler-test + content: " const a: u128 = 340282366920938463463374607431768211455;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 60 + path: compiler-test + content: " const a: u128 = 340282366920938463463374607431768211455;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/u128/min.leo.out b/tests/expectations/compiler/compiler/integers/u128/min.leo.out index a8427152b6..c712d1a415 100644 --- a/tests/expectations/compiler/compiler/integers/u128/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/min.leo.out @@ -16,3 +16,307 @@ 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: u128 = 0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u128 = 0;" + type_: + IntegerType: U128 + value: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " const a: u128 = 0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a: u128 = 0;" + - 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: 31 + 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: + - 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: u128 = 0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u128 = 0;" + type_: + IntegerType: U128 + value: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " const a: u128 = 0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a: u128 = 0;" + - 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: 31 + 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: + - 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: u128 = 0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u128 = 0;" + type_: + IntegerType: U128 + value: + Value: + Integer: + - U128 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " const a: u128 = 0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a: u128 = 0;" + - 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: 31 + 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" diff --git a/tests/expectations/compiler/compiler/integers/u128/mul.leo.out b/tests/expectations/compiler/compiler/integers/u128/mul.leo.out index 925d90385c..8523ea42f6 100644 --- a/tests/expectations/compiler/compiler/integers/u128/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/mul.leo.out @@ -16,3 +16,306 @@ 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: Mul + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: Mul + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: Mul + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u128/ne.leo.out b/tests/expectations/compiler/compiler/integers/u128/ne.leo.out index e903cf26b6..24e0187bb6 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ne.leo.out @@ -16,3 +16,303 @@ 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u128/sub.leo.out b/tests/expectations/compiler/compiler/integers/u128/sub.leo.out index 49a8e3890e..4529bfd891 100644 --- a/tests/expectations/compiler/compiler/integers/u128/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/sub.leo.out @@ -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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: Sub + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: Sub + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> 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: Sub + 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: Eq + 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: 50 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out index 75fc7a1213..a5bcdc31e8 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out @@ -22,3 +22,412 @@ 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(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> 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(s: bool, a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 42 + col_stop: 43 + path: compiler-test + content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 59 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u128, b: u128, c: u128) -> 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(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> 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(s: bool, a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 42 + col_stop: 43 + path: compiler-test + content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 59 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u128, b: u128, c: u128) -> 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(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> 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(s: bool, a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 33 + col_stop: 34 + path: compiler-test + content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U128 + span: + line_start: 3 + line_stop: 3 + col_start: 42 + col_stop: 43 + path: compiler-test + content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: + IntegerType: U128 + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 59 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/u16/add.leo.out b/tests/expectations/compiler/compiler/integers/u16/add.leo.out index f2a10e5b41..33008990b0 100644 --- a/tests/expectations/compiler/compiler/integers/u16/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/add.leo.out @@ -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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out index b7b75ab4b2..bfd4677ed7 100644 --- a/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out @@ -16,3 +16,300 @@ 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: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16) -> 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + - 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 == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 3 + line_stop: 6 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16) -> 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + - 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 == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 3 + line_stop: 6 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16) -> 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + - 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 == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 3 + line_stop: 6 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16) -> bool {\n...\n}\n" diff --git a/tests/expectations/compiler/compiler/integers/u16/div.leo.out b/tests/expectations/compiler/compiler/integers/u16/div.leo.out index d90e60bfca..585552f306 100644 --- a/tests/expectations/compiler/compiler/integers/u16/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/div.leo.out @@ -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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u16/eq.leo.out b/tests/expectations/compiler/compiler/integers/u16/eq.leo.out index e59f690d80..1e33a7822b 100644 --- a/tests/expectations/compiler/compiler/integers/u16/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/eq.leo.out @@ -22,3 +22,303 @@ 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u16/ge.leo.out b/tests/expectations/compiler/compiler/integers/u16/ge.leo.out index 81dbdf6917..481b166c98 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ge.leo.out @@ -28,3 +28,303 @@ 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u16/gt.leo.out b/tests/expectations/compiler/compiler/integers/u16/gt.leo.out index ead5c0ec25..2de9ad54dd 100644 --- a/tests/expectations/compiler/compiler/integers/u16/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/gt.leo.out @@ -16,3 +16,308 @@ outputs: - input_file: u16_f.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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) {" + output: ~ + block: + statements: + - Console: + function: + Assert: + Binary: + left: + 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 > b == c);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Gt + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " console.assert(a > b == c);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 3 + line_stop: 5 + col_start: 40 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) {" + output: + Tuple: [] + block: + statements: + - Console: + function: + Assert: + Binary: + left: + 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 > b == c);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Gt + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " console.assert(a > b == c);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 3 + line_stop: 5 + col_start: 40 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) {" + output: + Tuple: [] + block: + statements: + - Console: + function: + Assert: + Binary: + left: + 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 > b == c);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Gt + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " console.assert(a > b == c);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 3 + line_stop: 5 + col_start: 40 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u16/input.leo.out b/tests/expectations/compiler/compiler/integers/u16/input.leo.out index 79b4b59a0d..7cdddba4ba 100644 --- a/tests/expectations/compiler/compiler/integers/u16/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/input.leo.out @@ -16,3 +16,231 @@ 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: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16) -> 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: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16) -> 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: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16) -> 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: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u16/le.leo.out b/tests/expectations/compiler/compiler/integers/u16/le.leo.out index 95a8f46b78..be8acd1616 100644 --- a/tests/expectations/compiler/compiler/integers/u16/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/le.leo.out @@ -28,3 +28,303 @@ 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u16/lt.leo.out b/tests/expectations/compiler/compiler/integers/u16/lt.leo.out index 1371689f4f..cdb34166d3 100644 --- a/tests/expectations/compiler/compiler/integers/u16/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/lt.leo.out @@ -22,3 +22,303 @@ 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> 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: Lt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> 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: Lt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> 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: Lt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u16/max.leo.out b/tests/expectations/compiler/compiler/integers/u16/max.leo.out index a8427152b6..da159b0768 100644 --- a/tests/expectations/compiler/compiler/integers/u16/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/max.leo.out @@ -16,3 +16,307 @@ 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: u16 = 65535;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u16 = 65535;" + type_: + IntegerType: U16 + value: + Value: + Implicit: + - "65535" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " const a: u16 = 65535;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " const a: u16 = 65535;" + - 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: + - 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: u16 = 65535;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u16 = 65535;" + type_: + IntegerType: U16 + value: + Value: + Implicit: + - "65535" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " const a: u16 = 65535;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " const a: u16 = 65535;" + - 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: + - 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: u16 = 65535;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u16 = 65535;" + type_: + IntegerType: U16 + value: + Value: + Integer: + - U16 + - "65535" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " const a: u16 = 65535;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " const a: u16 = 65535;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/u16/min.leo.out b/tests/expectations/compiler/compiler/integers/u16/min.leo.out index a8427152b6..079866ab0d 100644 --- a/tests/expectations/compiler/compiler/integers/u16/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/min.leo.out @@ -16,3 +16,307 @@ 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: u16 = 0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u16 = 0;" + type_: + IntegerType: U16 + value: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " const a: u16 = 0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " const a: u16 = 0;" + - 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: + - 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: u16 = 0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u16 = 0;" + type_: + IntegerType: U16 + value: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " const a: u16 = 0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " const a: u16 = 0;" + - 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: + - 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: u16 = 0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u16 = 0;" + type_: + IntegerType: U16 + value: + Value: + Integer: + - U16 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " const a: u16 = 0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " const a: u16 = 0;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/u16/mul.leo.out b/tests/expectations/compiler/compiler/integers/u16/mul.leo.out index c8e10ddd7e..b9c925f233 100644 --- a/tests/expectations/compiler/compiler/integers/u16/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/mul.leo.out @@ -16,3 +16,306 @@ 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u16/ne.leo.out b/tests/expectations/compiler/compiler/integers/u16/ne.leo.out index a22c6e07f9..b96579f50c 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ne.leo.out @@ -16,3 +16,303 @@ 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u16/sub.leo.out b/tests/expectations/compiler/compiler/integers/u16/sub.leo.out index 581e3a4c0e..083f61c3f7 100644 --- a/tests/expectations/compiler/compiler/integers/u16/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/sub.leo.out @@ -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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out index efd76605ea..361cf8917b 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out @@ -22,3 +22,412 @@ 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(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> 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(s: bool, a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u16, b: u16, c: u16) -> 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(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> 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(s: bool, a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u16, b: u16, c: u16) -> 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(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> 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(s: bool, a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U16 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: + IntegerType: U16 + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/u32/add.leo.out b/tests/expectations/compiler/compiler/integers/u32/add.leo.out index cce87d841b..39071558d2 100644 --- a/tests/expectations/compiler/compiler/integers/u32/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/add.leo.out @@ -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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" + 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, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" + 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, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" + 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, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out index c71660764d..3b2ff63fab 100644 --- a/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out @@ -16,3 +16,300 @@ 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: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> bool {\\\"}\"}" + 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, b: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"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: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32) -> 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + - 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 == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 3 + line_stop: 6 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> bool {\\\"}\"}" + 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, b: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"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: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32) -> 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + - 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 == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 3 + line_stop: 6 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> bool {\\\"}\"}" + 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, b: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"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: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32) -> 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + - 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 == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 3 + line_stop: 6 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32) -> bool {\n...\n}\n" diff --git a/tests/expectations/compiler/compiler/integers/u32/div.leo.out b/tests/expectations/compiler/compiler/integers/u32/div.leo.out index f094dd40c7..c1bbf6cc1d 100644 --- a/tests/expectations/compiler/compiler/integers/u32/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/div.leo.out @@ -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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" + 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, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" + 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, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" + 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, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u32/eq.leo.out b/tests/expectations/compiler/compiler/integers/u32/eq.leo.out index 3725ca33cf..850c9555a3 100644 --- a/tests/expectations/compiler/compiler/integers/u32/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/eq.leo.out @@ -22,3 +22,303 @@ 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" + 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, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" + 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, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" + 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, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u32/ge.leo.out b/tests/expectations/compiler/compiler/integers/u32/ge.leo.out index f3b6d4daab..d1dbabc5fc 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ge.leo.out @@ -28,3 +28,303 @@ 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" + 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, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" + 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, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" + 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, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u32/gt.leo.out b/tests/expectations/compiler/compiler/integers/u32/gt.leo.out index de3e0eaa70..9d941f1982 100644 --- a/tests/expectations/compiler/compiler/integers/u32/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/gt.leo.out @@ -16,3 +16,308 @@ outputs: - input_file: u32_f.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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) {\\\"}\"}" + 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, b: u32, c: bool) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) {" + output: ~ + block: + statements: + - Console: + function: + Assert: + Binary: + left: + 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 > b == c);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Gt + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " console.assert(a > b == c);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 3 + line_stop: 5 + col_start: 40 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) {\\\"}\"}" + 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, b: u32, c: bool) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) {" + output: + Tuple: [] + block: + statements: + - Console: + function: + Assert: + Binary: + left: + 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 > b == c);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Gt + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " console.assert(a > b == c);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 3 + line_stop: 5 + col_start: 40 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) {\\\"}\"}" + 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, b: u32, c: bool) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) {" + output: + Tuple: [] + block: + statements: + - Console: + function: + Assert: + Binary: + left: + 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 > b == c);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Gt + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " console.assert(a > b == c);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 3 + line_stop: 5 + col_start: 40 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u32/input.leo.out b/tests/expectations/compiler/compiler/integers/u32/input.leo.out index faf25437eb..ef7c7c6221 100644 --- a/tests/expectations/compiler/compiler/integers/u32/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/input.leo.out @@ -16,3 +16,231 @@ 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: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> bool {\\\"}\"}" + 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, b: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"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: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32) -> 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: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> bool {\\\"}\"}" + 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, b: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"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: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32) -> 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: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> bool {\\\"}\"}" + 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, b: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"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: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32) -> 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: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u32/le.leo.out b/tests/expectations/compiler/compiler/integers/u32/le.leo.out index 96634dacb9..86796171c1 100644 --- a/tests/expectations/compiler/compiler/integers/u32/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/le.leo.out @@ -28,3 +28,303 @@ 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" + 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, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" + 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, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" + 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, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u32/lt.leo.out b/tests/expectations/compiler/compiler/integers/u32/lt.leo.out index 8afdb33083..92796478c6 100644 --- a/tests/expectations/compiler/compiler/integers/u32/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/lt.leo.out @@ -22,3 +22,303 @@ 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" + 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, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> 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: Lt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" + 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, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> 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: Lt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" + 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, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> 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: Lt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u32/max.leo.out b/tests/expectations/compiler/compiler/integers/u32/max.leo.out index a8427152b6..5ac693012d 100644 --- a/tests/expectations/compiler/compiler/integers/u32/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/max.leo.out @@ -16,3 +16,307 @@ 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: u32 = 4294967295;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u32 = 4294967295;" + type_: + IntegerType: U32 + value: + Value: + Implicit: + - "4294967295" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " const a: u32 = 4294967295;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " const a: u32 = 4294967295;" + - 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: + - 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: u32 = 4294967295;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u32 = 4294967295;" + type_: + IntegerType: U32 + value: + Value: + Implicit: + - "4294967295" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " const a: u32 = 4294967295;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " const a: u32 = 4294967295;" + - 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: + - 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: u32 = 4294967295;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u32 = 4294967295;" + type_: + IntegerType: U32 + value: + Value: + Integer: + - U32 + - "4294967295" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " const a: u32 = 4294967295;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " const a: u32 = 4294967295;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/u32/min.leo.out b/tests/expectations/compiler/compiler/integers/u32/min.leo.out index a8427152b6..904e4e5f98 100644 --- a/tests/expectations/compiler/compiler/integers/u32/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/min.leo.out @@ -16,3 +16,307 @@ 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: u32 = 0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u32 = 0;" + type_: + IntegerType: U32 + value: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " const a: u32 = 0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " const a: u32 = 0;" + - 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: + - 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: u32 = 0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u32 = 0;" + type_: + IntegerType: U32 + value: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " const a: u32 = 0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " const a: u32 = 0;" + - 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: + - 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: u32 = 0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u32 = 0;" + type_: + IntegerType: U32 + value: + Value: + Integer: + - U32 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " const a: u32 = 0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " const a: u32 = 0;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/u32/mul.leo.out b/tests/expectations/compiler/compiler/integers/u32/mul.leo.out index 1451bf9488..4710034e1d 100644 --- a/tests/expectations/compiler/compiler/integers/u32/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/mul.leo.out @@ -16,3 +16,306 @@ 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" + 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, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" + 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, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" + 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, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u32/ne.leo.out b/tests/expectations/compiler/compiler/integers/u32/ne.leo.out index 47ba5c2c39..accd226aa3 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ne.leo.out @@ -16,3 +16,303 @@ 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" + 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, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" + 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, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" + 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, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u32/sub.leo.out b/tests/expectations/compiler/compiler/integers/u32/sub.leo.out index 182872366a..d07e7cc98b 100644 --- a/tests/expectations/compiler/compiler/integers/u32/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/sub.leo.out @@ -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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" + 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, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" + 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, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" + 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, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out index a9fb4f5675..990e98153f 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out @@ -22,3 +22,412 @@ 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(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> 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(s: bool, a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u32, b: u32, c: u32) -> 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(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> 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(s: bool, a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u32, b: u32, c: u32) -> 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(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> 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(s: bool, a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: + IntegerType: U32 + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/u64/add.leo.out b/tests/expectations/compiler/compiler/integers/u64/add.leo.out index 933a57163a..9895fac112 100644 --- a/tests/expectations/compiler/compiler/integers/u64/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/add.leo.out @@ -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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: Add + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out index 60832f5c08..c05d98c094 100644 --- a/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out @@ -16,3 +16,300 @@ 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: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64) -> 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + - 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 == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 3 + line_stop: 6 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64) -> 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + - 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 == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 3 + line_stop: 6 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64) -> 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + - 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 == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 3 + line_stop: 6 + col_start: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64) -> bool {\n...\n}\n" diff --git a/tests/expectations/compiler/compiler/integers/u64/div.leo.out b/tests/expectations/compiler/compiler/integers/u64/div.leo.out index 666d307e42..c47efdde38 100644 --- a/tests/expectations/compiler/compiler/integers/u64/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/div.leo.out @@ -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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u64/eq.leo.out b/tests/expectations/compiler/compiler/integers/u64/eq.leo.out index bbc1d1326e..3cfeab198b 100644 --- a/tests/expectations/compiler/compiler/integers/u64/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/eq.leo.out @@ -22,3 +22,303 @@ 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u64/ge.leo.out b/tests/expectations/compiler/compiler/integers/u64/ge.leo.out index f1b7f90fce..ea06d2f9ca 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ge.leo.out @@ -28,3 +28,303 @@ 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u64/gt.leo.out b/tests/expectations/compiler/compiler/integers/u64/gt.leo.out index 4aa1364383..a1e1b1eeec 100644 --- a/tests/expectations/compiler/compiler/integers/u64/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/gt.leo.out @@ -16,3 +16,308 @@ outputs: - input_file: u64_f.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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) {" + output: ~ + block: + statements: + - Console: + function: + Assert: + Binary: + left: + 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 > b == c);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Gt + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " console.assert(a > b == c);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 3 + line_stop: 5 + col_start: 40 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) {" + output: + Tuple: [] + block: + statements: + - Console: + function: + Assert: + Binary: + left: + 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 > b == c);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Gt + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " console.assert(a > b == c);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 3 + line_stop: 5 + col_start: 40 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) {" + output: + Tuple: [] + block: + statements: + - Console: + function: + Assert: + Binary: + left: + 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 > b == c);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Gt + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " console.assert(a > b == c);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 3 + line_stop: 5 + col_start: 40 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u64/input.leo.out b/tests/expectations/compiler/compiler/integers/u64/input.leo.out index 23589a81cc..22e44458d9 100644 --- a/tests/expectations/compiler/compiler/integers/u64/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/input.leo.out @@ -16,3 +16,231 @@ 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: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64) -> 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: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64) -> 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: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64) -> 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: 39 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u64/le.leo.out b/tests/expectations/compiler/compiler/integers/u64/le.leo.out index 993e4791fc..6ebcc79e1e 100644 --- a/tests/expectations/compiler/compiler/integers/u64/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/le.leo.out @@ -28,3 +28,303 @@ 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u64/lt.leo.out b/tests/expectations/compiler/compiler/integers/u64/lt.leo.out index 0c6e158cf2..04b8744bc5 100644 --- a/tests/expectations/compiler/compiler/integers/u64/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/lt.leo.out @@ -22,3 +22,303 @@ 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> 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: Lt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> 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: Lt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> 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: Lt + 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: Eq + 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: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u64/max.leo.out b/tests/expectations/compiler/compiler/integers/u64/max.leo.out index a8427152b6..1bf1ccf8b6 100644 --- a/tests/expectations/compiler/compiler/integers/u64/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/max.leo.out @@ -16,3 +16,307 @@ 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: u64 = 18446744073709551615;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u64 = 18446744073709551615;" + type_: + IntegerType: U64 + value: + Value: + Implicit: + - "18446744073709551615" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 40 + path: compiler-test + content: " const a: u64 = 18446744073709551615;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 40 + path: compiler-test + content: " const a: u64 = 18446744073709551615;" + - 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: + - 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: u64 = 18446744073709551615;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u64 = 18446744073709551615;" + type_: + IntegerType: U64 + value: + Value: + Implicit: + - "18446744073709551615" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 40 + path: compiler-test + content: " const a: u64 = 18446744073709551615;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 40 + path: compiler-test + content: " const a: u64 = 18446744073709551615;" + - 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: + - 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: u64 = 18446744073709551615;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u64 = 18446744073709551615;" + type_: + IntegerType: U64 + value: + Value: + Integer: + - U64 + - "18446744073709551615" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 40 + path: compiler-test + content: " const a: u64 = 18446744073709551615;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 40 + path: compiler-test + content: " const a: u64 = 18446744073709551615;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/u64/min.leo.out b/tests/expectations/compiler/compiler/integers/u64/min.leo.out index a8427152b6..a05f62e186 100644 --- a/tests/expectations/compiler/compiler/integers/u64/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/min.leo.out @@ -16,3 +16,307 @@ 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: u64 = 0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u64 = 0;" + type_: + IntegerType: U64 + value: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " const a: u64 = 0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " const a: u64 = 0;" + - 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: + - 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: u64 = 0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u64 = 0;" + type_: + IntegerType: U64 + value: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " const a: u64 = 0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " const a: u64 = 0;" + - 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: + - 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: u64 = 0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u64 = 0;" + type_: + IntegerType: U64 + value: + Value: + Integer: + - U64 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " const a: u64 = 0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " const a: u64 = 0;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/u64/mul.leo.out b/tests/expectations/compiler/compiler/integers/u64/mul.leo.out index 004f6cd486..4411b65023 100644 --- a/tests/expectations/compiler/compiler/integers/u64/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/mul.leo.out @@ -16,3 +16,306 @@ 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: Mul + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u64/ne.leo.out b/tests/expectations/compiler/compiler/integers/u64/ne.leo.out index 8e893cf1ff..3d1d897952 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ne.leo.out @@ -16,3 +16,303 @@ 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u64/sub.leo.out b/tests/expectations/compiler/compiler/integers/u64/sub.leo.out index 9d8ea76225..a95299a078 100644 --- a/tests/expectations/compiler/compiler/integers/u64/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/sub.leo.out @@ -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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> 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: Sub + 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: Eq + 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: 47 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out index ea98810683..a531339f29 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out @@ -22,3 +22,412 @@ 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(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> 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(s: bool, a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u64, b: u64, c: u64) -> 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(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> 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(s: bool, a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u64, b: u64, c: u64) -> 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(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> 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(s: bool, a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 32 + col_stop: 33 + path: compiler-test + content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U64 + span: + line_start: 3 + line_stop: 3 + col_start: 40 + col_stop: 41 + path: compiler-test + content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: + IntegerType: U64 + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 56 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/integers/u8/add.leo.out b/tests/expectations/compiler/compiler/integers/u8/add.leo.out index 230ecba080..804724c31d 100644 --- a/tests/expectations/compiler/compiler/integers/u8/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/add.leo.out @@ -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: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> 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: Add + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> 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: Add + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> 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: Add + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out index 2c0ee965b2..a307c40d52 100644 --- a/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out @@ -16,3 +16,300 @@ 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: u8, b: 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(a: u8, b: u8) -> 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, b: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8) -> 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + - 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 == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 3 + line_stop: 6 + col_start: 37 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8) -> 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, b: 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(a: u8, b: u8) -> 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, b: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8) -> 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + - 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 == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 3 + line_stop: 6 + col_start: 37 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8) -> 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, b: 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(a: u8, b: u8) -> 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, b: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8) -> 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 == b);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " console.assert(a == b);" + - 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 == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" + op: Eq + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return a == b;" + span: + line_start: 3 + line_stop: 6 + col_start: 37 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8) -> bool {\n...\n}\n" diff --git a/tests/expectations/compiler/compiler/integers/u8/div.leo.out b/tests/expectations/compiler/compiler/integers/u8/div.leo.out index 1497ad09b0..e295937640 100644 --- a/tests/expectations/compiler/compiler/integers/u8/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/div.leo.out @@ -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: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u8/eq.leo.out b/tests/expectations/compiler/compiler/integers/u8/eq.leo.out index 02dc94226a..ce8f6ad88c 100644 --- a/tests/expectations/compiler/compiler/integers/u8/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/eq.leo.out @@ -22,3 +22,303 @@ 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a == b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a == b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u8/ge.leo.out b/tests/expectations/compiler/compiler/integers/u8/ge.leo.out index ff772310fb..8f2d6d2bb4 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ge.leo.out @@ -28,3 +28,303 @@ 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Ge + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a >= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a >= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u8/gt.leo.out b/tests/expectations/compiler/compiler/integers/u8/gt.leo.out index b94d55facd..edc743fead 100644 --- a/tests/expectations/compiler/compiler/integers/u8/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/gt.leo.out @@ -16,3 +16,308 @@ outputs: - input_file: u8_f.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: u8, b: u8, c: 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, b: u8, c: 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, b: u8, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) {" + output: ~ + block: + statements: + - Console: + function: + Assert: + Binary: + left: + 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 > b == c);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Gt + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " console.assert(a > b == c);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 3 + line_stop: 5 + col_start: 38 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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, b: u8, c: 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, b: u8, c: 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, b: u8, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) {" + output: + Tuple: [] + block: + statements: + - Console: + function: + Assert: + Binary: + left: + 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 > b == c);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Gt + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " console.assert(a > b == c);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 3 + line_stop: 5 + col_start: 38 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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, b: u8, c: 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, b: u8, c: 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, b: u8, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) {" + output: + Tuple: [] + block: + statements: + - Console: + function: + Assert: + Binary: + left: + 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 > b == c);\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Gt + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " console.assert(a > b == c);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 30 + path: compiler-test + content: " console.assert(a > b == c);" + span: + line_start: 3 + line_stop: 5 + col_start: 38 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u8/input.leo.out b/tests/expectations/compiler/compiler/integers/u8/input.leo.out index 4426dded25..6447bae75f 100644 --- a/tests/expectations/compiler/compiler/integers/u8/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/input.leo.out @@ -16,3 +16,231 @@ 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: u8, b: 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(a: u8, b: u8) -> 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, b: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8) -> 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: 37 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: 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(a: u8, b: 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(a: u8, b: u8) -> 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, b: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8) -> 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: 37 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: 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(a: u8, b: 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(a: u8, b: u8) -> 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, b: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8) -> 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: 37 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u8/le.leo.out b/tests/expectations/compiler/compiler/integers/u8/le.leo.out index 7c66e93127..daad236bce 100644 --- a/tests/expectations/compiler/compiler/integers/u8/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/le.leo.out @@ -28,3 +28,303 @@ 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Le + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a <= b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a <= b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u8/lt.leo.out b/tests/expectations/compiler/compiler/integers/u8/lt.leo.out index 1b2fc00d80..aeeb4a7769 100644 --- a/tests/expectations/compiler/compiler/integers/u8/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/lt.leo.out @@ -22,3 +22,303 @@ 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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: Lt + 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: Eq + 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: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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: Lt + 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: Eq + 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: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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: Lt + 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: Eq + 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: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u8/max.leo.out b/tests/expectations/compiler/compiler/integers/u8/max.leo.out index a8427152b6..25e3b6e8da 100644 --- a/tests/expectations/compiler/compiler/integers/u8/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/max.leo.out @@ -16,3 +16,307 @@ 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 = 255;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u8 = 255;" + type_: + IntegerType: U8 + value: + Value: + Implicit: + - "255" + - line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " const a: u8 = 255;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a: u8 = 255;" + - 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: + - 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 = 255;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u8 = 255;" + type_: + IntegerType: U8 + value: + Value: + Implicit: + - "255" + - line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " const a: u8 = 255;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a: u8 = 255;" + - 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: + - 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 = 255;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u8 = 255;" + type_: + IntegerType: U8 + value: + Value: + Integer: + - U8 + - "255" + - line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " const a: u8 = 255;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " const a: u8 = 255;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/u8/min.leo.out b/tests/expectations/compiler/compiler/integers/u8/min.leo.out index a8427152b6..ade802b62f 100644 --- a/tests/expectations/compiler/compiler/integers/u8/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/min.leo.out @@ -16,3 +16,307 @@ 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 = 0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u8 = 0;" + type_: + IntegerType: U8 + value: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " const a: u8 = 0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 20 + path: compiler-test + content: " const a: u8 = 0;" + - 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: + - 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 = 0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u8 = 0;" + type_: + IntegerType: U8 + value: + Value: + Implicit: + - "0" + - line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " const a: u8 = 0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 20 + path: compiler-test + content: " const a: u8 = 0;" + - 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: + - 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 = 0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a: u8 = 0;" + type_: + IntegerType: U8 + value: + Value: + Integer: + - U8 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " const a: u8 = 0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 20 + path: compiler-test + content: " const a: u8 = 0;" + - 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" diff --git a/tests/expectations/compiler/compiler/integers/u8/mul.leo.out b/tests/expectations/compiler/compiler/integers/u8/mul.leo.out index c53d755410..3c7cee275e 100644 --- a/tests/expectations/compiler/compiler/integers/u8/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/mul.leo.out @@ -16,3 +16,306 @@ 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: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> 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: Mul + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> 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: Mul + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> 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: Mul + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u8/ne.leo.out b/tests/expectations/compiler/compiler/integers/u8/ne.leo.out index 677cbc377e..61a464a427 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ne.leo.out @@ -16,3 +16,303 @@ 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Ne + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return a != b == c;" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return a != b == c;" + span: + line_start: 3 + line_stop: 5 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u8/sub.leo.out b/tests/expectations/compiler/compiler/integers/u8/sub.leo.out index c5a39d5449..1abb40cf35 100644 --- a/tests/expectations/compiler/compiler/integers/u8/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/sub.leo.out @@ -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: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> 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: Sub + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> 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: Sub + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 22 + col_stop: 23 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 29 + col_stop: 30 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> 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: Sub + 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: Eq + 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: 44 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" diff --git a/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out index 921c10b1d8..659b3553f8 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out @@ -22,3 +22,412 @@ 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(s: bool, a: u8, b: u8, c: 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(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> 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(s: bool, a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 38 + col_stop: 39 + path: compiler-test + content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 53 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u8, b: u8, c: u8) -> 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(s: bool, a: u8, b: u8, c: 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(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> 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(s: bool, a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 38 + col_stop: 39 + path: compiler-test + content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: ~ + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 53 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u8, b: u8, c: u8) -> 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(s: bool, a: u8, b: u8, c: 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(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> 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(s: bool, a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 24 + col_stop: 25 + path: compiler-test + content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 32 + path: compiler-test + content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" + - Variable: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U8 + span: + line_start: 3 + line_stop: 3 + col_start: 38 + col_stop: 39 + path: compiler-test + content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r = s ? a : b;" + type_: + IntegerType: U8 + value: + Ternary: + condition: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_true: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + if_false: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " let r = s ? a : b;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == c;" + span: + line_start: 3 + line_stop: 7 + col_start: 53 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out index b1d1893bf2..e42dfd179d 100644 --- a/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out @@ -22,3 +22,701 @@ outputs: r0: type: "[u32; 3]" value: "\"150\"" + 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(i: u32) -> [u32; 3] {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [u32; 3] {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [u32; 3] {\\\"}\"}" + 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(i: u32) -> [u32; 3] {" + output: + Array: + - IntegerType: U32 + - - value: "3" + 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 = [1u32, 2u32, 3u32];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + type_: ~ + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Expression: + Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Expression: + Value: + Integer: + - U32 + - "3" + - line_start: 4 + line_stop: 4 + col_start: 26 + col_stop: 30 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 31 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 31 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Assign: + operation: Add + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + accesses: + - ArrayIndex: + Binary: + left: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[i - 1] += a[i];" + op: Sub + span: + line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 12 + path: compiler-test + content: " a[i - 1] += a[i];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " a[i - 1] += a[i];" + value: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + index: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " a[i - 1] += a[i];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " a[i - 1] += a[i];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = 0;\\\"}\"}" + accesses: + - ArrayIndex: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = 0;\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " a[i] = 0;" + value: + Value: + Implicit: + - "0" + - line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 13 + path: compiler-test + content: " a[i] = 0;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " a[i] = 0;" + - Return: + expression: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " return a;" + span: + line_start: 3 + line_stop: 9 + col_start: 35 + col_stop: 2 + path: compiler-test + content: "function main(i: u32) -> [u32; 3] {\n...\n}" + span: + line_start: 3 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(i: u32) -> [u32; 3] {\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(i: u32) -> [u32; 3] {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [u32; 3] {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [u32; 3] {\\\"}\"}" + 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(i: u32) -> [u32; 3] {" + output: + Array: + - IntegerType: U32 + - - value: "3" + 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 = [1u32, 2u32, 3u32];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + type_: ~ + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Expression: + Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Expression: + Value: + Integer: + - U32 + - "3" + - line_start: 4 + line_stop: 4 + col_start: 26 + col_stop: 30 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 31 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 31 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + accesses: + - ArrayIndex: + Binary: + left: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[i - 1] += a[i];" + op: Sub + span: + line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 12 + path: compiler-test + content: " a[i - 1] += a[i];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " a[i - 1] += a[i];" + value: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + index: + Binary: + left: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[i - 1] += a[i];" + op: Sub + span: + line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 12 + path: compiler-test + content: " a[i - 1] += a[i];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " a[i - 1] += a[i];" + right: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + index: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " a[i - 1] += a[i];" + op: Add + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " a[i - 1] += a[i];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " a[i - 1] += a[i];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = 0;\\\"}\"}" + accesses: + - ArrayIndex: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = 0;\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " a[i] = 0;" + value: + Value: + Implicit: + - "0" + - line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 13 + path: compiler-test + content: " a[i] = 0;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " a[i] = 0;" + - Return: + expression: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " return a;" + span: + line_start: 3 + line_stop: 9 + col_start: 35 + col_stop: 2 + path: compiler-test + content: "function main(i: u32) -> [u32; 3] {\n...\n}" + span: + line_start: 3 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(i: u32) -> [u32; 3] {\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(i: u32) -> [u32; 3] {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [u32; 3] {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [u32; 3] {\\\"}\"}" + 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(i: u32) -> [u32; 3] {" + output: + Array: + - IntegerType: U32 + - - value: "3" + 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 = [1u32, 2u32, 3u32];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + type_: + Array: + - IntegerType: U32 + - - value: "3" + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Expression: + Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Expression: + Value: + Integer: + - U32 + - "3" + - line_start: 4 + line_stop: 4 + col_start: 26 + col_stop: 30 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 31 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 31 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + accesses: + - ArrayIndex: + Binary: + left: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[i - 1] += a[i];" + op: Sub + span: + line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 12 + path: compiler-test + content: " a[i - 1] += a[i];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " a[i - 1] += a[i];" + value: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + index: + Binary: + left: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 5 + line_stop: 5 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a[i - 1] += a[i];" + op: Sub + span: + line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 12 + path: compiler-test + content: " a[i - 1] += a[i];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " a[i - 1] += a[i];" + right: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + index: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " a[i - 1] += a[i];" + op: Add + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " a[i - 1] += a[i];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " a[i - 1] += a[i];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = 0;\\\"}\"}" + accesses: + - ArrayIndex: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = 0;\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " a[i] = 0;" + value: + Value: + Integer: + - U32 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 13 + path: compiler-test + content: " a[i] = 0;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " a[i] = 0;" + - Return: + expression: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " return a;" + span: + line_start: 3 + line_stop: 9 + col_start: 35 + col_stop: 2 + path: compiler-test + content: "function main(i: u32) -> [u32; 3] {\n...\n}" + span: + line_start: 3 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(i: u32) -> [u32; 3] {\n...\n}\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out b/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out index 957a1fa319..c140aedd21 100644 --- a/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out @@ -22,3 +22,772 @@ outputs: r0: type: "[(u32, u32); 3]" value: "\"(1, 1)(2, 2)(0, 1)\"" + 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(i: u32) -> [(u32, u32); 3] {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [(u32, u32); 3] {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [(u32, u32); 3] {\\\"}\"}" + 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(i: u32) -> [(u32, u32); 3] {" + output: + Array: + - Tuple: + - IntegerType: U32 + - IntegerType: U32 + - - value: "3" + 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 = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + type_: ~ + value: + ArrayInline: + elements: + - Expression: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 25 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 26 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Expression: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 33 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 39 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 28 + col_stop: 40 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Expression: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "3" + - line_start: 4 + line_stop: 4 + col_start: 43 + col_stop: 47 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Value: + Integer: + - U32 + - "3" + - line_start: 4 + line_stop: 4 + col_start: 49 + col_stop: 53 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 54 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 55 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 55 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].0 = 0;\\\"}\"}" + accesses: + - ArrayIndex: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].0 = 0;\\\"}\"}" + - Tuple: + - value: "0" + - line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 11 + path: compiler-test + content: " a[i].0 = 0;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 11 + path: compiler-test + content: " a[i].0 = 0;" + value: + Value: + Implicit: + - "0" + - line_start: 5 + line_stop: 5 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " a[i].0 = 0;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 15 + path: compiler-test + content: " a[i].0 = 0;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].1 = 1;\\\"}\"}" + accesses: + - ArrayIndex: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].1 = 1;\\\"}\"}" + - Tuple: + - value: "1" + - line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 11 + path: compiler-test + content: " a[i].1 = 1;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 11 + path: compiler-test + content: " a[i].1 = 1;" + value: + Value: + Implicit: + - "1" + - line_start: 6 + line_stop: 6 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " a[i].1 = 1;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 15 + path: compiler-test + content: " a[i].1 = 1;" + - Return: + expression: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " return a;" + span: + line_start: 3 + line_stop: 9 + col_start: 42 + col_stop: 2 + path: compiler-test + content: "function main(i: u32) -> [(u32, u32); 3] {\n...\n}" + span: + line_start: 3 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(i: u32) -> [(u32, u32); 3] {\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(i: u32) -> [(u32, u32); 3] {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [(u32, u32); 3] {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [(u32, u32); 3] {\\\"}\"}" + 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(i: u32) -> [(u32, u32); 3] {" + output: + Array: + - Tuple: + - IntegerType: U32 + - IntegerType: U32 + - - value: "3" + 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 = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + type_: ~ + value: + ArrayInline: + elements: + - Expression: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 25 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 26 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Expression: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 33 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 39 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 28 + col_stop: 40 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Expression: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "3" + - line_start: 4 + line_stop: 4 + col_start: 43 + col_stop: 47 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Value: + Integer: + - U32 + - "3" + - line_start: 4 + line_stop: 4 + col_start: 49 + col_stop: 53 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 54 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 55 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 55 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].0 = 0;\\\"}\"}" + accesses: + - ArrayIndex: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].0 = 0;\\\"}\"}" + - Tuple: + - value: "0" + - line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 11 + path: compiler-test + content: " a[i].0 = 0;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 11 + path: compiler-test + content: " a[i].0 = 0;" + value: + Value: + Implicit: + - "0" + - line_start: 5 + line_stop: 5 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " a[i].0 = 0;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 15 + path: compiler-test + content: " a[i].0 = 0;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].1 = 1;\\\"}\"}" + accesses: + - ArrayIndex: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].1 = 1;\\\"}\"}" + - Tuple: + - value: "1" + - line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 11 + path: compiler-test + content: " a[i].1 = 1;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 11 + path: compiler-test + content: " a[i].1 = 1;" + value: + Value: + Implicit: + - "1" + - line_start: 6 + line_stop: 6 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " a[i].1 = 1;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 15 + path: compiler-test + content: " a[i].1 = 1;" + - Return: + expression: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " return a;" + span: + line_start: 3 + line_stop: 9 + col_start: 42 + col_stop: 2 + path: compiler-test + content: "function main(i: u32) -> [(u32, u32); 3] {\n...\n}" + span: + line_start: 3 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(i: u32) -> [(u32, u32); 3] {\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(i: u32) -> [(u32, u32); 3] {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [(u32, u32); 3] {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [(u32, u32); 3] {\\\"}\"}" + 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(i: u32) -> [(u32, u32); 3] {" + output: + Array: + - Tuple: + - IntegerType: U32 + - IntegerType: U32 + - - value: "3" + 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 = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + type_: + Array: + - Tuple: + - IntegerType: U32 + - IntegerType: U32 + - - value: "3" + value: + ArrayInline: + elements: + - Expression: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 25 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 26 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Expression: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 33 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 39 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 28 + col_stop: 40 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Expression: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "3" + - line_start: 4 + line_stop: 4 + col_start: 43 + col_stop: 47 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Value: + Integer: + - U32 + - "3" + - line_start: 4 + line_stop: 4 + col_start: 49 + col_stop: 53 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 54 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 55 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 55 + path: compiler-test + content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].0 = 0;\\\"}\"}" + accesses: + - ArrayIndex: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].0 = 0;\\\"}\"}" + - Tuple: + - value: "0" + - line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 11 + path: compiler-test + content: " a[i].0 = 0;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 11 + path: compiler-test + content: " a[i].0 = 0;" + value: + Value: + Integer: + - U32 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " a[i].0 = 0;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 15 + path: compiler-test + content: " a[i].0 = 0;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].1 = 1;\\\"}\"}" + accesses: + - ArrayIndex: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].1 = 1;\\\"}\"}" + - Tuple: + - value: "1" + - line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 11 + path: compiler-test + content: " a[i].1 = 1;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 11 + path: compiler-test + content: " a[i].1 = 1;" + value: + Value: + Integer: + - U32 + - "1" + - line_start: 6 + line_stop: 6 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " a[i].1 = 1;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 15 + path: compiler-test + content: " a[i].1 = 1;" + - Return: + expression: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " return a;" + span: + line_start: 3 + line_stop: 9 + col_start: 42 + col_stop: 2 + path: compiler-test + content: "function main(i: u32) -> [(u32, u32); 3] {\n...\n}" + span: + line_start: 3 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(i: u32) -> [(u32, u32); 3] {\n...\n}\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out index b9b6741851..71318242c9 100644 --- a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out @@ -16,3 +16,555 @@ 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: 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 = [1u32];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = [1u32];" + type_: ~ + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " let a = [1u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " let a = [1u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " let a = [1u32];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0] = 0;\\\"}\"}" + accesses: + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 8 + path: compiler-test + content: " a[0] = 0;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " a[0] = 0;" + value: + Value: + Implicit: + - "0" + - line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 13 + path: compiler-test + content: " a[0] = 0;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " a[0] = 0;" + - Return: + expression: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 0u32 == y;\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " return a[0] == 0u32 == y;" + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return a[0] == 0u32 == y;" + right: + Value: + Integer: + - U32 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " return a[0] == 0u32 == y;" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return a[0] == 0u32 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 0u32 == y;\\\"}\"}" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 29 + path: compiler-test + content: " return a[0] == 0u32 == y;" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 29 + path: compiler-test + content: " return a[0] == 0u32 == 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: 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 = [1u32];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = [1u32];" + type_: ~ + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " let a = [1u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " let a = [1u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " let a = [1u32];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0] = 0;\\\"}\"}" + accesses: + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 8 + path: compiler-test + content: " a[0] = 0;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " a[0] = 0;" + value: + Value: + Implicit: + - "0" + - line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 13 + path: compiler-test + content: " a[0] = 0;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " a[0] = 0;" + - Return: + expression: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 0u32 == y;\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " return a[0] == 0u32 == y;" + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return a[0] == 0u32 == y;" + right: + Value: + Integer: + - U32 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " return a[0] == 0u32 == y;" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return a[0] == 0u32 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 0u32 == y;\\\"}\"}" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 29 + path: compiler-test + content: " return a[0] == 0u32 == y;" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 29 + path: compiler-test + content: " return a[0] == 0u32 == 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: 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 = [1u32];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = [1u32];" + type_: + Array: + - IntegerType: U32 + - - value: "1" + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " let a = [1u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " let a = [1u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 19 + path: compiler-test + content: " let a = [1u32];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0] = 0;\\\"}\"}" + accesses: + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 8 + path: compiler-test + content: " a[0] = 0;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " a[0] = 0;" + value: + Value: + Integer: + - U32 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 13 + path: compiler-test + content: " a[0] = 0;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " a[0] = 0;" + - Return: + expression: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 0u32 == y;\\\"}\"}" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " return a[0] == 0u32 == y;" + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return a[0] == 0u32 == y;" + right: + Value: + Integer: + - U32 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " return a[0] == 0u32 == y;" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return a[0] == 0u32 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 0u32 == y;\\\"}\"}" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 29 + path: compiler-test + content: " return a[0] == 0u32 == y;" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 29 + path: compiler-test + content: " return a[0] == 0u32 == 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" diff --git a/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out index b9b6741851..0333dead54 100644 --- a/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out @@ -16,3 +16,1092 @@ 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: 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 = [1u32, 2u32, 3u32];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + type_: ~ + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Expression: + Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Expression: + Value: + Integer: + - U32 + - "3" + - line_start: 4 + line_stop: 4 + col_start: 26 + col_stop: 30 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 31 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 31 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0u32..2u32] = [4u32, 5u32];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Integer: + - U32 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 11 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + - Value: + Integer: + - U32 + - "2" + - line_start: 5 + line_stop: 5 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U32 + - "4" + - line_start: 5 + line_stop: 5 + col_start: 22 + col_stop: 26 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + - Expression: + Value: + Integer: + - U32 + - "5" + - line_start: 5 + line_stop: 5 + col_start: 28 + col_stop: 32 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + span: + line_start: 5 + line_stop: 5 + col_start: 21 + col_stop: 33 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 33 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + - Return: + expression: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 4u32\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " return a[0] == 4u32" + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return a[0] == 4u32" + right: + Value: + Integer: + - U32 + - "4" + - line_start: 7 + line_stop: 7 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " return a[0] == 4u32" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return a[0] == 4u32" + right: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[1] == 5u32\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 8 + line_stop: 8 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " && a[1] == 5u32" + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " && a[1] == 5u32" + right: + Value: + Integer: + - U32 + - "5" + - line_start: 8 + line_stop: 8 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " && a[1] == 5u32" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " && a[1] == 5u32" + op: And + span: + line_start: 7 + line_stop: 8 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return a[0] == 4u32\n && a[1] == 5u32" + right: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[2] == 3u32\\\"}\"}" + index: + Value: + Implicit: + - "2" + - line_start: 9 + line_stop: 9 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " && a[2] == 3u32" + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " && a[2] == 3u32" + right: + Value: + Integer: + - U32 + - "3" + - line_start: 9 + line_stop: 9 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " && a[2] == 3u32" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " && a[2] == 3u32" + op: And + span: + line_start: 7 + line_stop: 9 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32" + right: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == true;\\\"}\"}" + right: + Value: + Boolean: + - "true" + - line_start: 10 + line_stop: 10 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && y == true;" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && y == true;" + op: And + span: + line_start: 7 + line_stop: 10 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32\n && y == true;" + span: + line_start: 7 + line_stop: 10 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32\n && y == true;" + span: + line_start: 3 + line_stop: 11 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 11 + 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\":\"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\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = [1u32, 2u32, 3u32];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + type_: ~ + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Expression: + Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Expression: + Value: + Integer: + - U32 + - "3" + - line_start: 4 + line_stop: 4 + col_start: 26 + col_stop: 30 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 31 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 31 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0u32..2u32] = [4u32, 5u32];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Integer: + - U32 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 11 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + - Value: + Integer: + - U32 + - "2" + - line_start: 5 + line_stop: 5 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U32 + - "4" + - line_start: 5 + line_stop: 5 + col_start: 22 + col_stop: 26 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + - Expression: + Value: + Integer: + - U32 + - "5" + - line_start: 5 + line_stop: 5 + col_start: 28 + col_stop: 32 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + span: + line_start: 5 + line_stop: 5 + col_start: 21 + col_stop: 33 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 33 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + - Return: + expression: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 4u32\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " return a[0] == 4u32" + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return a[0] == 4u32" + right: + Value: + Integer: + - U32 + - "4" + - line_start: 7 + line_stop: 7 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " return a[0] == 4u32" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return a[0] == 4u32" + right: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[1] == 5u32\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 8 + line_stop: 8 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " && a[1] == 5u32" + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " && a[1] == 5u32" + right: + Value: + Integer: + - U32 + - "5" + - line_start: 8 + line_stop: 8 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " && a[1] == 5u32" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " && a[1] == 5u32" + op: And + span: + line_start: 7 + line_stop: 8 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return a[0] == 4u32\n && a[1] == 5u32" + right: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[2] == 3u32\\\"}\"}" + index: + Value: + Implicit: + - "2" + - line_start: 9 + line_stop: 9 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " && a[2] == 3u32" + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " && a[2] == 3u32" + right: + Value: + Integer: + - U32 + - "3" + - line_start: 9 + line_stop: 9 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " && a[2] == 3u32" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " && a[2] == 3u32" + op: And + span: + line_start: 7 + line_stop: 9 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32" + right: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == true;\\\"}\"}" + right: + Value: + Boolean: + - "true" + - line_start: 10 + line_stop: 10 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && y == true;" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && y == true;" + op: And + span: + line_start: 7 + line_stop: 10 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32\n && y == true;" + span: + line_start: 7 + line_stop: 10 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32\n && y == true;" + span: + line_start: 3 + line_stop: 11 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 11 + 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\":\"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\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = [1u32, 2u32, 3u32];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + type_: + Array: + - IntegerType: U32 + - - value: "3" + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Expression: + Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Expression: + Value: + Integer: + - U32 + - "3" + - line_start: 4 + line_stop: 4 + col_start: 26 + col_stop: 30 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 31 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 31 + path: compiler-test + content: " let a = [1u32, 2u32, 3u32];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0u32..2u32] = [4u32, 5u32];\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Integer: + - U32 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 11 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + - Value: + Integer: + - U32 + - "2" + - line_start: 5 + line_stop: 5 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U32 + - "4" + - line_start: 5 + line_stop: 5 + col_start: 22 + col_stop: 26 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + - Expression: + Value: + Integer: + - U32 + - "5" + - line_start: 5 + line_stop: 5 + col_start: 28 + col_stop: 32 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + span: + line_start: 5 + line_stop: 5 + col_start: 21 + col_stop: 33 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 33 + path: compiler-test + content: " a[0u32..2u32] = [4u32, 5u32];" + - Return: + expression: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 4u32\\\"}\"}" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " return a[0] == 4u32" + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " return a[0] == 4u32" + right: + Value: + Integer: + - U32 + - "4" + - line_start: 7 + line_stop: 7 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " return a[0] == 4u32" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return a[0] == 4u32" + right: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[1] == 5u32\\\"}\"}" + index: + Value: + Integer: + - U32 + - "1" + - line_start: 8 + line_stop: 8 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " && a[1] == 5u32" + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " && a[1] == 5u32" + right: + Value: + Integer: + - U32 + - "5" + - line_start: 8 + line_stop: 8 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " && a[1] == 5u32" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " && a[1] == 5u32" + op: And + span: + line_start: 7 + line_stop: 8 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return a[0] == 4u32\n && a[1] == 5u32" + right: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[2] == 3u32\\\"}\"}" + index: + Value: + Integer: + - U32 + - "2" + - line_start: 9 + line_stop: 9 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " && a[2] == 3u32" + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " && a[2] == 3u32" + right: + Value: + Integer: + - U32 + - "3" + - line_start: 9 + line_stop: 9 + col_start: 20 + col_stop: 24 + path: compiler-test + content: " && a[2] == 3u32" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " && a[2] == 3u32" + op: And + span: + line_start: 7 + line_stop: 9 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32" + right: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == true;\\\"}\"}" + right: + Value: + Boolean: + - "true" + - line_start: 10 + line_stop: 10 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && y == true;" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && y == true;" + op: And + span: + line_start: 7 + line_stop: 10 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32\n && y == true;" + span: + line_start: 7 + line_stop: 10 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32\n && y == true;" + span: + line_start: 3 + line_stop: 11 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 11 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out index b9b6741851..6f34aecebd 100644 --- a/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out @@ -16,3 +16,929 @@ 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: 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 = [(1u32, 2u32)];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + type_: ~ + value: + ArrayInline: + elements: + - Expression: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + - Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 25 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 26 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 27 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0u32].1 = 3u32;\\\"}\"}" + accesses: + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 11 + path: compiler-test + content: " a[0u32].1 = 3u32;" + - Tuple: + - value: "1" + - line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " a[0u32].1 = 3u32;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " a[0u32].1 = 3u32;" + value: + Value: + Integer: + - U32 + - "3" + - line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " a[0u32].1 = 3u32;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " a[0u32].1 = 3u32;" + - Return: + expression: + Binary: + left: + Binary: + left: + Binary: + left: + TupleAccess: + tuple: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0u32].0 == 1u32\\\"}\"}" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " return a[0u32].0 == 1u32" + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return a[0u32].0 == 1u32" + index: + value: "0" + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a[0u32].0 == 1u32" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 7 + line_stop: 7 + col_start: 25 + col_stop: 29 + path: compiler-test + content: " return a[0u32].0 == 1u32" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 29 + path: compiler-test + content: " return a[0u32].0 == 1u32" + right: + Binary: + left: + TupleAccess: + tuple: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[0u32].1 == 3u32\\\"}\"}" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 8 + line_stop: 8 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " && a[0u32].1 == 3u32" + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " && a[0u32].1 == 3u32" + index: + value: "1" + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && a[0u32].1 == 3u32" + right: + Value: + Integer: + - U32 + - "3" + - line_start: 8 + line_stop: 8 + col_start: 25 + col_stop: 29 + path: compiler-test + content: " && a[0u32].1 == 3u32" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 29 + path: compiler-test + content: " && a[0u32].1 == 3u32" + op: And + span: + line_start: 7 + line_stop: 8 + col_start: 12 + col_stop: 29 + path: compiler-test + content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32" + right: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == true;\\\"}\"}" + right: + Value: + Boolean: + - "true" + - line_start: 9 + line_stop: 9 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && y == true;" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && y == true;" + op: And + span: + line_start: 7 + line_stop: 9 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32\n && y == true;" + span: + line_start: 7 + line_stop: 9 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32\n && y == true;" + 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: 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 = [(1u32, 2u32)];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + type_: ~ + value: + ArrayInline: + elements: + - Expression: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + - Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 25 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 26 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 27 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0u32].1 = 3u32;\\\"}\"}" + accesses: + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 11 + path: compiler-test + content: " a[0u32].1 = 3u32;" + - Tuple: + - value: "1" + - line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " a[0u32].1 = 3u32;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " a[0u32].1 = 3u32;" + value: + Value: + Integer: + - U32 + - "3" + - line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " a[0u32].1 = 3u32;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " a[0u32].1 = 3u32;" + - Return: + expression: + Binary: + left: + Binary: + left: + Binary: + left: + TupleAccess: + tuple: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0u32].0 == 1u32\\\"}\"}" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " return a[0u32].0 == 1u32" + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return a[0u32].0 == 1u32" + index: + value: "0" + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a[0u32].0 == 1u32" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 7 + line_stop: 7 + col_start: 25 + col_stop: 29 + path: compiler-test + content: " return a[0u32].0 == 1u32" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 29 + path: compiler-test + content: " return a[0u32].0 == 1u32" + right: + Binary: + left: + TupleAccess: + tuple: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[0u32].1 == 3u32\\\"}\"}" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 8 + line_stop: 8 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " && a[0u32].1 == 3u32" + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " && a[0u32].1 == 3u32" + index: + value: "1" + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && a[0u32].1 == 3u32" + right: + Value: + Integer: + - U32 + - "3" + - line_start: 8 + line_stop: 8 + col_start: 25 + col_stop: 29 + path: compiler-test + content: " && a[0u32].1 == 3u32" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 29 + path: compiler-test + content: " && a[0u32].1 == 3u32" + op: And + span: + line_start: 7 + line_stop: 8 + col_start: 12 + col_stop: 29 + path: compiler-test + content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32" + right: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == true;\\\"}\"}" + right: + Value: + Boolean: + - "true" + - line_start: 9 + line_stop: 9 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && y == true;" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && y == true;" + op: And + span: + line_start: 7 + line_stop: 9 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32\n && y == true;" + span: + line_start: 7 + line_stop: 9 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32\n && y == true;" + 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: 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 = [(1u32, 2u32)];\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + type_: + Array: + - Tuple: + - IntegerType: U32 + - IntegerType: U32 + - - value: "1" + value: + ArrayInline: + elements: + - Expression: + TupleInit: + elements: + - Value: + Integer: + - U32 + - "1" + - line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 19 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + - Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 25 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 26 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 27 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " let a = [(1u32, 2u32)];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0u32].1 = 3u32;\\\"}\"}" + accesses: + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 5 + line_stop: 5 + col_start: 7 + col_stop: 11 + path: compiler-test + content: " a[0u32].1 = 3u32;" + - Tuple: + - value: "1" + - line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " a[0u32].1 = 3u32;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " a[0u32].1 = 3u32;" + value: + Value: + Integer: + - U32 + - "3" + - line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " a[0u32].1 = 3u32;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " a[0u32].1 = 3u32;" + - Return: + expression: + Binary: + left: + Binary: + left: + Binary: + left: + TupleAccess: + tuple: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0u32].0 == 1u32\\\"}\"}" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " return a[0u32].0 == 1u32" + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " return a[0u32].0 == 1u32" + index: + value: "0" + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a[0u32].0 == 1u32" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 7 + line_stop: 7 + col_start: 25 + col_stop: 29 + path: compiler-test + content: " return a[0u32].0 == 1u32" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 29 + path: compiler-test + content: " return a[0u32].0 == 1u32" + right: + Binary: + left: + TupleAccess: + tuple: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[0u32].1 == 3u32\\\"}\"}" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 8 + line_stop: 8 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " && a[0u32].1 == 3u32" + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 19 + path: compiler-test + content: " && a[0u32].1 == 3u32" + index: + value: "1" + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && a[0u32].1 == 3u32" + right: + Value: + Integer: + - U32 + - "3" + - line_start: 8 + line_stop: 8 + col_start: 25 + col_stop: 29 + path: compiler-test + content: " && a[0u32].1 == 3u32" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 29 + path: compiler-test + content: " && a[0u32].1 == 3u32" + op: And + span: + line_start: 7 + line_stop: 8 + col_start: 12 + col_stop: 29 + path: compiler-test + content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32" + right: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == true;\\\"}\"}" + right: + Value: + Boolean: + - "true" + - line_start: 9 + line_stop: 9 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " && y == true;" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " && y == true;" + op: And + span: + line_start: 7 + line_stop: 9 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32\n && y == true;" + span: + line_start: 7 + line_stop: 9 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32\n && y == true;" + 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" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out index b9b6741851..f786bc6196 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out @@ -16,3 +16,677 @@ 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\":\"foo\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function foo(mut self) {\\\"}\"}" + input: + - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function foo(mut self) {\\\"}\"}" + 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.x = 10;\\\"}\"}" + accesses: + - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x = 10;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " self.x = 10;" + value: + Value: + Implicit: + - "10" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 20 + path: compiler-test + content: " self.x = 10;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 20 + path: compiler-test + content: " self.x = 10;" + span: + line_start: 6 + line_stop: 8 + col_start: 28 + col_stop: 6 + path: compiler-test + content: " function foo(mut self) {\n...\n }" + span: + line_start: 6 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function foo(mut self) {\n...\n }" + global_consts: {} + functions: + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 12 + line_stop: 12 + 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\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = Foo { x: 1 };" + type_: ~ + value: + CircuitInit: + name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + members: + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + expression: + Value: + Implicit: + - "1" + - line_start: 13 + line_stop: 13 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " let a = Foo { x: 1 };" + span: + line_start: 13 + line_stop: 13 + col_start: 13 + col_stop: 25 + path: compiler-test + content: " let a = Foo { x: 1 };" + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " let a = Foo { x: 1 };" + - Expression: + expression: + Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.foo();\\\"}\"}" + name: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.foo();\\\"}\"}" + span: + line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 10 + path: compiler-test + content: " a.foo();" + arguments: [] + span: + line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " a.foo();" + span: + line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " a.foo();" + - Return: + expression: + Binary: + left: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" + span: + line_start: 17 + line_stop: 17 + col_start: 12 + col_stop: 15 + path: compiler-test + content: " return a.x == 10u32 == y;" + right: + Value: + Integer: + - U32 + - "10" + - line_start: 17 + line_stop: 17 + col_start: 19 + col_stop: 24 + path: compiler-test + content: " return a.x == 10u32 == y;" + op: Eq + span: + line_start: 17 + line_stop: 17 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return a.x == 10u32 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" + op: Eq + span: + line_start: 17 + line_stop: 17 + col_start: 12 + col_stop: 29 + path: compiler-test + content: " return a.x == 10u32 == y;" + span: + line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 29 + path: compiler-test + content: " return a.x == 10u32 == y;" + span: + line_start: 12 + line_stop: 18 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 12 + line_stop: 18 + 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\\\":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\":\"foo\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function foo(mut self) {\\\"}\"}" + input: + - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function foo(mut self) {\\\"}\"}" + 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.x = 10;\\\"}\"}" + accesses: + - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x = 10;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " self.x = 10;" + value: + Value: + Implicit: + - "10" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 20 + path: compiler-test + content: " self.x = 10;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 20 + path: compiler-test + content: " self.x = 10;" + span: + line_start: 6 + line_stop: 8 + col_start: 28 + col_stop: 6 + path: compiler-test + content: " function foo(mut self) {\n...\n }" + span: + line_start: 6 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function foo(mut self) {\n...\n }" + global_consts: {} + functions: + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 12 + line_stop: 12 + 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\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = Foo { x: 1 };" + type_: ~ + value: + CircuitInit: + name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + members: + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + expression: + Value: + Implicit: + - "1" + - line_start: 13 + line_stop: 13 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " let a = Foo { x: 1 };" + span: + line_start: 13 + line_stop: 13 + col_start: 13 + col_stop: 25 + path: compiler-test + content: " let a = Foo { x: 1 };" + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " let a = Foo { x: 1 };" + - Expression: + expression: + Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.foo();\\\"}\"}" + name: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.foo();\\\"}\"}" + span: + line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 10 + path: compiler-test + content: " a.foo();" + arguments: [] + span: + line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " a.foo();" + span: + line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " a.foo();" + - Return: + expression: + Binary: + left: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" + span: + line_start: 17 + line_stop: 17 + col_start: 12 + col_stop: 15 + path: compiler-test + content: " return a.x == 10u32 == y;" + right: + Value: + Integer: + - U32 + - "10" + - line_start: 17 + line_stop: 17 + col_start: 19 + col_stop: 24 + path: compiler-test + content: " return a.x == 10u32 == y;" + op: Eq + span: + line_start: 17 + line_stop: 17 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return a.x == 10u32 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" + op: Eq + span: + line_start: 17 + line_stop: 17 + col_start: 12 + col_stop: 29 + path: compiler-test + content: " return a.x == 10u32 == y;" + span: + line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 29 + path: compiler-test + content: " return a.x == 10u32 == y;" + span: + line_start: 12 + line_stop: 18 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 12 + line_stop: 18 + 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\\\":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\":\"foo\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function foo(mut self) {\\\"}\"}" + input: + - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function foo(mut self) {\\\"}\"}" + 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.x = 10;\\\"}\"}" + accesses: + - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x = 10;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " self.x = 10;" + value: + Value: + Integer: + - U32 + - "10" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 20 + path: compiler-test + content: " self.x = 10;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 20 + path: compiler-test + content: " self.x = 10;" + span: + line_start: 6 + line_stop: 8 + col_start: 28 + col_stop: 6 + path: compiler-test + content: " function foo(mut self) {\n...\n }" + span: + line_start: 6 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " function foo(mut self) {\n...\n }" + global_consts: {} + functions: + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 12 + line_stop: 12 + 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\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = Foo { x: 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\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + members: + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + expression: + Value: + Integer: + - U32 + - "1" + - line_start: 13 + line_stop: 13 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " let a = Foo { x: 1 };" + span: + line_start: 13 + line_stop: 13 + col_start: 13 + col_stop: 25 + path: compiler-test + content: " let a = Foo { x: 1 };" + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " let a = Foo { x: 1 };" + - Expression: + expression: + Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.foo();\\\"}\"}" + name: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.foo();\\\"}\"}" + span: + line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 10 + path: compiler-test + content: " a.foo();" + arguments: [] + span: + line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " a.foo();" + span: + line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " a.foo();" + - Return: + expression: + Binary: + left: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" + span: + line_start: 17 + line_stop: 17 + col_start: 12 + col_stop: 15 + path: compiler-test + content: " return a.x == 10u32 == y;" + right: + Value: + Integer: + - U32 + - "10" + - line_start: 17 + line_stop: 17 + col_start: 19 + col_stop: 24 + path: compiler-test + content: " return a.x == 10u32 == y;" + op: Eq + span: + line_start: 17 + line_stop: 17 + col_start: 12 + col_stop: 24 + path: compiler-test + content: " return a.x == 10u32 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" + op: Eq + span: + line_start: 17 + line_stop: 17 + col_start: 12 + col_stop: 29 + path: compiler-test + content: " return a.x == 10u32 == y;" + span: + line_start: 17 + line_stop: 17 + col_start: 5 + col_stop: 29 + path: compiler-test + content: " return a.x == 10u32 == y;" + span: + line_start: 12 + line_stop: 18 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 12 + line_stop: 18 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out index b9b6741851..ed52135684 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out @@ -16,3 +16,519 @@ 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\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 8 + line_stop: 8 + 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\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = Foo { x: 1 };" + type_: ~ + value: + CircuitInit: + name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + members: + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + expression: + Value: + Implicit: + - "1" + - line_start: 9 + line_stop: 9 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " let a = Foo { x: 1 };" + span: + line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 25 + path: compiler-test + content: " let a = Foo { x: 1 };" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " let a = Foo { x: 1 };" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.x = 0;\\\"}\"}" + accesses: + - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.x = 0;\\\"}\"}" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " a.x = 0;" + value: + Value: + Implicit: + - "0" + - line_start: 10 + line_stop: 10 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a.x = 0;" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " a.x = 0;" + - Return: + expression: + Binary: + left: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" + span: + line_start: 12 + line_stop: 12 + col_start: 12 + col_stop: 15 + path: compiler-test + content: " return a.x == 0u32 == y;" + right: + Value: + Integer: + - U32 + - "0" + - line_start: 12 + line_stop: 12 + col_start: 19 + col_stop: 23 + path: compiler-test + content: " return a.x == 0u32 == y;" + op: Eq + span: + line_start: 12 + line_stop: 12 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a.x == 0u32 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" + op: Eq + span: + line_start: 12 + line_stop: 12 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return a.x == 0u32 == y;" + span: + line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 28 + path: compiler-test + content: " return a.x == 0u32 == y;" + span: + line_start: 8 + line_stop: 13 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}" + span: + line_start: 8 + line_stop: 13 + 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\":\"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\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 8 + line_stop: 8 + 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\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = Foo { x: 1 };" + type_: ~ + value: + CircuitInit: + name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + members: + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + expression: + Value: + Implicit: + - "1" + - line_start: 9 + line_stop: 9 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " let a = Foo { x: 1 };" + span: + line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 25 + path: compiler-test + content: " let a = Foo { x: 1 };" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " let a = Foo { x: 1 };" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.x = 0;\\\"}\"}" + accesses: + - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.x = 0;\\\"}\"}" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " a.x = 0;" + value: + Value: + Implicit: + - "0" + - line_start: 10 + line_stop: 10 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a.x = 0;" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " a.x = 0;" + - Return: + expression: + Binary: + left: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" + span: + line_start: 12 + line_stop: 12 + col_start: 12 + col_stop: 15 + path: compiler-test + content: " return a.x == 0u32 == y;" + right: + Value: + Integer: + - U32 + - "0" + - line_start: 12 + line_stop: 12 + col_start: 19 + col_stop: 23 + path: compiler-test + content: " return a.x == 0u32 == y;" + op: Eq + span: + line_start: 12 + line_stop: 12 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a.x == 0u32 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" + op: Eq + span: + line_start: 12 + line_stop: 12 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return a.x == 0u32 == y;" + span: + line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 28 + path: compiler-test + content: " return a.x == 0u32 == y;" + span: + line_start: 8 + line_stop: 13 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}" + span: + line_start: 8 + line_stop: 13 + 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\":\"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\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}" + const_: false + mutable: true + type_: Boolean + span: + line_start: 8 + line_stop: 8 + 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\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = Foo { x: 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\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + members: + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" + expression: + Value: + Integer: + - U32 + - "1" + - line_start: 9 + line_stop: 9 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " let a = Foo { x: 1 };" + span: + line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 25 + path: compiler-test + content: " let a = Foo { x: 1 };" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " let a = Foo { x: 1 };" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.x = 0;\\\"}\"}" + accesses: + - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.x = 0;\\\"}\"}" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 8 + path: compiler-test + content: " a.x = 0;" + value: + Value: + Integer: + - U32 + - "0" + - line_start: 10 + line_stop: 10 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " a.x = 0;" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " a.x = 0;" + - Return: + expression: + Binary: + left: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" + span: + line_start: 12 + line_stop: 12 + col_start: 12 + col_stop: 15 + path: compiler-test + content: " return a.x == 0u32 == y;" + right: + Value: + Integer: + - U32 + - "0" + - line_start: 12 + line_stop: 12 + col_start: 19 + col_stop: 23 + path: compiler-test + content: " return a.x == 0u32 == y;" + op: Eq + span: + line_start: 12 + line_stop: 12 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return a.x == 0u32 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" + op: Eq + span: + line_start: 12 + line_stop: 12 + col_start: 12 + col_stop: 28 + path: compiler-test + content: " return a.x == 0u32 == y;" + span: + line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 28 + path: compiler-test + content: " return a.x == 0u32 == y;" + span: + line_start: 8 + line_stop: 13 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}" + span: + line_start: 8 + line_stop: 13 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool{\n...\n}\n\n\n" diff --git a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out index b9b6741851..5ef955cba7 100644 --- a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out @@ -16,3 +16,634 @@ 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: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = 100i8;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let x = 100i8;" + type_: ~ + value: + Value: + Integer: + - I8 + - "100" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 18 + path: compiler-test + content: " let x = 100i8;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " let x = 100i8;" + - Conditional: + condition: + Value: + Boolean: + - "false" + - line_start: 5 + line_stop: 5 + col_start: 8 + col_stop: 13 + path: compiler-test + content: " if false {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x = 1i8;\\\"}\"}" + accesses: [] + span: + line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " x = 1i8;" + value: + Value: + Integer: + - I8 + - "1" + - line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " x = 1i8;" + span: + line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 16 + path: compiler-test + content: " x = 1i8;" + - Assign: + operation: Mul + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x *= 100i8;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " x *= 100i8;" + value: + Value: + Integer: + - I8 + - "100" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 19 + path: compiler-test + content: " x *= 100i8;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 19 + path: compiler-test + content: " x *= 100i8;" + span: + line_start: 5 + line_stop: 8 + col_start: 14 + col_stop: 6 + path: compiler-test + content: " if false {\n...\n }" + next: ~ + span: + line_start: 5 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if false {\n...\n }\n" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == 100i8 == y;\\\"}\"}" + right: + Value: + Integer: + - I8 + - "100" + - line_start: 10 + line_stop: 10 + col_start: 17 + col_stop: 22 + path: compiler-test + content: " return x == 100i8 == y;" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return x == 100i8 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == 100i8 == y;\\\"}\"}" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 27 + path: compiler-test + content: " return x == 100i8 == y;" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " return x == 100i8 == y;" + span: + line_start: 3 + line_stop: 11 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 11 + 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\":\"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\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = 100i8;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let x = 100i8;" + type_: ~ + value: + Value: + Integer: + - I8 + - "100" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 18 + path: compiler-test + content: " let x = 100i8;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " let x = 100i8;" + - Conditional: + condition: + Value: + Boolean: + - "false" + - line_start: 5 + line_stop: 5 + col_start: 8 + col_stop: 13 + path: compiler-test + content: " if false {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x = 1i8;\\\"}\"}" + accesses: [] + span: + line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " x = 1i8;" + value: + Value: + Integer: + - I8 + - "1" + - line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " x = 1i8;" + span: + line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 16 + path: compiler-test + content: " x = 1i8;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x *= 100i8;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " x *= 100i8;" + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x *= 100i8;\\\"}\"}" + right: + Value: + Integer: + - I8 + - "100" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 19 + path: compiler-test + content: " x *= 100i8;" + op: Mul + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 19 + path: compiler-test + content: " x *= 100i8;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 19 + path: compiler-test + content: " x *= 100i8;" + span: + line_start: 5 + line_stop: 8 + col_start: 14 + col_stop: 6 + path: compiler-test + content: " if false {\n...\n }" + next: ~ + span: + line_start: 5 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if false {\n...\n }\n" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == 100i8 == y;\\\"}\"}" + right: + Value: + Integer: + - I8 + - "100" + - line_start: 10 + line_stop: 10 + col_start: 17 + col_stop: 22 + path: compiler-test + content: " return x == 100i8 == y;" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return x == 100i8 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == 100i8 == y;\\\"}\"}" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 27 + path: compiler-test + content: " return x == 100i8 == y;" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " return x == 100i8 == y;" + span: + line_start: 3 + line_stop: 11 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 11 + 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\":\"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\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = 100i8;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let x = 100i8;" + type_: + IntegerType: I8 + value: + Value: + Integer: + - I8 + - "100" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 18 + path: compiler-test + content: " let x = 100i8;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " let x = 100i8;" + - Conditional: + condition: + Value: + Boolean: + - "false" + - line_start: 5 + line_stop: 5 + col_start: 8 + col_stop: 13 + path: compiler-test + content: " if false {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x = 1i8;\\\"}\"}" + accesses: [] + span: + line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " x = 1i8;" + value: + Value: + Integer: + - I8 + - "1" + - line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " x = 1i8;" + span: + line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 16 + path: compiler-test + content: " x = 1i8;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x *= 100i8;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " x *= 100i8;" + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x *= 100i8;\\\"}\"}" + right: + Value: + Integer: + - I8 + - "100" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 19 + path: compiler-test + content: " x *= 100i8;" + op: Mul + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 19 + path: compiler-test + content: " x *= 100i8;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 19 + path: compiler-test + content: " x *= 100i8;" + span: + line_start: 5 + line_stop: 8 + col_start: 14 + col_stop: 6 + path: compiler-test + content: " if false {\n...\n }" + next: ~ + span: + line_start: 5 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if false {\n...\n }\n" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == 100i8 == y;\\\"}\"}" + right: + Value: + Integer: + - I8 + - "100" + - line_start: 10 + line_stop: 10 + col_start: 17 + col_stop: 22 + path: compiler-test + content: " return x == 100i8 == y;" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return x == 100i8 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == 100i8 == y;\\\"}\"}" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 27 + path: compiler-test + content: " return x == 100i8 == y;" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " return x == 100i8 == y;" + span: + line_start: 3 + line_stop: 11 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 11 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out b/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out index b9b6741851..8d67dea046 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out @@ -16,3 +16,300 @@ 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: 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(a: bool) -> 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: 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(a: bool) -> bool {" + output: Boolean + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a = true;\\\"}\"}" + accesses: [] + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a = true;" + value: + Value: + Boolean: + - "true" + - line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 13 + path: compiler-test + content: " a = true;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " a = true;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true;\\\"}\"}" + right: + Value: + Boolean: + - "true" + - line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " return a == true;" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == true;" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " return a == true;" + span: + line_start: 4 + line_stop: 8 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(a: bool) -> bool {\n...\n}" + span: + line_start: 4 + line_stop: 8 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: bool) -> bool {\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: 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(a: bool) -> 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: 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(a: bool) -> bool {" + output: Boolean + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a = true;\\\"}\"}" + accesses: [] + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a = true;" + value: + Value: + Boolean: + - "true" + - line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 13 + path: compiler-test + content: " a = true;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " a = true;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true;\\\"}\"}" + right: + Value: + Boolean: + - "true" + - line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " return a == true;" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == true;" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " return a == true;" + span: + line_start: 4 + line_stop: 8 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(a: bool) -> bool {\n...\n}" + span: + line_start: 4 + line_stop: 8 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: bool) -> bool {\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: 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(a: bool) -> 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: 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(a: bool) -> bool {" + output: Boolean + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a = true;\\\"}\"}" + accesses: [] + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a = true;" + value: + Value: + Boolean: + - "true" + - line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 13 + path: compiler-test + content: " a = true;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " a = true;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true;\\\"}\"}" + right: + Value: + Boolean: + - "true" + - line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " return a == true;" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == true;" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 21 + path: compiler-test + content: " return a == true;" + span: + line_start: 4 + line_stop: 8 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(a: bool) -> bool {\n...\n}" + span: + line_start: 4 + line_stop: 8 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: bool) -> bool {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out index b9b6741851..d4a6667259 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out @@ -16,3 +16,434 @@ 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: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = 1u32;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = 1u32;" + type_: ~ + value: + Value: + Integer: + - U32 + - "1" + - line_start: 5 + line_stop: 5 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " let a = 1u32;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " let a = 1u32;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a = 0;\\\"}\"}" + accesses: [] + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a = 0;" + value: + Value: + Implicit: + - "0" + - line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " a = 0;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 10 + path: compiler-test + content: " a = 0;" + - 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 == 0u32 == y;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "0" + - line_start: 8 + line_stop: 8 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " return a == 0u32 == y;" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == 0u32 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 0u32 == y;\\\"}\"}" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 26 + path: compiler-test + content: " return a == 0u32 == y;" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " return a == 0u32 == 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: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = 1u32;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = 1u32;" + type_: ~ + value: + Value: + Integer: + - U32 + - "1" + - line_start: 5 + line_stop: 5 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " let a = 1u32;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " let a = 1u32;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a = 0;\\\"}\"}" + accesses: [] + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a = 0;" + value: + Value: + Implicit: + - "0" + - line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " a = 0;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 10 + path: compiler-test + content: " a = 0;" + - 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 == 0u32 == y;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "0" + - line_start: 8 + line_stop: 8 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " return a == 0u32 == y;" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == 0u32 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 0u32 == y;\\\"}\"}" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 26 + path: compiler-test + content: " return a == 0u32 == y;" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " return a == 0u32 == 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: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = 1u32;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = 1u32;" + type_: + IntegerType: U32 + value: + Value: + Integer: + - U32 + - "1" + - line_start: 5 + line_stop: 5 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " let a = 1u32;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " let a = 1u32;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a = 0;\\\"}\"}" + accesses: [] + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " a = 0;" + value: + Value: + Integer: + - U32 + - "0" + - line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " a = 0;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 10 + path: compiler-test + content: " a = 0;" + - 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 == 0u32 == y;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "0" + - line_start: 8 + line_stop: 8 + col_start: 17 + col_stop: 21 + path: compiler-test + content: " return a == 0u32 == y;" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 21 + path: compiler-test + content: " return a == 0u32 == y;" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 0u32 == y;\\\"}\"}" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 26 + path: compiler-test + content: " return a == 0u32 == y;" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 26 + path: compiler-test + content: " return a == 0u32 == 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" diff --git a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out index 13998e432d..95f6bef0b2 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out @@ -16,3 +16,541 @@ 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: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = 2u8;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let x = 2u8;" + type_: ~ + value: + Value: + Integer: + - U8 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " let x = 2u8;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 16 + path: compiler-test + content: " let x = 2u8;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let y = x;" + type_: ~ + value: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " let y = x;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let z = y / 2u8;\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let z = y / 2u8;" + type_: ~ + value: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let z = y / 2u8;\\\"}\"}" + right: + Value: + Integer: + - U8 + - "2" + - line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 20 + path: compiler-test + content: " let z = y / 2u8;" + op: Div + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 20 + path: compiler-test + content: " let z = y / 2u8;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 20 + path: compiler-test + content: " let z = y / 2u8;" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return z == 1 == a;\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return z == 1 == a;" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return z == 1 == a;" + right: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return z == 1 == a;\\\"}\"}" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return z == 1 == a;" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return z == 1 == a;" + span: + line_start: 3 + line_stop: 8 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(a: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 8 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: 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(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: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = 2u8;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let x = 2u8;" + type_: ~ + value: + Value: + Integer: + - U8 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " let x = 2u8;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 16 + path: compiler-test + content: " let x = 2u8;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let y = x;" + type_: ~ + value: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " let y = x;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let z = y / 2u8;\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let z = y / 2u8;" + type_: ~ + value: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let z = y / 2u8;\\\"}\"}" + right: + Value: + Integer: + - U8 + - "2" + - line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 20 + path: compiler-test + content: " let z = y / 2u8;" + op: Div + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 20 + path: compiler-test + content: " let z = y / 2u8;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 20 + path: compiler-test + content: " let z = y / 2u8;" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return z == 1 == a;\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return z == 1 == a;" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return z == 1 == a;" + right: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return z == 1 == a;\\\"}\"}" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return z == 1 == a;" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return z == 1 == a;" + span: + line_start: 3 + line_stop: 8 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(a: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 8 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: 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(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: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = 2u8;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let x = 2u8;" + type_: + IntegerType: U8 + value: + Value: + Integer: + - U8 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " let x = 2u8;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 16 + path: compiler-test + content: " let x = 2u8;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let y = x;" + type_: + IntegerType: U8 + value: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " let y = x;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let z = y / 2u8;\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let z = y / 2u8;" + type_: + IntegerType: U8 + value: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let z = y / 2u8;\\\"}\"}" + right: + Value: + Integer: + - U8 + - "2" + - line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 20 + path: compiler-test + content: " let z = y / 2u8;" + op: Div + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 20 + path: compiler-test + content: " let z = y / 2u8;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 20 + path: compiler-test + content: " let z = y / 2u8;" + - Return: + expression: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return z == 1 == a;\\\"}\"}" + right: + Value: + Integer: + - U8 + - "1" + - line_start: 7 + line_stop: 7 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return z == 1 == a;" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return z == 1 == a;" + right: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return z == 1 == a;\\\"}\"}" + op: Eq + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return z == 1 == a;" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " return z == 1 == a;" + span: + line_start: 3 + line_stop: 8 + col_start: 32 + col_stop: 2 + path: compiler-test + content: "function main(a: bool) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 8 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: bool) -> bool {\n...\n}\n\n\n" diff --git a/tests/expectations/compiler/compiler/mutability/swap.leo.out b/tests/expectations/compiler/compiler/mutability/swap.leo.out index 0d727fef3c..9c8c58d0ec 100644 --- a/tests/expectations/compiler/compiler/mutability/swap.leo.out +++ b/tests/expectations/compiler/compiler/mutability/swap.leo.out @@ -16,3 +16,1317 @@ outputs: r0: type: bool value: "false" + initial_theorem: + name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: U32 + - - value: "2" + span: + line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" + - Variable: + identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" + const_: true + mutable: false + type_: + IntegerType: U32 + span: + line_start: 4 + line_stop: 4 + col_start: 34 + col_stop: 35 + path: compiler-test + content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" + - Variable: + identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":48,\\\"col_stop\\\":49,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" + const_: true + mutable: false + type_: + IntegerType: U32 + span: + line_start: 4 + line_stop: 4 + col_start: 48 + col_stop: 49 + path: compiler-test + content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" + output: + Array: + - IntegerType: U32 + - - value: "2" + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"t\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let t = a[i];" + type_: ~ + value: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" + index: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " let t = a[i];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " let t = a[i];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" + accesses: + - ArrayIndex: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " a[i] = a[j];" + value: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" + index: + Identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " a[i] = a[j];" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 16 + path: compiler-test + content: " a[i] = a[j];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" + accesses: + - ArrayIndex: + Identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " a[j] = t;" + value: + Identifier: "{\"name\":\"t\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " a[j] = t;" + - Return: + expression: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " return a;" + span: + line_start: 4 + line_stop: 9 + col_start: 68 + col_stop: 2 + path: compiler-test + content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\n...\n}" + span: + line_start: 4 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\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(arr: [u32; 2]) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(arr: [u32; 2]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(arr: [u32; 2]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: U32 + - - value: "2" + span: + line_start: 11 + line_stop: 11 + col_start: 15 + col_stop: 18 + path: compiler-test + content: "function main(arr: [u32; 2]) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const expected: [u32; 2] = [1, 0];\\\"}\"}" + span: + line_start: 12 + line_stop: 12 + col_start: 11 + col_stop: 19 + path: compiler-test + content: " const expected: [u32; 2] = [1, 0];" + type_: + Array: + - IntegerType: U32 + - - value: "2" + value: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "1" + - line_start: 12 + line_stop: 12 + col_start: 33 + col_stop: 34 + path: compiler-test + content: " const expected: [u32; 2] = [1, 0];" + - Expression: + Value: + Implicit: + - "0" + - line_start: 12 + line_stop: 12 + col_start: 36 + col_stop: 37 + path: compiler-test + content: " const expected: [u32; 2] = [1, 0];" + span: + line_start: 12 + line_stop: 12 + col_start: 32 + col_stop: 38 + path: compiler-test + content: " const expected: [u32; 2] = [1, 0];" + span: + line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 38 + path: compiler-test + content: " const expected: [u32; 2] = [1, 0];" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " let actual = swap(arr, 0, 1);" + type_: ~ + value: + Call: + function: + Identifier: "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" + arguments: + - Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" + - Value: + Implicit: + - "0" + - line_start: 13 + line_stop: 13 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " let actual = swap(arr, 0, 1);" + - Value: + Implicit: + - "1" + - line_start: 13 + line_stop: 13 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " let actual = swap(arr, 0, 1);" + span: + line_start: 13 + line_stop: 13 + col_start: 18 + col_stop: 33 + path: compiler-test + content: " let actual = swap(arr, 0, 1);" + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 33 + path: compiler-test + content: " let actual = swap(arr, 0, 1);" + - Return: + expression: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 16 + line_stop: 16 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 16 + line_stop: 16 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + right: + ArrayAccess: + array: + Identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":27,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 16 + line_stop: 16 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 16 + line_stop: 16 + col_start: 27 + col_stop: 36 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + op: Eq + span: + line_start: 16 + line_stop: 16 + col_start: 12 + col_stop: 36 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + right: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":40,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 16 + line_stop: 16 + col_start: 49 + col_stop: 50 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 16 + line_stop: 16 + col_start: 40 + col_stop: 51 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + right: + ArrayAccess: + array: + Identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":55,\\\"col_stop\\\":61,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 16 + line_stop: 16 + col_start: 62 + col_stop: 63 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 16 + line_stop: 16 + col_start: 55 + col_stop: 64 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + op: Eq + span: + line_start: 16 + line_stop: 16 + col_start: 40 + col_stop: 64 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + op: And + span: + line_start: 16 + line_stop: 16 + col_start: 12 + col_stop: 64 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 64 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 11 + line_stop: 17 + col_start: 38 + col_stop: 2 + path: compiler-test + content: "function main(arr: [u32; 2]) -> bool {\n...\n}" + span: + line_start: 11 + line_stop: 17 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(arr: [u32; 2]) -> bool {\n...\n}\n\n\n\n" + canonicalized_theorem: + name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: U32 + - - value: "2" + span: + line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" + - Variable: + identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" + const_: true + mutable: false + type_: + IntegerType: U32 + span: + line_start: 4 + line_stop: 4 + col_start: 34 + col_stop: 35 + path: compiler-test + content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" + - Variable: + identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":48,\\\"col_stop\\\":49,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" + const_: true + mutable: false + type_: + IntegerType: U32 + span: + line_start: 4 + line_stop: 4 + col_start: 48 + col_stop: 49 + path: compiler-test + content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" + output: + Array: + - IntegerType: U32 + - - value: "2" + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"t\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let t = a[i];" + type_: ~ + value: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" + index: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " let t = a[i];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " let t = a[i];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" + accesses: + - ArrayIndex: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " a[i] = a[j];" + value: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" + index: + Identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " a[i] = a[j];" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 16 + path: compiler-test + content: " a[i] = a[j];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" + accesses: + - ArrayIndex: + Identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " a[j] = t;" + value: + Identifier: "{\"name\":\"t\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " a[j] = t;" + - Return: + expression: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " return a;" + span: + line_start: 4 + line_stop: 9 + col_start: 68 + col_stop: 2 + path: compiler-test + content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\n...\n}" + span: + line_start: 4 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\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(arr: [u32; 2]) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(arr: [u32; 2]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(arr: [u32; 2]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: U32 + - - value: "2" + span: + line_start: 11 + line_stop: 11 + col_start: 15 + col_stop: 18 + path: compiler-test + content: "function main(arr: [u32; 2]) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const expected: [u32; 2] = [1, 0];\\\"}\"}" + span: + line_start: 12 + line_stop: 12 + col_start: 11 + col_stop: 19 + path: compiler-test + content: " const expected: [u32; 2] = [1, 0];" + type_: + Array: + - IntegerType: U32 + - - value: "2" + value: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "1" + - line_start: 12 + line_stop: 12 + col_start: 33 + col_stop: 34 + path: compiler-test + content: " const expected: [u32; 2] = [1, 0];" + - Expression: + Value: + Implicit: + - "0" + - line_start: 12 + line_stop: 12 + col_start: 36 + col_stop: 37 + path: compiler-test + content: " const expected: [u32; 2] = [1, 0];" + span: + line_start: 12 + line_stop: 12 + col_start: 32 + col_stop: 38 + path: compiler-test + content: " const expected: [u32; 2] = [1, 0];" + span: + line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 38 + path: compiler-test + content: " const expected: [u32; 2] = [1, 0];" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " let actual = swap(arr, 0, 1);" + type_: ~ + value: + Call: + function: + Identifier: "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" + arguments: + - Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" + - Value: + Implicit: + - "0" + - line_start: 13 + line_stop: 13 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " let actual = swap(arr, 0, 1);" + - Value: + Implicit: + - "1" + - line_start: 13 + line_stop: 13 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " let actual = swap(arr, 0, 1);" + span: + line_start: 13 + line_stop: 13 + col_start: 18 + col_stop: 33 + path: compiler-test + content: " let actual = swap(arr, 0, 1);" + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 33 + path: compiler-test + content: " let actual = swap(arr, 0, 1);" + - Return: + expression: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 16 + line_stop: 16 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 16 + line_stop: 16 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + right: + ArrayAccess: + array: + Identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":27,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 16 + line_stop: 16 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 16 + line_stop: 16 + col_start: 27 + col_stop: 36 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + op: Eq + span: + line_start: 16 + line_stop: 16 + col_start: 12 + col_stop: 36 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + right: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":40,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 16 + line_stop: 16 + col_start: 49 + col_stop: 50 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 16 + line_stop: 16 + col_start: 40 + col_stop: 51 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + right: + ArrayAccess: + array: + Identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":55,\\\"col_stop\\\":61,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 16 + line_stop: 16 + col_start: 62 + col_stop: 63 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 16 + line_stop: 16 + col_start: 55 + col_stop: 64 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + op: Eq + span: + line_start: 16 + line_stop: 16 + col_start: 40 + col_stop: 64 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + op: And + span: + line_start: 16 + line_stop: 16 + col_start: 12 + col_stop: 64 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 64 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 11 + line_stop: 17 + col_start: 38 + col_stop: 2 + path: compiler-test + content: "function main(arr: [u32; 2]) -> bool {\n...\n}" + span: + line_start: 11 + line_stop: 17 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(arr: [u32; 2]) -> bool {\n...\n}\n\n\n\n" + type_inferenced_theorem: + name: test + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: U32 + - - value: "2" + span: + line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" + - Variable: + identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" + const_: true + mutable: false + type_: + IntegerType: U32 + span: + line_start: 4 + line_stop: 4 + col_start: 34 + col_stop: 35 + path: compiler-test + content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" + - Variable: + identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":48,\\\"col_stop\\\":49,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" + const_: true + mutable: false + type_: + IntegerType: U32 + span: + line_start: 4 + line_stop: 4 + col_start: 48 + col_stop: 49 + path: compiler-test + content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" + output: + Array: + - IntegerType: U32 + - - value: "2" + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"t\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let t = a[i];" + type_: + IntegerType: U32 + value: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" + index: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " let t = a[i];" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " let t = a[i];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" + accesses: + - ArrayIndex: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " a[i] = a[j];" + value: + ArrayAccess: + array: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" + index: + Identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 16 + path: compiler-test + content: " a[i] = a[j];" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 16 + path: compiler-test + content: " a[i] = a[j];" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" + accesses: + - ArrayIndex: + Identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 9 + path: compiler-test + content: " a[j] = t;" + value: + Identifier: "{\"name\":\"t\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " a[j] = t;" + - Return: + expression: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 13 + path: compiler-test + content: " return a;" + span: + line_start: 4 + line_stop: 9 + col_start: 68 + col_stop: 2 + path: compiler-test + content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\n...\n}" + span: + line_start: 4 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\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(arr: [u32; 2]) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(arr: [u32; 2]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(arr: [u32; 2]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: U32 + - - value: "2" + span: + line_start: 11 + line_stop: 11 + col_start: 15 + col_stop: 18 + path: compiler-test + content: "function main(arr: [u32; 2]) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const expected: [u32; 2] = [1, 0];\\\"}\"}" + span: + line_start: 12 + line_stop: 12 + col_start: 11 + col_stop: 19 + path: compiler-test + content: " const expected: [u32; 2] = [1, 0];" + type_: + Array: + - IntegerType: U32 + - - value: "2" + value: + ArrayInline: + elements: + - Expression: + Value: + Integer: + - U32 + - "1" + - line_start: 12 + line_stop: 12 + col_start: 33 + col_stop: 34 + path: compiler-test + content: " const expected: [u32; 2] = [1, 0];" + - Expression: + Value: + Integer: + - U32 + - "0" + - line_start: 12 + line_stop: 12 + col_start: 36 + col_stop: 37 + path: compiler-test + content: " const expected: [u32; 2] = [1, 0];" + span: + line_start: 12 + line_stop: 12 + col_start: 32 + col_stop: 38 + path: compiler-test + content: " const expected: [u32; 2] = [1, 0];" + span: + line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 38 + path: compiler-test + content: " const expected: [u32; 2] = [1, 0];" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " let actual = swap(arr, 0, 1);" + type_: + Array: + - IntegerType: U32 + - - value: "2" + value: + Call: + function: + Identifier: "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" + arguments: + - Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" + - Value: + Integer: + - U32 + - "0" + - line_start: 13 + line_stop: 13 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " let actual = swap(arr, 0, 1);" + - Value: + Integer: + - U32 + - "1" + - line_start: 13 + line_stop: 13 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " let actual = swap(arr, 0, 1);" + span: + line_start: 13 + line_stop: 13 + col_start: 18 + col_stop: 33 + path: compiler-test + content: " let actual = swap(arr, 0, 1);" + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 33 + path: compiler-test + content: " let actual = swap(arr, 0, 1);" + - Return: + expression: + Binary: + left: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 16 + line_stop: 16 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 16 + line_stop: 16 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + right: + ArrayAccess: + array: + Identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":27,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" + index: + Value: + Integer: + - U32 + - "0" + - line_start: 16 + line_stop: 16 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 16 + line_stop: 16 + col_start: 27 + col_stop: 36 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + op: Eq + span: + line_start: 16 + line_stop: 16 + col_start: 12 + col_stop: 36 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + right: + Binary: + left: + ArrayAccess: + array: + Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":40,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" + index: + Value: + Integer: + - U32 + - "1" + - line_start: 16 + line_stop: 16 + col_start: 49 + col_stop: 50 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 16 + line_stop: 16 + col_start: 40 + col_stop: 51 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + right: + ArrayAccess: + array: + Identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":55,\\\"col_stop\\\":61,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" + index: + Value: + Integer: + - U32 + - "1" + - line_start: 16 + line_stop: 16 + col_start: 62 + col_stop: 63 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 16 + line_stop: 16 + col_start: 55 + col_stop: 64 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + op: Eq + span: + line_start: 16 + line_stop: 16 + col_start: 40 + col_stop: 64 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + op: And + span: + line_start: 16 + line_stop: 16 + col_start: 12 + col_stop: 64 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 64 + path: compiler-test + content: " return expected[0] == actual[0] && expected[1] == actual[1];" + span: + line_start: 11 + line_stop: 17 + col_start: 38 + col_stop: 2 + path: compiler-test + content: "function main(arr: [u32; 2]) -> bool {\n...\n}" + span: + line_start: 11 + line_stop: 17 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(arr: [u32; 2]) -> bool {\n...\n}\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/statements/block.leo.out b/tests/expectations/compiler/compiler/statements/block.leo.out index 5a713d9994..5b3d59b5d3 100644 --- a/tests/expectations/compiler/compiler/statements/block.leo.out +++ b/tests/expectations/compiler/compiler/statements/block.leo.out @@ -16,3 +16,425 @@ outputs: a: 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> 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 = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let y = x;" + type_: ~ + value: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " let y = x;" + - Block: + statements: + - Assign: + operation: Add + assignee: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y += 5u32;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " y += 5u32;" + value: + Value: + Integer: + - U32 + - "5" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " y += 5u32;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 18 + path: compiler-test + content: " y += 5u32;" + span: + line_start: 6 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " {\n...\n }" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 8;\\\"}\"}" + right: + Value: + Implicit: + - "8" + - line_start: 10 + line_stop: 10 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return y == 8;" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return y == 8;" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return y == 8;" + span: + line_start: 3 + line_stop: 11 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 11 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> 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 = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let y = x;" + type_: ~ + value: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " let y = x;" + - Block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y += 5u32;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " y += 5u32;" + value: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y += 5u32;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "5" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " y += 5u32;" + op: Add + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 18 + path: compiler-test + content: " y += 5u32;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 18 + path: compiler-test + content: " y += 5u32;" + span: + line_start: 6 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " {\n...\n }" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 8;\\\"}\"}" + right: + Value: + Implicit: + - "8" + - line_start: 10 + line_stop: 10 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return y == 8;" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return y == 8;" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return y == 8;" + span: + line_start: 3 + line_stop: 11 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 11 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> 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 = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let y = x;" + type_: + IntegerType: U32 + value: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " let y = x;" + - Block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y += 5u32;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " y += 5u32;" + value: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y += 5u32;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "5" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " y += 5u32;" + op: Add + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 18 + path: compiler-test + content: " y += 5u32;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 18 + path: compiler-test + content: " y += 5u32;" + span: + line_start: 6 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " {\n...\n }" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 8;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "8" + - line_start: 10 + line_stop: 10 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return y == 8;" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return y == 8;" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return y == 8;" + span: + line_start: 3 + line_stop: 11 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 11 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/statements/chain.leo.out b/tests/expectations/compiler/compiler/statements/chain.leo.out index 86968e7947..1d31265608 100644 --- a/tests/expectations/compiler/compiler/statements/chain.leo.out +++ b/tests/expectations/compiler/compiler/statements/chain.leo.out @@ -28,3 +28,819 @@ 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let c = 0u32;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let c = 0u32;" + type_: ~ + value: + Value: + Integer: + - U32 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " let c = 0u32;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " let c = 0u32;" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 1 {\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 1 {" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 1 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 1;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " c = 1;" + value: + Value: + Implicit: + - "1" + - line_start: 7 + line_stop: 7 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " c = 1;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " c = 1;" + span: + line_start: 6 + line_stop: 8 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " if x == 1 {\n...\n } else if x == 2 {" + next: + Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" } else if x == 2 {\\\"}\"}" + right: + Value: + Implicit: + - "2" + - line_start: 8 + line_stop: 8 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " } else if x == 2 {" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 15 + col_stop: 21 + path: compiler-test + content: " } else if x == 2 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 2;\\\"}\"}" + accesses: [] + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " c = 2;" + value: + Value: + Implicit: + - "2" + - line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " c = 2;" + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " c = 2;" + span: + line_start: 8 + line_stop: 10 + col_start: 22 + col_stop: 6 + path: compiler-test + content: " } else if x == 2 {\n...\n } else {" + next: + Block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 3;\\\"}\"}" + accesses: [] + span: + line_start: 11 + line_stop: 11 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " c = 3;" + value: + Value: + Implicit: + - "3" + - line_start: 11 + line_stop: 11 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " c = 3;" + span: + line_start: 11 + line_stop: 11 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " c = 3;" + 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: 12 + col_stop: 6 + path: compiler-test + content: " } else if x == 2 {\n...\n } else {\n...\n }" + span: + line_start: 6 + line_stop: 12 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if x == 1 {\n...\n } else if x == 2 {\n...\n } else {\n...\n }" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return c == x;\\\"}\"}" + right: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return c == x;\\\"}\"}" + op: Eq + span: + line_start: 13 + line_stop: 13 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return c == x;" + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return c == x;" + span: + line_start: 3 + line_stop: 14 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 14 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let c = 0u32;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let c = 0u32;" + type_: ~ + value: + Value: + Integer: + - U32 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " let c = 0u32;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " let c = 0u32;" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 1 {\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 1 {" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 1 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 1;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " c = 1;" + value: + Value: + Implicit: + - "1" + - line_start: 7 + line_stop: 7 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " c = 1;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " c = 1;" + span: + line_start: 6 + line_stop: 8 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " if x == 1 {\n...\n } else if x == 2 {" + next: + Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" } else if x == 2 {\\\"}\"}" + right: + Value: + Implicit: + - "2" + - line_start: 8 + line_stop: 8 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " } else if x == 2 {" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 15 + col_stop: 21 + path: compiler-test + content: " } else if x == 2 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 2;\\\"}\"}" + accesses: [] + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " c = 2;" + value: + Value: + Implicit: + - "2" + - line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " c = 2;" + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " c = 2;" + span: + line_start: 8 + line_stop: 10 + col_start: 22 + col_stop: 6 + path: compiler-test + content: " } else if x == 2 {\n...\n } else {" + next: + Block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 3;\\\"}\"}" + accesses: [] + span: + line_start: 11 + line_stop: 11 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " c = 3;" + value: + Value: + Implicit: + - "3" + - line_start: 11 + line_stop: 11 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " c = 3;" + span: + line_start: 11 + line_stop: 11 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " c = 3;" + 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: 12 + col_stop: 6 + path: compiler-test + content: " } else if x == 2 {\n...\n } else {\n...\n }" + span: + line_start: 6 + line_stop: 12 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if x == 1 {\n...\n } else if x == 2 {\n...\n } else {\n...\n }" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return c == x;\\\"}\"}" + right: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return c == x;\\\"}\"}" + op: Eq + span: + line_start: 13 + line_stop: 13 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return c == x;" + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return c == x;" + span: + line_start: 3 + line_stop: 14 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 14 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let c = 0u32;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let c = 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 c = 0u32;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " let c = 0u32;" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 1 {\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 1 {" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 1 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 1;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " c = 1;" + value: + Value: + Integer: + - U32 + - "1" + - line_start: 7 + line_stop: 7 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " c = 1;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " c = 1;" + span: + line_start: 6 + line_stop: 8 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " if x == 1 {\n...\n } else if x == 2 {" + next: + Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" } else if x == 2 {\\\"}\"}" + right: + Value: + Integer: + - U32 + - "2" + - line_start: 8 + line_stop: 8 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " } else if x == 2 {" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 15 + col_stop: 21 + path: compiler-test + content: " } else if x == 2 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 2;\\\"}\"}" + accesses: [] + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " c = 2;" + value: + Value: + Integer: + - U32 + - "2" + - line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " c = 2;" + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " c = 2;" + span: + line_start: 8 + line_stop: 10 + col_start: 22 + col_stop: 6 + path: compiler-test + content: " } else if x == 2 {\n...\n } else {" + next: + Block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 3;\\\"}\"}" + accesses: [] + span: + line_start: 11 + line_stop: 11 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " c = 3;" + value: + Value: + Integer: + - U32 + - "3" + - line_start: 11 + line_stop: 11 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " c = 3;" + span: + line_start: 11 + line_stop: 11 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " c = 3;" + 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: 12 + col_stop: 6 + path: compiler-test + content: " } else if x == 2 {\n...\n } else {\n...\n }" + span: + line_start: 6 + line_stop: 12 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if x == 1 {\n...\n } else if x == 2 {\n...\n } else {\n...\n }" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return c == x;\\\"}\"}" + right: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return c == x;\\\"}\"}" + op: Eq + span: + line_start: 13 + line_stop: 13 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return c == x;" + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return c == x;" + span: + line_start: 3 + line_stop: 14 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 14 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/statements/for_loop.leo.out b/tests/expectations/compiler/compiler/statements/for_loop.leo.out index 4631f5e49f..6d396482ba 100644 --- a/tests/expectations/compiler/compiler/statements/for_loop.leo.out +++ b/tests/expectations/compiler/compiler/statements/for_loop.leo.out @@ -16,3 +16,829 @@ outputs: a: 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = 0u32;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let b = 0u32;" + type_: ~ + value: + Value: + Integer: + - U32 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " let b = 0u32;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " let b = 0u32;" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" + right: + Value: + Implicit: + - "3" + - line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + block: + statements: + - Iteration: + variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..4 {\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " for i in 0..4 {" + stop: + Value: + Implicit: + - "4" + - line_start: 7 + line_stop: 7 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " for i in 0..4 {" + block: + statements: + - Assign: + operation: Add + assignee: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" + accesses: [] + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " b += i;" + value: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " b += i;" + span: + line_start: 7 + line_stop: 9 + col_start: 23 + col_stop: 10 + path: compiler-test + content: " for i in 0..4 {\n...\n }" + span: + line_start: 7 + line_stop: 9 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " for i in 0..4 {\n...\n }" + span: + line_start: 6 + line_stop: 10 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n }" + next: ~ + span: + line_start: 6 + line_stop: 10 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n }\n\n" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r: u32 = x == 3 ? 6 : 0;\\\"}\"}" + span: + line_start: 12 + line_stop: 12 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + type_: + IntegerType: U32 + value: + Ternary: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r: u32 = x == 3 ? 6 : 0;\\\"}\"}" + right: + Value: + Implicit: + - "3" + - line_start: 12 + line_stop: 12 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + op: Eq + span: + line_start: 12 + line_stop: 12 + col_start: 18 + col_stop: 24 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + if_true: + Value: + Implicit: + - "6" + - line_start: 12 + line_stop: 12 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + if_false: + Value: + Implicit: + - "0" + - line_start: 12 + line_stop: 12 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + span: + line_start: 12 + line_stop: 12 + col_start: 18 + col_stop: 32 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + span: + line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 32 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == b;\\\"}\"}" + op: Eq + span: + line_start: 14 + line_stop: 14 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == b;" + span: + line_start: 14 + line_stop: 14 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == b;" + span: + line_start: 3 + line_stop: 15 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 15 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = 0u32;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let b = 0u32;" + type_: ~ + value: + Value: + Integer: + - U32 + - "0" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " let b = 0u32;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " let b = 0u32;" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" + right: + Value: + Implicit: + - "3" + - line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + block: + statements: + - Iteration: + variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..4 {\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " for i in 0..4 {" + stop: + Value: + Implicit: + - "4" + - line_start: 7 + line_stop: 7 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " for i in 0..4 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" + accesses: [] + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " b += i;" + value: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" + right: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" + op: Add + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " b += i;" + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " b += i;" + span: + line_start: 7 + line_stop: 9 + col_start: 23 + col_stop: 10 + path: compiler-test + content: " for i in 0..4 {\n...\n }" + span: + line_start: 7 + line_stop: 9 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " for i in 0..4 {\n...\n }" + span: + line_start: 6 + line_stop: 10 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n }" + next: ~ + span: + line_start: 6 + line_stop: 10 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n }\n\n" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r: u32 = x == 3 ? 6 : 0;\\\"}\"}" + span: + line_start: 12 + line_stop: 12 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + type_: + IntegerType: U32 + value: + Ternary: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r: u32 = x == 3 ? 6 : 0;\\\"}\"}" + right: + Value: + Implicit: + - "3" + - line_start: 12 + line_stop: 12 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + op: Eq + span: + line_start: 12 + line_stop: 12 + col_start: 18 + col_stop: 24 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + if_true: + Value: + Implicit: + - "6" + - line_start: 12 + line_stop: 12 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + if_false: + Value: + Implicit: + - "0" + - line_start: 12 + line_stop: 12 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + span: + line_start: 12 + line_stop: 12 + col_start: 18 + col_stop: 32 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + span: + line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 32 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == b;\\\"}\"}" + op: Eq + span: + line_start: 14 + line_stop: 14 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == b;" + span: + line_start: 14 + line_stop: 14 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == b;" + span: + line_start: 3 + line_stop: 15 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 15 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = 0u32;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let b = 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 b = 0u32;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " let b = 0u32;" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" + right: + Value: + Integer: + - U32 + - "3" + - line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + block: + statements: + - Iteration: + variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..4 {\\\"}\"}" + start: + Value: + Integer: + - U32 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " for i in 0..4 {" + stop: + Value: + Integer: + - U32 + - "4" + - line_start: 7 + line_stop: 7 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " for i in 0..4 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" + accesses: [] + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " b += i;" + value: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" + right: + Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" + op: Add + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " b += i;" + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " b += i;" + span: + line_start: 7 + line_stop: 9 + col_start: 23 + col_stop: 10 + path: compiler-test + content: " for i in 0..4 {\n...\n }" + span: + line_start: 7 + line_stop: 9 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " for i in 0..4 {\n...\n }" + span: + line_start: 6 + line_stop: 10 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n }" + next: ~ + span: + line_start: 6 + line_stop: 10 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n }\n\n" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r: u32 = x == 3 ? 6 : 0;\\\"}\"}" + span: + line_start: 12 + line_stop: 12 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + type_: + IntegerType: U32 + value: + Ternary: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r: u32 = x == 3 ? 6 : 0;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "3" + - line_start: 12 + line_stop: 12 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + op: Eq + span: + line_start: 12 + line_stop: 12 + col_start: 18 + col_stop: 24 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + if_true: + Value: + Integer: + - U32 + - "6" + - line_start: 12 + line_stop: 12 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + if_false: + Value: + Integer: + - U32 + - "0" + - line_start: 12 + line_stop: 12 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + span: + line_start: 12 + line_stop: 12 + col_start: 18 + col_stop: 32 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + span: + line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 32 + path: compiler-test + content: " let r: u32 = x == 3 ? 6 : 0;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == b;\\\"}\"}" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == b;\\\"}\"}" + op: Eq + span: + line_start: 14 + line_stop: 14 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return r == b;" + span: + line_start: 14 + line_stop: 14 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return r == b;" + span: + line_start: 3 + line_stop: 15 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 15 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out b/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out index 12d2bda188..d1ce78a026 100644 --- a/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out +++ b/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out @@ -16,3 +16,512 @@ outputs: a: 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> 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 = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let y = x;" + type_: ~ + value: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " let y = x;" + - 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..3 {\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 6 + line_stop: 6 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " for i in 0..3 {" + stop: + Value: + Implicit: + - "3" + - line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " for i in 0..3 {" + block: + statements: + - Assign: + operation: Sub + assignee: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " y -= 1;" + value: + Value: + Implicit: + - "1" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + span: + line_start: 6 + line_stop: 8 + col_start: 19 + col_stop: 6 + path: compiler-test + content: " for i in 0..3 {\n...\n }" + span: + line_start: 6 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " for i in 0..3 {\n...\n }" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 0;\\\"}\"}" + right: + Value: + Implicit: + - "0" + - line_start: 10 + line_stop: 10 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return y == 0;" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return y == 0;" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return y == 0;" + span: + line_start: 3 + line_stop: 11 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 11 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> 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 = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let y = x;" + type_: ~ + value: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " let y = x;" + - 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..3 {\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 6 + line_stop: 6 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " for i in 0..3 {" + stop: + Value: + Implicit: + - "3" + - line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " for i in 0..3 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " y -= 1;" + value: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + op: Sub + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + span: + line_start: 6 + line_stop: 8 + col_start: 19 + col_stop: 6 + path: compiler-test + content: " for i in 0..3 {\n...\n }" + span: + line_start: 6 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " for i in 0..3 {\n...\n }" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 0;\\\"}\"}" + right: + Value: + Implicit: + - "0" + - line_start: 10 + line_stop: 10 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return y == 0;" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return y == 0;" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return y == 0;" + span: + line_start: 3 + line_stop: 11 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 11 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> 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 = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let y = x;" + type_: + IntegerType: U32 + value: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " let y = x;" + - 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..3 {\\\"}\"}" + 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..3 {" + stop: + Value: + Integer: + - U32 + - "3" + - line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " for i in 0..3 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " y -= 1;" + value: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + op: Sub + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + span: + line_start: 6 + line_stop: 8 + col_start: 19 + col_stop: 6 + path: compiler-test + content: " for i in 0..3 {\n...\n }" + span: + line_start: 6 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " for i in 0..3 {\n...\n }" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 0;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "0" + - line_start: 10 + line_stop: 10 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return y == 0;" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return y == 0;" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return y == 0;" + span: + line_start: 3 + line_stop: 11 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 11 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out b/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out index 4301500a16..57647316b5 100644 --- a/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out +++ b/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out @@ -16,3 +16,581 @@ outputs: a: 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"COUNT\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const COUNT: u32 = 2;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 16 + path: compiler-test + content: " const COUNT: u32 = 2;" + type_: + IntegerType: U32 + value: + Value: + Implicit: + - "2" + - line_start: 4 + line_stop: 4 + col_start: 24 + col_stop: 25 + path: compiler-test + content: " const COUNT: u32 = 2;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " const COUNT: u32 = 2;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let y = x;" + type_: ~ + value: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " let y = x;" + - Iteration: + variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..COUNT {\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " for i in 0..COUNT {" + stop: + Identifier: "{\"name\":\"COUNT\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..COUNT {\\\"}\"}" + block: + statements: + - Assign: + operation: Sub + assignee: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" + accesses: [] + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " y -= 1;" + value: + Value: + Implicit: + - "1" + - line_start: 8 + line_stop: 8 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + span: + line_start: 7 + line_stop: 9 + col_start: 23 + col_stop: 6 + path: compiler-test + content: " for i in 0..COUNT {\n...\n }" + span: + line_start: 7 + line_stop: 9 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " for i in 0..COUNT {\n...\n }" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 1;\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 11 + line_stop: 11 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return y == 1;" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return y == 1;" + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return y == 1;" + span: + line_start: 3 + line_stop: 12 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 12 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"COUNT\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const COUNT: u32 = 2;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 16 + path: compiler-test + content: " const COUNT: u32 = 2;" + type_: + IntegerType: U32 + value: + Value: + Implicit: + - "2" + - line_start: 4 + line_stop: 4 + col_start: 24 + col_stop: 25 + path: compiler-test + content: " const COUNT: u32 = 2;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " const COUNT: u32 = 2;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let y = x;" + type_: ~ + value: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " let y = x;" + - Iteration: + variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..COUNT {\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " for i in 0..COUNT {" + stop: + Identifier: "{\"name\":\"COUNT\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..COUNT {\\\"}\"}" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" + accesses: [] + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " y -= 1;" + value: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 8 + line_stop: 8 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + op: Sub + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + span: + line_start: 7 + line_stop: 9 + col_start: 23 + col_stop: 6 + path: compiler-test + content: " for i in 0..COUNT {\n...\n }" + span: + line_start: 7 + line_stop: 9 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " for i in 0..COUNT {\n...\n }" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 1;\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 11 + line_stop: 11 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return y == 1;" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return y == 1;" + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return y == 1;" + span: + line_start: 3 + line_stop: 12 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 12 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"COUNT\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const COUNT: u32 = 2;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 16 + path: compiler-test + content: " const COUNT: u32 = 2;" + type_: + IntegerType: U32 + value: + Value: + Integer: + - U32 + - "2" + - line_start: 4 + line_stop: 4 + col_start: 24 + col_stop: 25 + path: compiler-test + content: " const COUNT: u32 = 2;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 25 + path: compiler-test + content: " const COUNT: u32 = 2;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let y = x;" + type_: + IntegerType: U32 + value: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " let y = x;" + - Iteration: + variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..COUNT {\\\"}\"}" + start: + Value: + Integer: + - U32 + - "0" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " for i in 0..COUNT {" + stop: + Identifier: "{\"name\":\"COUNT\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..COUNT {\\\"}\"}" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" + accesses: [] + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " y -= 1;" + value: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 8 + line_stop: 8 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + op: Sub + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " y -= 1;" + span: + line_start: 7 + line_stop: 9 + col_start: 23 + col_stop: 6 + path: compiler-test + content: " for i in 0..COUNT {\n...\n }" + span: + line_start: 7 + line_stop: 9 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " for i in 0..COUNT {\n...\n }" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 1;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 11 + line_stop: 11 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " return y == 1;" + op: Eq + span: + line_start: 11 + line_stop: 11 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return y == 1;" + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return y == 1;" + span: + line_start: 3 + line_stop: 12 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 12 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out b/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out index 9fc84c54c3..469bb6ddc6 100644 --- a/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out +++ b/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out @@ -22,3 +22,382 @@ 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" + right: + Value: + Implicit: + - "3" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + block: + statements: + - Return: + expression: + Value: + Boolean: + - "true" + - line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 20 + path: compiler-test + content: " return true;" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 20 + path: compiler-test + content: " return true;" + span: + line_start: 4 + line_stop: 6 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n } else {" + next: + Block: + statements: + - Return: + expression: + Value: + Boolean: + - "false" + - line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 21 + path: compiler-test + content: " return false;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 21 + path: compiler-test + content: " return 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 x == 3 {\n...\n } else {\n...\n }" + span: + line_start: 3 + line_stop: 9 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> 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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" + right: + Value: + Implicit: + - "3" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + block: + statements: + - Return: + expression: + Value: + Boolean: + - "true" + - line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 20 + path: compiler-test + content: " return true;" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 20 + path: compiler-test + content: " return true;" + span: + line_start: 4 + line_stop: 6 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n } else {" + next: + Block: + statements: + - Return: + expression: + Value: + Boolean: + - "false" + - line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 21 + path: compiler-test + content: " return false;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 21 + path: compiler-test + content: " return 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 x == 3 {\n...\n } else {\n...\n }" + span: + line_start: 3 + line_stop: 9 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: 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\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" + right: + Value: + Integer: + - U32 + - "3" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + op: Eq + span: + line_start: 4 + line_stop: 4 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + block: + statements: + - Return: + expression: + Value: + Boolean: + - "true" + - line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 20 + path: compiler-test + content: " return true;" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 20 + path: compiler-test + content: " return true;" + span: + line_start: 4 + line_stop: 6 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n } else {" + next: + Block: + statements: + - Return: + expression: + Value: + Boolean: + - "false" + - line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 21 + path: compiler-test + content: " return false;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 21 + path: compiler-test + content: " return 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 x == 3 {\n...\n } else {\n...\n }" + span: + line_start: 3 + line_stop: 9 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/statements/mutate.leo.out b/tests/expectations/compiler/compiler/statements/mutate.leo.out index 96b9e1ff2f..e13189d265 100644 --- a/tests/expectations/compiler/compiler/statements/mutate.leo.out +++ b/tests/expectations/compiler/compiler/statements/mutate.leo.out @@ -22,3 +22,874 @@ outputs: a: 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = 5u32;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let b = 5u32;" + type_: ~ + value: + Value: + Integer: + - U32 + - "5" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " let b = 5u32;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " let b = 5u32;" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" + right: + Value: + Implicit: + - "3" + - line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b = 1;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " b = 1;" + value: + Value: + Implicit: + - "1" + - line_start: 7 + line_stop: 7 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " b = 1;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " b = 1;" + span: + line_start: 6 + line_stop: 8 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n } else {" + next: + Block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b = 0;\\\"}\"}" + accesses: [] + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " b = 0;" + value: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " b = 0;" + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " b = 0;" + span: + line_start: 8 + line_stop: 10 + col_start: 12 + col_stop: 6 + path: compiler-test + content: " } else {\n...\n }" + span: + line_start: 6 + line_stop: 10 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n } else {\n...\n }" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" + right: + Value: + Implicit: + - "3" + - line_start: 12 + line_stop: 12 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + op: Eq + span: + line_start: 12 + line_stop: 12 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + block: + statements: + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b == 1);\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 13 + line_stop: 13 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " return (b == 1);" + op: Eq + span: + line_start: 13 + line_stop: 13 + col_start: 17 + col_stop: 23 + path: compiler-test + content: " return (b == 1);" + span: + line_start: 13 + line_stop: 13 + col_start: 9 + col_stop: 23 + path: compiler-test + content: " return (b == 1);" + span: + line_start: 12 + line_stop: 14 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n } else {" + next: + Block: + statements: + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b == 0);\\\"}\"}" + right: + Value: + Implicit: + - "0" + - line_start: 15 + line_stop: 15 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " return (b == 0);" + op: Eq + span: + line_start: 15 + line_stop: 15 + col_start: 17 + col_stop: 23 + path: compiler-test + content: " return (b == 0);" + span: + line_start: 15 + line_stop: 15 + col_start: 9 + col_stop: 23 + path: compiler-test + content: " return (b == 0);" + span: + line_start: 14 + line_stop: 16 + col_start: 12 + col_stop: 6 + path: compiler-test + content: " } else {\n...\n }" + span: + line_start: 12 + line_stop: 16 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n } else {\n...\n }" + span: + line_start: 3 + line_stop: 17 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 17 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = 5u32;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let b = 5u32;" + type_: ~ + value: + Value: + Integer: + - U32 + - "5" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " let b = 5u32;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " let b = 5u32;" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" + right: + Value: + Implicit: + - "3" + - line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b = 1;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " b = 1;" + value: + Value: + Implicit: + - "1" + - line_start: 7 + line_stop: 7 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " b = 1;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " b = 1;" + span: + line_start: 6 + line_stop: 8 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n } else {" + next: + Block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b = 0;\\\"}\"}" + accesses: [] + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " b = 0;" + value: + Value: + Implicit: + - "0" + - line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " b = 0;" + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " b = 0;" + span: + line_start: 8 + line_stop: 10 + col_start: 12 + col_stop: 6 + path: compiler-test + content: " } else {\n...\n }" + span: + line_start: 6 + line_stop: 10 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n } else {\n...\n }" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" + right: + Value: + Implicit: + - "3" + - line_start: 12 + line_stop: 12 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + op: Eq + span: + line_start: 12 + line_stop: 12 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + block: + statements: + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b == 1);\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 13 + line_stop: 13 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " return (b == 1);" + op: Eq + span: + line_start: 13 + line_stop: 13 + col_start: 17 + col_stop: 23 + path: compiler-test + content: " return (b == 1);" + span: + line_start: 13 + line_stop: 13 + col_start: 9 + col_stop: 23 + path: compiler-test + content: " return (b == 1);" + span: + line_start: 12 + line_stop: 14 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n } else {" + next: + Block: + statements: + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b == 0);\\\"}\"}" + right: + Value: + Implicit: + - "0" + - line_start: 15 + line_stop: 15 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " return (b == 0);" + op: Eq + span: + line_start: 15 + line_stop: 15 + col_start: 17 + col_stop: 23 + path: compiler-test + content: " return (b == 0);" + span: + line_start: 15 + line_stop: 15 + col_start: 9 + col_stop: 23 + path: compiler-test + content: " return (b == 0);" + span: + line_start: 14 + line_stop: 16 + col_start: 12 + col_stop: 6 + path: compiler-test + content: " } else {\n...\n }" + span: + line_start: 12 + line_stop: 16 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n } else {\n...\n }" + span: + line_start: 3 + line_stop: 17 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 17 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = 5u32;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let b = 5u32;" + type_: + IntegerType: U32 + value: + Value: + Integer: + - U32 + - "5" + - line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 17 + path: compiler-test + content: " let b = 5u32;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " let b = 5u32;" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" + right: + Value: + Integer: + - U32 + - "3" + - line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b = 1;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " b = 1;" + value: + Value: + Integer: + - U32 + - "1" + - line_start: 7 + line_stop: 7 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " b = 1;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " b = 1;" + span: + line_start: 6 + line_stop: 8 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n } else {" + next: + Block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b = 0;\\\"}\"}" + accesses: [] + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " b = 0;" + value: + Value: + Integer: + - U32 + - "0" + - line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " b = 0;" + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " b = 0;" + span: + line_start: 8 + line_stop: 10 + col_start: 12 + col_stop: 6 + path: compiler-test + content: " } else {\n...\n }" + span: + line_start: 6 + line_stop: 10 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n } else {\n...\n }" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" + right: + Value: + Integer: + - U32 + - "3" + - line_start: 12 + line_stop: 12 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + op: Eq + span: + line_start: 12 + line_stop: 12 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 3 {" + block: + statements: + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b == 1);\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 13 + line_stop: 13 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " return (b == 1);" + op: Eq + span: + line_start: 13 + line_stop: 13 + col_start: 17 + col_stop: 23 + path: compiler-test + content: " return (b == 1);" + span: + line_start: 13 + line_stop: 13 + col_start: 9 + col_stop: 23 + path: compiler-test + content: " return (b == 1);" + span: + line_start: 12 + line_stop: 14 + col_start: 15 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n } else {" + next: + Block: + statements: + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b == 0);\\\"}\"}" + right: + Value: + Integer: + - U32 + - "0" + - line_start: 15 + line_stop: 15 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " return (b == 0);" + op: Eq + span: + line_start: 15 + line_stop: 15 + col_start: 17 + col_stop: 23 + path: compiler-test + content: " return (b == 0);" + span: + line_start: 15 + line_stop: 15 + col_start: 9 + col_stop: 23 + path: compiler-test + content: " return (b == 0);" + span: + line_start: 14 + line_stop: 16 + col_start: 12 + col_stop: 6 + path: compiler-test + content: " } else {\n...\n }" + span: + line_start: 12 + line_stop: 16 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if x == 3 {\n...\n } else {\n...\n }" + span: + line_start: 3 + line_stop: 17 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 17 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out b/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out index de74e3f75b..5b4b72c742 100644 --- a/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out +++ b/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out @@ -28,3 +28,822 @@ 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let d = x;" + type_: ~ + value: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " let d = x;" + - Conditional: + condition: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 || x == 5 {\\\"}\"}" + right: + Value: + Implicit: + - "3" + - line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 3 || x == 5 {" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 3 || x == 5 {" + right: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 || x == 5 {\\\"}\"}" + right: + Value: + Implicit: + - "5" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " if x == 3 || x == 5 {" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 24 + path: compiler-test + content: " if x == 3 || x == 5 {" + op: Or + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 24 + path: compiler-test + content: " if x == 3 || x == 5 {" + block: + statements: + - Assign: + operation: Add + assignee: + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 1;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " d += 1;" + value: + Value: + Implicit: + - "1" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " d += 1;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " d += 1;" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" + right: + Value: + Implicit: + - "3" + - line_start: 8 + line_stop: 8 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " if x == 3 {" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " if x == 3 {" + block: + statements: + - Assign: + operation: Add + assignee: + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 2;\\\"}\"}" + accesses: [] + span: + line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " d += 2;" + value: + Value: + Implicit: + - "2" + - line_start: 9 + line_stop: 9 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " d += 2;" + span: + line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " d += 2;" + span: + line_start: 8 + line_stop: 10 + col_start: 19 + col_stop: 10 + path: compiler-test + content: " if x == 3 {\n...\n }" + next: ~ + span: + line_start: 8 + line_stop: 10 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " if x == 3 {\n...\n }" + span: + line_start: 6 + line_stop: 11 + col_start: 25 + col_stop: 6 + path: compiler-test + content: " if x == 3 || x == 5 {\n...\n }" + next: ~ + span: + line_start: 6 + line_stop: 11 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if x == 3 || x == 5 {\n...\n }\n\n\n" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return d > x;\\\"}\"}" + right: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return d > x;\\\"}\"}" + op: Gt + span: + line_start: 13 + line_stop: 13 + col_start: 12 + col_stop: 17 + path: compiler-test + content: " return d > x;" + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " return d > x;" + span: + line_start: 3 + line_stop: 14 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 14 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let d = x;" + type_: ~ + value: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " let d = x;" + - Conditional: + condition: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 || x == 5 {\\\"}\"}" + right: + Value: + Implicit: + - "3" + - line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 3 || x == 5 {" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 3 || x == 5 {" + right: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 || x == 5 {\\\"}\"}" + right: + Value: + Implicit: + - "5" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " if x == 3 || x == 5 {" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 24 + path: compiler-test + content: " if x == 3 || x == 5 {" + op: Or + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 24 + path: compiler-test + content: " if x == 3 || x == 5 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 1;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " d += 1;" + value: + Binary: + left: + Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 1;\\\"}\"}" + right: + Value: + Implicit: + - "1" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " d += 1;" + op: Add + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " d += 1;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " d += 1;" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" + right: + Value: + Implicit: + - "3" + - line_start: 8 + line_stop: 8 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " if x == 3 {" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " if x == 3 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 2;\\\"}\"}" + accesses: [] + span: + line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " d += 2;" + value: + Binary: + left: + Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 2;\\\"}\"}" + right: + Value: + Implicit: + - "2" + - line_start: 9 + line_stop: 9 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " d += 2;" + op: Add + span: + line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " d += 2;" + span: + line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " d += 2;" + span: + line_start: 8 + line_stop: 10 + col_start: 19 + col_stop: 10 + path: compiler-test + content: " if x == 3 {\n...\n }" + next: ~ + span: + line_start: 8 + line_stop: 10 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " if x == 3 {\n...\n }" + span: + line_start: 6 + line_stop: 11 + col_start: 25 + col_stop: 6 + path: compiler-test + content: " if x == 3 || x == 5 {\n...\n }" + next: ~ + span: + line_start: 6 + line_stop: 11 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if x == 3 || x == 5 {\n...\n }\n\n\n" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return d > x;\\\"}\"}" + right: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return d > x;\\\"}\"}" + op: Gt + span: + line_start: 13 + line_stop: 13 + col_start: 12 + col_stop: 17 + path: compiler-test + content: " return d > x;" + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " return d > x;" + span: + line_start: 3 + line_stop: 14 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 14 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" + 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(x: u32) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let d = x;" + type_: + IntegerType: U32 + value: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = x;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: compiler-test + content: " let d = x;" + - Conditional: + condition: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 || x == 5 {\\\"}\"}" + right: + Value: + Integer: + - U32 + - "3" + - line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " if x == 3 || x == 5 {" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 14 + path: compiler-test + content: " if x == 3 || x == 5 {" + right: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 || x == 5 {\\\"}\"}" + right: + Value: + Integer: + - U32 + - "5" + - line_start: 6 + line_stop: 6 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " if x == 3 || x == 5 {" + op: Eq + span: + line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 24 + path: compiler-test + content: " if x == 3 || x == 5 {" + op: Or + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 24 + path: compiler-test + content: " if x == 3 || x == 5 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 1;\\\"}\"}" + accesses: [] + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " d += 1;" + value: + Binary: + left: + Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 1;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "1" + - line_start: 7 + line_stop: 7 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " d += 1;" + op: Add + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " d += 1;" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " d += 1;" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" + right: + Value: + Integer: + - U32 + - "3" + - line_start: 8 + line_stop: 8 + col_start: 17 + col_stop: 18 + path: compiler-test + content: " if x == 3 {" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " if x == 3 {" + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 2;\\\"}\"}" + accesses: [] + span: + line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " d += 2;" + value: + Binary: + left: + Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 2;\\\"}\"}" + right: + Value: + Integer: + - U32 + - "2" + - line_start: 9 + line_stop: 9 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " d += 2;" + op: Add + span: + line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " d += 2;" + span: + line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 19 + path: compiler-test + content: " d += 2;" + span: + line_start: 8 + line_stop: 10 + col_start: 19 + col_stop: 10 + path: compiler-test + content: " if x == 3 {\n...\n }" + next: ~ + span: + line_start: 8 + line_stop: 10 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " if x == 3 {\n...\n }" + span: + line_start: 6 + line_stop: 11 + col_start: 25 + col_stop: 6 + path: compiler-test + content: " if x == 3 || x == 5 {\n...\n }" + next: ~ + span: + line_start: 6 + line_stop: 11 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " if x == 3 || x == 5 {\n...\n }\n\n\n" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return d > x;\\\"}\"}" + right: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return d > x;\\\"}\"}" + op: Gt + span: + line_start: 13 + line_stop: 13 + col_start: 12 + col_stop: 17 + path: compiler-test + content: " return d > x;" + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " return d > x;" + span: + line_start: 3 + line_stop: 14 + col_start: 31 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 14 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/string/circuit.leo.out b/tests/expectations/compiler/compiler/string/circuit.leo.out index e178817d2d..2f2ed3e9e9 100644 --- a/tests/expectations/compiler/compiler/string/circuit.leo.out +++ b/tests/expectations/compiler/compiler/string/circuit.leo.out @@ -16,3 +16,1786 @@ outputs: out: type: "[char; 13]" value: "\"Hello, World!\"" + 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\":\"s1\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":7,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1: [char; 13];\\\"}\"}" + - Array: + - Char + - - value: "13" + global_consts: {} + functions: + "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "13" + span: + line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function takes_string(s: [char; 13]) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return s == \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" + right: + Value: + String: + - - Scalar: 72 + - Scalar: 101 + - Scalar: 108 + - Scalar: 108 + - Scalar: 111 + - Scalar: 44 + - Scalar: 32 + - Scalar: 87 + - Scalar: 111 + - Scalar: 114 + - Scalar: 108 + - Scalar: 100 + - Scalar: 33 + - line_start: 8 + line_stop: 8 + col_start: 17 + col_stop: 32 + path: compiler-test + content: " return s == \"Hello, World!\";" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 32 + path: compiler-test + content: " return s == \"Hello, World!\";" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 32 + path: compiler-test + content: " return s == \"Hello, World!\";" + span: + line_start: 7 + line_stop: 9 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function takes_string(s: [char; 13]) -> bool {\n...\n}" + span: + line_start: 7 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function takes_string(s: [char; 13]) -> bool {\n...\n}" + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "13" + span: + line_start: 11 + line_stop: 11 + col_start: 15 + col_stop: 17 + path: compiler-test + content: "function main(s1: [char; 13]) -> [char; 13] {" + output: + Array: + - Char + - - value: "13" + 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 { s1 };\\\"}\"}" + span: + line_start: 12 + line_stop: 12 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let f = Foo { s1 };" + 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 { s1 };\\\"}\"}" + members: + - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":19,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { s1 };\\\"}\"}" + expression: ~ + span: + line_start: 12 + line_stop: 12 + col_start: 13 + col_stop: 23 + path: compiler-test + content: " let f = Foo { s1 };" + span: + line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " let f = Foo { s1 };" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let b = takes_string(s1);" + type_: ~ + value: + Call: + function: + Identifier: "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" + arguments: + - Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":26,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 13 + col_stop: 29 + path: compiler-test + content: " let b = takes_string(s1);" + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 29 + path: compiler-test + content: " let b = takes_string(s1);" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" + span: + line_start: 15 + line_stop: 15 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + type_: ~ + value: + Ternary: + condition: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" + name: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":20,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" + span: + line_start: 15 + line_stop: 15 + col_start: 18 + col_stop: 22 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + right: + Value: + String: + - - Scalar: 72 + - Scalar: 101 + - Scalar: 108 + - Scalar: 108 + - Scalar: 111 + - Scalar: 44 + - Scalar: 32 + - Scalar: 87 + - Scalar: 111 + - Scalar: 114 + - Scalar: 108 + - Scalar: 100 + - Scalar: 33 + - line_start: 15 + line_stop: 15 + col_start: 26 + col_stop: 41 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + op: Eq + span: + line_start: 15 + line_stop: 15 + col_start: 18 + col_stop: 41 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + if_true: + Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":44,\\\"col_stop\\\":46,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" + if_false: + Value: + String: + - - Scalar: 97 + - Scalar: 98 + - Scalar: 99 + - Scalar: 100 + - Scalar: 101 + - Scalar: 102 + - Scalar: 103 + - Scalar: 104 + - Scalar: 106 + - Scalar: 107 + - Scalar: 108 + - Scalar: 109 + - Scalar: 110 + - line_start: 15 + line_stop: 15 + col_start: 49 + col_stop: 64 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + span: + line_start: 15 + line_stop: 15 + col_start: 18 + col_stop: 64 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + span: + line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 64 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Return: + expression: + Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return result;\\\"}\"}" + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return result;" + span: + line_start: 11 + line_stop: 17 + col_start: 45 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13]) -> [char; 13] {\n...\n}" + span: + line_start: 11 + line_stop: 17 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13]) -> [char; 13] {\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\":\"s1\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":7,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1: [char; 13];\\\"}\"}" + - Array: + - Char + - - value: "13" + global_consts: {} + functions: + "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "13" + span: + line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function takes_string(s: [char; 13]) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return s == \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 72 + span: + line_start: 8 + line_stop: 8 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 8 + line_stop: 8 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 8 + line_stop: 8 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 8 + line_stop: 8 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 8 + line_stop: 8 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 44 + span: + line_start: 8 + line_stop: 8 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 8 + line_stop: 8 + col_start: 24 + col_stop: 25 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 87 + span: + line_start: 8 + line_stop: 8 + col_start: 25 + col_stop: 26 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 8 + line_stop: 8 + col_start: 26 + col_stop: 27 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 114 + span: + line_start: 8 + line_stop: 8 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 8 + line_stop: 8 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 8 + line_stop: 8 + col_start: 29 + col_stop: 30 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 8 + line_stop: 8 + col_start: 30 + col_stop: 31 + path: compiler-test + content: " return s == \"Hello, World!\";" + span: + line_start: 8 + line_stop: 8 + col_start: 17 + col_stop: 32 + path: compiler-test + content: " return s == \"Hello, World!\";" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 32 + path: compiler-test + content: " return s == \"Hello, World!\";" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 32 + path: compiler-test + content: " return s == \"Hello, World!\";" + span: + line_start: 7 + line_stop: 9 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function takes_string(s: [char; 13]) -> bool {\n...\n}" + span: + line_start: 7 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function takes_string(s: [char; 13]) -> bool {\n...\n}" + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "13" + span: + line_start: 11 + line_stop: 11 + col_start: 15 + col_stop: 17 + path: compiler-test + content: "function main(s1: [char; 13]) -> [char; 13] {" + output: + Array: + - Char + - - value: "13" + 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 { s1 };\\\"}\"}" + span: + line_start: 12 + line_stop: 12 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let f = Foo { s1 };" + 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 { s1 };\\\"}\"}" + members: + - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":19,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { s1 };\\\"}\"}" + expression: ~ + span: + line_start: 12 + line_stop: 12 + col_start: 13 + col_stop: 23 + path: compiler-test + content: " let f = Foo { s1 };" + span: + line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " let f = Foo { s1 };" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let b = takes_string(s1);" + type_: ~ + value: + Call: + function: + Identifier: "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" + arguments: + - Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":26,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 13 + col_stop: 29 + path: compiler-test + content: " let b = takes_string(s1);" + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 29 + path: compiler-test + content: " let b = takes_string(s1);" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" + span: + line_start: 15 + line_stop: 15 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + type_: ~ + value: + Ternary: + condition: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" + name: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":20,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" + span: + line_start: 15 + line_stop: 15 + col_start: 18 + col_stop: 22 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + right: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 72 + span: + line_start: 15 + line_stop: 15 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 15 + line_stop: 15 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 15 + line_stop: 15 + col_start: 29 + col_stop: 30 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 15 + line_stop: 15 + col_start: 30 + col_stop: 31 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 15 + line_stop: 15 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 44 + span: + line_start: 15 + line_stop: 15 + col_start: 32 + col_stop: 33 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 15 + line_stop: 15 + col_start: 33 + col_stop: 34 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 87 + span: + line_start: 15 + line_stop: 15 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 15 + line_stop: 15 + col_start: 35 + col_stop: 36 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 114 + span: + line_start: 15 + line_stop: 15 + col_start: 36 + col_stop: 37 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 15 + line_stop: 15 + col_start: 37 + col_stop: 38 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 15 + line_stop: 15 + col_start: 38 + col_stop: 39 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 15 + line_stop: 15 + col_start: 39 + col_stop: 40 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + span: + line_start: 15 + line_stop: 15 + col_start: 26 + col_stop: 41 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + op: Eq + span: + line_start: 15 + line_stop: 15 + col_start: 18 + col_stop: 41 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + if_true: + Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":44,\\\"col_stop\\\":46,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" + if_false: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 97 + span: + line_start: 15 + line_stop: 15 + col_start: 50 + col_stop: 51 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 98 + span: + line_start: 15 + line_stop: 15 + col_start: 51 + col_stop: 52 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 99 + span: + line_start: 15 + line_stop: 15 + col_start: 52 + col_stop: 53 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 15 + line_stop: 15 + col_start: 53 + col_stop: 54 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 15 + line_stop: 15 + col_start: 54 + col_stop: 55 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 102 + span: + line_start: 15 + line_stop: 15 + col_start: 55 + col_stop: 56 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 103 + span: + line_start: 15 + line_stop: 15 + col_start: 56 + col_stop: 57 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 104 + span: + line_start: 15 + line_stop: 15 + col_start: 57 + col_stop: 58 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 106 + span: + line_start: 15 + line_stop: 15 + col_start: 58 + col_stop: 59 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 107 + span: + line_start: 15 + line_stop: 15 + col_start: 59 + col_stop: 60 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 15 + line_stop: 15 + col_start: 60 + col_stop: 61 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 109 + span: + line_start: 15 + line_stop: 15 + col_start: 61 + col_stop: 62 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 110 + span: + line_start: 15 + line_stop: 15 + col_start: 62 + col_stop: 63 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + span: + line_start: 15 + line_stop: 15 + col_start: 49 + col_stop: 64 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + span: + line_start: 15 + line_stop: 15 + col_start: 18 + col_stop: 64 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + span: + line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 64 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Return: + expression: + Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return result;\\\"}\"}" + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return result;" + span: + line_start: 11 + line_stop: 17 + col_start: 45 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13]) -> [char; 13] {\n...\n}" + span: + line_start: 11 + line_stop: 17 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13]) -> [char; 13] {\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\":\"s1\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":7,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1: [char; 13];\\\"}\"}" + - Array: + - Char + - - value: "13" + global_consts: {} + functions: + "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "13" + span: + line_start: 7 + line_stop: 7 + col_start: 23 + col_stop: 24 + path: compiler-test + content: "function takes_string(s: [char; 13]) -> bool {" + output: Boolean + block: + statements: + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return s == \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 72 + span: + line_start: 8 + line_stop: 8 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 8 + line_stop: 8 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 8 + line_stop: 8 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 8 + line_stop: 8 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 8 + line_stop: 8 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 44 + span: + line_start: 8 + line_stop: 8 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 8 + line_stop: 8 + col_start: 24 + col_stop: 25 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 87 + span: + line_start: 8 + line_stop: 8 + col_start: 25 + col_stop: 26 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 8 + line_stop: 8 + col_start: 26 + col_stop: 27 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 114 + span: + line_start: 8 + line_stop: 8 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 8 + line_stop: 8 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 8 + line_stop: 8 + col_start: 29 + col_stop: 30 + path: compiler-test + content: " return s == \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 8 + line_stop: 8 + col_start: 30 + col_stop: 31 + path: compiler-test + content: " return s == \"Hello, World!\";" + span: + line_start: 8 + line_stop: 8 + col_start: 17 + col_stop: 32 + path: compiler-test + content: " return s == \"Hello, World!\";" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 32 + path: compiler-test + content: " return s == \"Hello, World!\";" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 32 + path: compiler-test + content: " return s == \"Hello, World!\";" + span: + line_start: 7 + line_stop: 9 + col_start: 46 + col_stop: 2 + path: compiler-test + content: "function takes_string(s: [char; 13]) -> bool {\n...\n}" + span: + line_start: 7 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function takes_string(s: [char; 13]) -> bool {\n...\n}" + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "13" + span: + line_start: 11 + line_stop: 11 + col_start: 15 + col_stop: 17 + path: compiler-test + content: "function main(s1: [char; 13]) -> [char; 13] {" + output: + Array: + - Char + - - value: "13" + 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 { s1 };\\\"}\"}" + span: + line_start: 12 + line_stop: 12 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let f = Foo { s1 };" + 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 { s1 };\\\"}\"}" + members: + - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":19,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { s1 };\\\"}\"}" + expression: ~ + span: + line_start: 12 + line_stop: 12 + col_start: 13 + col_stop: 23 + path: compiler-test + content: " let f = Foo { s1 };" + span: + line_start: 12 + line_stop: 12 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " let f = Foo { s1 };" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let b = takes_string(s1);" + type_: Boolean + value: + Call: + function: + Identifier: "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" + arguments: + - Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":26,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" + span: + line_start: 13 + line_stop: 13 + col_start: 13 + col_stop: 29 + path: compiler-test + content: " let b = takes_string(s1);" + span: + line_start: 13 + line_stop: 13 + col_start: 5 + col_stop: 29 + path: compiler-test + content: " let b = takes_string(s1);" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" + span: + line_start: 15 + line_stop: 15 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + type_: + Array: + - Char + - - value: "13" + value: + Ternary: + condition: + Binary: + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" + name: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":20,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" + span: + line_start: 15 + line_stop: 15 + col_start: 18 + col_stop: 22 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + right: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 72 + span: + line_start: 15 + line_stop: 15 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 15 + line_stop: 15 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 15 + line_stop: 15 + col_start: 29 + col_stop: 30 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 15 + line_stop: 15 + col_start: 30 + col_stop: 31 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 15 + line_stop: 15 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 44 + span: + line_start: 15 + line_stop: 15 + col_start: 32 + col_stop: 33 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 15 + line_stop: 15 + col_start: 33 + col_stop: 34 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 87 + span: + line_start: 15 + line_stop: 15 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 15 + line_stop: 15 + col_start: 35 + col_stop: 36 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 114 + span: + line_start: 15 + line_stop: 15 + col_start: 36 + col_stop: 37 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 15 + line_stop: 15 + col_start: 37 + col_stop: 38 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 15 + line_stop: 15 + col_start: 38 + col_stop: 39 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 15 + line_stop: 15 + col_start: 39 + col_stop: 40 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + span: + line_start: 15 + line_stop: 15 + col_start: 26 + col_stop: 41 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + op: Eq + span: + line_start: 15 + line_stop: 15 + col_start: 18 + col_stop: 41 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + if_true: + Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":44,\\\"col_stop\\\":46,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" + if_false: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 97 + span: + line_start: 15 + line_stop: 15 + col_start: 50 + col_stop: 51 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 98 + span: + line_start: 15 + line_stop: 15 + col_start: 51 + col_stop: 52 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 99 + span: + line_start: 15 + line_stop: 15 + col_start: 52 + col_stop: 53 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 15 + line_stop: 15 + col_start: 53 + col_stop: 54 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 15 + line_stop: 15 + col_start: 54 + col_stop: 55 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 102 + span: + line_start: 15 + line_stop: 15 + col_start: 55 + col_stop: 56 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 103 + span: + line_start: 15 + line_stop: 15 + col_start: 56 + col_stop: 57 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 104 + span: + line_start: 15 + line_stop: 15 + col_start: 57 + col_stop: 58 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 106 + span: + line_start: 15 + line_stop: 15 + col_start: 58 + col_stop: 59 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 107 + span: + line_start: 15 + line_stop: 15 + col_start: 59 + col_stop: 60 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 15 + line_stop: 15 + col_start: 60 + col_stop: 61 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 109 + span: + line_start: 15 + line_stop: 15 + col_start: 61 + col_stop: 62 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Expression: + Value: + Char: + character: + Scalar: 110 + span: + line_start: 15 + line_stop: 15 + col_start: 62 + col_stop: 63 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + span: + line_start: 15 + line_stop: 15 + col_start: 49 + col_stop: 64 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + span: + line_start: 15 + line_stop: 15 + col_start: 18 + col_stop: 64 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + span: + line_start: 15 + line_stop: 15 + col_start: 5 + col_stop: 64 + path: compiler-test + content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" + - Return: + expression: + Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return result;\\\"}\"}" + span: + line_start: 16 + line_stop: 16 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return result;" + span: + line_start: 11 + line_stop: 17 + col_start: 45 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13]) -> [char; 13] {\n...\n}" + span: + line_start: 11 + line_stop: 17 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13]) -> [char; 13] {\n...\n}\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/string/equality.leo.out b/tests/expectations/compiler/compiler/string/equality.leo.out index 21015d1a1e..b08167a29b 100644 --- a/tests/expectations/compiler/compiler/string/equality.leo.out +++ b/tests/expectations/compiler/compiler/string/equality.leo.out @@ -22,3 +22,2420 @@ outputs: out: 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(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "13" + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 17 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" + - Variable: + identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "4" + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 33 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let hello: [char; 13] = \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + type_: + Array: + - Char + - - value: "13" + value: + Value: + String: + - - Scalar: 72 + - Scalar: 101 + - Scalar: 108 + - Scalar: 108 + - Scalar: 111 + - Scalar: 44 + - Scalar: 32 + - Scalar: 87 + - Scalar: 111 + - Scalar: 114 + - Scalar: 108 + - Scalar: 100 + - Scalar: 33 + - line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 44 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 44 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"part1\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let part1 = \\\\\\\"Good\\\\\\\";\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " let part1 = \"Good\";" + type_: ~ + value: + Value: + String: + - - Scalar: 71 + - Scalar: 111 + - Scalar: 111 + - Scalar: 100 + - line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 23 + path: compiler-test + content: " let part1 = \"Good\";" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " let part1 = \"Good\";" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"part2\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let part2 = \\\\\\\" dog!\\\\\\\";\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " let part2 = \" dog!\";" + type_: ~ + value: + Value: + String: + - - Scalar: 32 + - Scalar: 100 + - Scalar: 111 + - Scalar: 103 + - Scalar: 33 + - line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 24 + path: compiler-test + content: " let part2 = \" dog!\";" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " let part2 = \" dog!\";" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"concat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " let concat: [char; 9] = [...part1, ...part2];" + type_: + Array: + - Char + - - value: "9" + value: + ArrayInline: + elements: + - Spread: + Identifier: "{\"name\":\"part1\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":33,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" + - Spread: + Identifier: "{\"name\":\"part2\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":43,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 49 + path: compiler-test + content: " let concat: [char; 9] = [...part1, ...part2];" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 49 + path: compiler-test + content: " let concat: [char; 9] = [...part1, ...part2];" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = false;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let x = false;" + type_: ~ + value: + Value: + Boolean: + - "false" + - line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 18 + path: compiler-test + content: " let x = false;" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " let x = false;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x = \\\\\\\"test1\\\\\\\" == \\\\\\\"test2\\\\\\\";\\\"}\"}" + accesses: [] + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + value: + Binary: + left: + Value: + String: + - - Scalar: 116 + - Scalar: 101 + - Scalar: 115 + - Scalar: 116 + - Scalar: 49 + - line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 16 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + right: + Value: + String: + - - Scalar: 116 + - Scalar: 101 + - Scalar: 115 + - Scalar: 116 + - Scalar: 50 + - line_start: 9 + line_stop: 9 + col_start: 20 + col_stop: 27 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 27 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Return: + expression: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" + right: + Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":21,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + Binary: + left: + Value: + String: + - - Scalar: 110 + - Scalar: 111 + - Scalar: 112 + - Scalar: 101 + - line_start: 10 + line_stop: 10 + col_start: 27 + col_stop: 33 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":37,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" + op: Ne + span: + line_start: 10 + line_stop: 10 + col_start: 27 + col_stop: 39 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + op: And + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 39 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + Binary: + left: + Value: + String: + - - Scalar: 101 + - Scalar: 115 + - line_start: 10 + line_stop: 10 + col_start: 43 + col_stop: 47 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + ArrayRangeAccess: + array: + Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":51,\\\"col_stop\\\":53,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" + left: + Value: + Implicit: + - "1" + - line_start: 10 + line_stop: 10 + col_start: 54 + col_stop: 55 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + Value: + Implicit: + - "3" + - line_start: 10 + line_stop: 10 + col_start: 57 + col_stop: 58 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + span: + line_start: 10 + line_stop: 10 + col_start: 51 + col_stop: 59 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 43 + col_stop: 59 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + op: And + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 59 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + Binary: + left: + Identifier: "{\"name\":\"concat\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":63,\\\"col_stop\\\":69,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" + right: + Value: + String: + - - Scalar: 71 + - Scalar: 111 + - Scalar: 111 + - Scalar: 100 + - Scalar: 32 + - Scalar: 100 + - Scalar: 111 + - Scalar: 103 + - Scalar: 33 + - line_start: 10 + line_stop: 10 + col_start: 73 + col_stop: 84 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 63 + col_stop: 84 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + op: And + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 84 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 84 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + span: + line_start: 3 + line_stop: 11 + col_start: 54 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 11 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\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(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "13" + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 17 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" + - Variable: + identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "4" + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 33 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let hello: [char; 13] = \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + type_: + Array: + - Char + - - value: "13" + value: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 72 + span: + line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 31 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 4 + line_stop: 4 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 4 + line_stop: 4 + col_start: 32 + col_stop: 33 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 4 + line_stop: 4 + col_start: 33 + col_stop: 34 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 4 + line_stop: 4 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 44 + span: + line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 36 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 4 + line_stop: 4 + col_start: 36 + col_stop: 37 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 87 + span: + line_start: 4 + line_stop: 4 + col_start: 37 + col_stop: 38 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 4 + line_stop: 4 + col_start: 38 + col_stop: 39 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 114 + span: + line_start: 4 + line_stop: 4 + col_start: 39 + col_stop: 40 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 41 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 42 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 43 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 44 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 44 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"part1\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let part1 = \\\\\\\"Good\\\\\\\";\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " let part1 = \"Good\";" + type_: ~ + value: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 71 + span: + line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " let part1 = \"Good\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 5 + line_stop: 5 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " let part1 = \"Good\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 5 + line_stop: 5 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " let part1 = \"Good\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 5 + line_stop: 5 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " let part1 = \"Good\";" + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 23 + path: compiler-test + content: " let part1 = \"Good\";" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " let part1 = \"Good\";" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"part2\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let part2 = \\\\\\\" dog!\\\\\\\";\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " let part2 = \" dog!\";" + type_: ~ + value: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " let part2 = \" dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 6 + line_stop: 6 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " let part2 = \" dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 6 + line_stop: 6 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " let part2 = \" dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 103 + span: + line_start: 6 + line_stop: 6 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " let part2 = \" dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 6 + line_stop: 6 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " let part2 = \" dog!\";" + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 24 + path: compiler-test + content: " let part2 = \" dog!\";" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " let part2 = \" dog!\";" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"concat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " let concat: [char; 9] = [...part1, ...part2];" + type_: + Array: + - Char + - - value: "9" + value: + ArrayInline: + elements: + - Spread: + Identifier: "{\"name\":\"part1\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":33,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" + - Spread: + Identifier: "{\"name\":\"part2\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":43,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 49 + path: compiler-test + content: " let concat: [char; 9] = [...part1, ...part2];" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 49 + path: compiler-test + content: " let concat: [char; 9] = [...part1, ...part2];" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = false;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let x = false;" + type_: ~ + value: + Value: + Boolean: + - "false" + - line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 18 + path: compiler-test + content: " let x = false;" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " let x = false;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x = \\\\\\\"test1\\\\\\\" == \\\\\\\"test2\\\\\\\";\\\"}\"}" + accesses: [] + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + value: + Binary: + left: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 116 + span: + line_start: 9 + line_stop: 9 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 115 + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 13 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 116 + span: + line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 49 + span: + line_start: 9 + line_stop: 9 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 16 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + right: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 116 + span: + line_start: 9 + line_stop: 9 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 9 + line_stop: 9 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 115 + span: + line_start: 9 + line_stop: 9 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 116 + span: + line_start: 9 + line_stop: 9 + col_start: 24 + col_stop: 25 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 50 + span: + line_start: 9 + line_stop: 9 + col_start: 25 + col_stop: 26 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + span: + line_start: 9 + line_stop: 9 + col_start: 20 + col_stop: 27 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 27 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Return: + expression: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" + right: + Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":21,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + Binary: + left: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 110 + span: + line_start: 10 + line_stop: 10 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 10 + line_stop: 10 + col_start: 29 + col_stop: 30 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 112 + span: + line_start: 10 + line_stop: 10 + col_start: 30 + col_stop: 31 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 10 + line_stop: 10 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + span: + line_start: 10 + line_stop: 10 + col_start: 27 + col_stop: 33 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":37,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" + op: Ne + span: + line_start: 10 + line_stop: 10 + col_start: 27 + col_stop: 39 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + op: And + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 39 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + Binary: + left: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 10 + line_stop: 10 + col_start: 44 + col_stop: 45 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 115 + span: + line_start: 10 + line_stop: 10 + col_start: 45 + col_stop: 46 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + span: + line_start: 10 + line_stop: 10 + col_start: 43 + col_stop: 47 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + ArrayRangeAccess: + array: + Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":51,\\\"col_stop\\\":53,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" + left: + Value: + Implicit: + - "1" + - line_start: 10 + line_stop: 10 + col_start: 54 + col_stop: 55 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + Value: + Implicit: + - "3" + - line_start: 10 + line_stop: 10 + col_start: 57 + col_stop: 58 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + span: + line_start: 10 + line_stop: 10 + col_start: 51 + col_stop: 59 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 43 + col_stop: 59 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + op: And + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 59 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + Binary: + left: + Identifier: "{\"name\":\"concat\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":63,\\\"col_stop\\\":69,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 71 + span: + line_start: 10 + line_stop: 10 + col_start: 74 + col_stop: 75 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 10 + line_stop: 10 + col_start: 75 + col_stop: 76 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 10 + line_stop: 10 + col_start: 76 + col_stop: 77 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 10 + line_stop: 10 + col_start: 77 + col_stop: 78 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 10 + line_stop: 10 + col_start: 78 + col_stop: 79 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 10 + line_stop: 10 + col_start: 79 + col_stop: 80 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 10 + line_stop: 10 + col_start: 80 + col_stop: 81 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 103 + span: + line_start: 10 + line_stop: 10 + col_start: 81 + col_stop: 82 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 10 + line_stop: 10 + col_start: 82 + col_stop: 83 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + span: + line_start: 10 + line_stop: 10 + col_start: 73 + col_stop: 84 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 63 + col_stop: 84 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + op: And + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 84 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 84 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + span: + line_start: 3 + line_stop: 11 + col_start: 54 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 11 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\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(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "13" + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 17 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" + - Variable: + identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "4" + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 33 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" + output: Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let hello: [char; 13] = \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + type_: + Array: + - Char + - - value: "13" + value: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 72 + span: + line_start: 4 + line_stop: 4 + col_start: 30 + col_stop: 31 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 4 + line_stop: 4 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 4 + line_stop: 4 + col_start: 32 + col_stop: 33 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 4 + line_stop: 4 + col_start: 33 + col_stop: 34 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 4 + line_stop: 4 + col_start: 34 + col_stop: 35 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 44 + span: + line_start: 4 + line_stop: 4 + col_start: 35 + col_stop: 36 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 4 + line_stop: 4 + col_start: 36 + col_stop: 37 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 87 + span: + line_start: 4 + line_stop: 4 + col_start: 37 + col_stop: 38 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 4 + line_stop: 4 + col_start: 38 + col_stop: 39 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 114 + span: + line_start: 4 + line_stop: 4 + col_start: 39 + col_stop: 40 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 41 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 4 + line_stop: 4 + col_start: 41 + col_stop: 42 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 4 + line_stop: 4 + col_start: 42 + col_stop: 43 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + span: + line_start: 4 + line_stop: 4 + col_start: 29 + col_stop: 44 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 44 + path: compiler-test + content: " let hello: [char; 13] = \"Hello, World!\";" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"part1\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let part1 = \\\\\\\"Good\\\\\\\";\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " let part1 = \"Good\";" + type_: + Array: + - Char + - - value: "4" + value: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 71 + span: + line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " let part1 = \"Good\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 5 + line_stop: 5 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " let part1 = \"Good\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 5 + line_stop: 5 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " let part1 = \"Good\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 5 + line_stop: 5 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " let part1 = \"Good\";" + span: + line_start: 5 + line_stop: 5 + col_start: 17 + col_stop: 23 + path: compiler-test + content: " let part1 = \"Good\";" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " let part1 = \"Good\";" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"part2\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let part2 = \\\\\\\" dog!\\\\\\\";\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 14 + path: compiler-test + content: " let part2 = \" dog!\";" + type_: + Array: + - Char + - - value: "5" + value: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 19 + path: compiler-test + content: " let part2 = \" dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 6 + line_stop: 6 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " let part2 = \" dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 6 + line_stop: 6 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " let part2 = \" dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 103 + span: + line_start: 6 + line_stop: 6 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " let part2 = \" dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 6 + line_stop: 6 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " let part2 = \" dog!\";" + span: + line_start: 6 + line_stop: 6 + col_start: 17 + col_stop: 24 + path: compiler-test + content: " let part2 = \" dog!\";" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 24 + path: compiler-test + content: " let part2 = \" dog!\";" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"concat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 15 + path: compiler-test + content: " let concat: [char; 9] = [...part1, ...part2];" + type_: + Array: + - Char + - - value: "9" + value: + ArrayInline: + elements: + - Spread: + Identifier: "{\"name\":\"part1\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":33,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" + - Spread: + Identifier: "{\"name\":\"part2\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":43,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" + span: + line_start: 7 + line_stop: 7 + col_start: 29 + col_stop: 49 + path: compiler-test + content: " let concat: [char; 9] = [...part1, ...part2];" + span: + line_start: 7 + line_stop: 7 + col_start: 5 + col_stop: 49 + path: compiler-test + content: " let concat: [char; 9] = [...part1, ...part2];" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = false;\\\"}\"}" + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let x = false;" + type_: Boolean + value: + Value: + Boolean: + - "false" + - line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 18 + path: compiler-test + content: " let x = false;" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " let x = false;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x = \\\\\\\"test1\\\\\\\" == \\\\\\\"test2\\\\\\\";\\\"}\"}" + accesses: [] + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 6 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + value: + Binary: + left: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 116 + span: + line_start: 9 + line_stop: 9 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 9 + line_stop: 9 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 115 + span: + line_start: 9 + line_stop: 9 + col_start: 12 + col_stop: 13 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 116 + span: + line_start: 9 + line_stop: 9 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 49 + span: + line_start: 9 + line_stop: 9 + col_start: 14 + col_stop: 15 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 16 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + right: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 116 + span: + line_start: 9 + line_stop: 9 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 9 + line_stop: 9 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 115 + span: + line_start: 9 + line_stop: 9 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 116 + span: + line_start: 9 + line_stop: 9 + col_start: 24 + col_stop: 25 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Expression: + Value: + Char: + character: + Scalar: 50 + span: + line_start: 9 + line_stop: 9 + col_start: 25 + col_stop: 26 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + span: + line_start: 9 + line_stop: 9 + col_start: 20 + col_stop: 27 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + op: Eq + span: + line_start: 9 + line_stop: 9 + col_start: 9 + col_stop: 27 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 27 + path: compiler-test + content: " x = \"test1\" == \"test2\";" + - Return: + expression: + Binary: + left: + Binary: + left: + Binary: + left: + Binary: + left: + Identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" + right: + Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":21,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 23 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + Binary: + left: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 110 + span: + line_start: 10 + line_stop: 10 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 10 + line_stop: 10 + col_start: 29 + col_stop: 30 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 112 + span: + line_start: 10 + line_stop: 10 + col_start: 30 + col_stop: 31 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 10 + line_stop: 10 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + span: + line_start: 10 + line_stop: 10 + col_start: 27 + col_stop: 33 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":37,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" + op: Ne + span: + line_start: 10 + line_stop: 10 + col_start: 27 + col_stop: 39 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + op: And + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 39 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + Binary: + left: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 10 + line_stop: 10 + col_start: 44 + col_stop: 45 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 115 + span: + line_start: 10 + line_stop: 10 + col_start: 45 + col_stop: 46 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + span: + line_start: 10 + line_stop: 10 + col_start: 43 + col_stop: 47 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + ArrayRangeAccess: + array: + Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":51,\\\"col_stop\\\":53,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" + left: + Value: + Integer: + - U32 + - "1" + - line_start: 10 + line_stop: 10 + col_start: 54 + col_stop: 55 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + Value: + Integer: + - U32 + - "3" + - line_start: 10 + line_stop: 10 + col_start: 57 + col_stop: 58 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + span: + line_start: 10 + line_stop: 10 + col_start: 51 + col_stop: 59 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 43 + col_stop: 59 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + op: And + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 59 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + right: + Binary: + left: + Identifier: "{\"name\":\"concat\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":63,\\\"col_stop\\\":69,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 71 + span: + line_start: 10 + line_stop: 10 + col_start: 74 + col_stop: 75 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 10 + line_stop: 10 + col_start: 75 + col_stop: 76 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 10 + line_stop: 10 + col_start: 76 + col_stop: 77 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 10 + line_stop: 10 + col_start: 77 + col_stop: 78 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 10 + line_stop: 10 + col_start: 78 + col_stop: 79 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 10 + line_stop: 10 + col_start: 79 + col_stop: 80 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 10 + line_stop: 10 + col_start: 80 + col_stop: 81 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 103 + span: + line_start: 10 + line_stop: 10 + col_start: 81 + col_stop: 82 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 10 + line_stop: 10 + col_start: 82 + col_stop: 83 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + span: + line_start: 10 + line_stop: 10 + col_start: 73 + col_stop: 84 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + op: Eq + span: + line_start: 10 + line_stop: 10 + col_start: 63 + col_stop: 84 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + op: And + span: + line_start: 10 + line_stop: 10 + col_start: 12 + col_stop: 84 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 84 + path: compiler-test + content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" + span: + line_start: 3 + line_stop: 11 + col_start: 54 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 11 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}\n\n\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/string/replace.leo.out b/tests/expectations/compiler/compiler/string/replace.leo.out index d76fb693cc..3c25d2ebae 100644 --- a/tests/expectations/compiler/compiler/string/replace.leo.out +++ b/tests/expectations/compiler/compiler/string/replace.leo.out @@ -22,3 +22,688 @@ outputs: out: 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(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "13" + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 17 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" + - Variable: + identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "4" + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 33 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" + output: Boolean + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":7,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1[..4] = s2;\\\"}\"}" + accesses: + - ArrayRange: + - ~ + - Value: + Implicit: + - "4" + - line_start: 4 + line_stop: 4 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " s1[..4] = s2;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " s1[..4] = s2;" + value: + Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1[..4] = s2;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " s1[..4] = s2;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return s1 != \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" + right: + Value: + String: + - - Scalar: 72 + - Scalar: 101 + - Scalar: 108 + - Scalar: 108 + - Scalar: 111 + - Scalar: 44 + - Scalar: 32 + - Scalar: 87 + - Scalar: 111 + - Scalar: 114 + - Scalar: 108 + - Scalar: 100 + - Scalar: 33 + - line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 33 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + op: Ne + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 33 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 33 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + span: + line_start: 3 + line_stop: 6 + col_start: 54 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> 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(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "13" + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 17 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" + - Variable: + identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "4" + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 33 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" + output: Boolean + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":7,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1[..4] = s2;\\\"}\"}" + accesses: + - ArrayRange: + - ~ + - Value: + Implicit: + - "4" + - line_start: 4 + line_stop: 4 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " s1[..4] = s2;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " s1[..4] = s2;" + value: + Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1[..4] = s2;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " s1[..4] = s2;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return s1 != \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 72 + span: + line_start: 5 + line_stop: 5 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 5 + line_stop: 5 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 5 + line_stop: 5 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 5 + line_stop: 5 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 44 + span: + line_start: 5 + line_stop: 5 + col_start: 24 + col_stop: 25 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 5 + line_stop: 5 + col_start: 25 + col_stop: 26 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 87 + span: + line_start: 5 + line_stop: 5 + col_start: 26 + col_stop: 27 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 5 + line_stop: 5 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 114 + span: + line_start: 5 + line_stop: 5 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 30 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 31 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 5 + line_stop: 5 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + span: + line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 33 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + op: Ne + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 33 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 33 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + span: + line_start: 3 + line_stop: 6 + col_start: 54 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> 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(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "13" + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 17 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" + - Variable: + identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - Char + - - value: "4" + span: + line_start: 3 + line_stop: 3 + col_start: 31 + col_stop: 33 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" + output: Boolean + block: + statements: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":7,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1[..4] = s2;\\\"}\"}" + accesses: + - ArrayRange: + - ~ + - Value: + Integer: + - U32 + - "4" + - line_start: 4 + line_stop: 4 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " s1[..4] = s2;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 12 + path: compiler-test + content: " s1[..4] = s2;" + value: + Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1[..4] = s2;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 17 + path: compiler-test + content: " s1[..4] = s2;" + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return s1 != \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" + right: + ArrayInline: + elements: + - Expression: + Value: + Char: + character: + Scalar: 72 + span: + line_start: 5 + line_stop: 5 + col_start: 19 + col_stop: 20 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 101 + span: + line_start: 5 + line_stop: 5 + col_start: 20 + col_stop: 21 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 5 + line_stop: 5 + col_start: 21 + col_stop: 22 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 5 + line_stop: 5 + col_start: 22 + col_stop: 23 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 5 + line_stop: 5 + col_start: 23 + col_stop: 24 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 44 + span: + line_start: 5 + line_stop: 5 + col_start: 24 + col_stop: 25 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 32 + span: + line_start: 5 + line_stop: 5 + col_start: 25 + col_stop: 26 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 87 + span: + line_start: 5 + line_stop: 5 + col_start: 26 + col_stop: 27 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 111 + span: + line_start: 5 + line_stop: 5 + col_start: 27 + col_stop: 28 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 114 + span: + line_start: 5 + line_stop: 5 + col_start: 28 + col_stop: 29 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 108 + span: + line_start: 5 + line_stop: 5 + col_start: 29 + col_stop: 30 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 100 + span: + line_start: 5 + line_stop: 5 + col_start: 30 + col_stop: 31 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + - Expression: + Value: + Char: + character: + Scalar: 33 + span: + line_start: 5 + line_stop: 5 + col_start: 31 + col_stop: 32 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + span: + line_start: 5 + line_stop: 5 + col_start: 18 + col_stop: 33 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + op: Ne + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 33 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 33 + path: compiler-test + content: " return s1 != \"Hello, World!\";" + span: + line_start: 3 + line_stop: 6 + col_start: 54 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}" + span: + line_start: 3 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}\n" diff --git a/tests/expectations/compiler/compiler/tuples/access.leo.out b/tests/expectations/compiler/compiler/tuples/access.leo.out index 06cacdebe4..b23a2d5c88 100644 --- a/tests/expectations/compiler/compiler/tuples/access.leo.out +++ b/tests/expectations/compiler/compiler/tuples/access.leo.out @@ -19,3 +19,987 @@ outputs: c: 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, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - Boolean + - Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {" + output: + Tuple: + - Boolean + - Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (false, false, true).0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let b = (false, false, true).0;" + type_: ~ + value: + TupleAccess: + tuple: + TupleInit: + elements: + - Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 19 + path: compiler-test + content: " let b = (false, false, true).0;" + - Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 26 + path: compiler-test + content: " let b = (false, false, true).0;" + - Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 28 + col_stop: 32 + path: compiler-test + content: " let b = (false, false, true).0;" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 33 + path: compiler-test + content: " let b = (false, false, true).0;" + index: + value: "0" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 35 + path: compiler-test + content: " let b = (false, false, true).0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 35 + path: compiler-test + content: " let b = (false, false, true).0;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let c = (false, true, false).1;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let c = (false, true, false).1;" + type_: ~ + value: + TupleAccess: + tuple: + TupleInit: + elements: + - Value: + Boolean: + - "false" + - line_start: 5 + line_stop: 5 + col_start: 14 + col_stop: 19 + path: compiler-test + content: " let c = (false, true, false).1;" + - Value: + Boolean: + - "true" + - line_start: 5 + line_stop: 5 + col_start: 21 + col_stop: 25 + path: compiler-test + content: " let c = (false, true, false).1;" + - Value: + Boolean: + - "false" + - line_start: 5 + line_stop: 5 + col_start: 27 + col_stop: 32 + path: compiler-test + content: " let c = (false, true, false).1;" + span: + line_start: 5 + line_stop: 5 + col_start: 13 + col_stop: 33 + path: compiler-test + content: " let c = (false, true, false).1;" + index: + value: "1" + span: + line_start: 5 + line_stop: 5 + col_start: 13 + col_stop: 35 + path: compiler-test + content: " let c = (false, true, false).1;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 35 + path: compiler-test + content: " let c = (false, true, false).1;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = (true, false, false).2;\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let d = (true, false, false).2;" + type_: ~ + value: + TupleAccess: + tuple: + TupleInit: + elements: + - Value: + Boolean: + - "true" + - line_start: 6 + line_stop: 6 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " let d = (true, false, false).2;" + - Value: + Boolean: + - "false" + - line_start: 6 + line_stop: 6 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " let d = (true, false, false).2;" + - Value: + Boolean: + - "false" + - line_start: 6 + line_stop: 6 + col_start: 27 + col_stop: 32 + path: compiler-test + content: " let d = (true, false, false).2;" + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 33 + path: compiler-test + content: " let d = (true, false, false).2;" + index: + value: "2" + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 35 + path: compiler-test + content: " let d = (true, false, false).2;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 35 + path: compiler-test + content: " let d = (true, false, false).2;" + - Return: + expression: + TupleInit: + elements: + - Binary: + left: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" + index: + value: "0" + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 21 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + - Binary: + left: + Binary: + left: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" + index: + value: "1" + span: + line_start: 8 + line_stop: 8 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 23 + col_stop: 31 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + right: + Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 23 + col_stop: 36 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 37 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 37 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + span: + line_start: 3 + line_stop: 9 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" + span: + line_start: 3 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (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(a: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - Boolean + - Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {" + output: + Tuple: + - Boolean + - Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (false, false, true).0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let b = (false, false, true).0;" + type_: ~ + value: + TupleAccess: + tuple: + TupleInit: + elements: + - Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 19 + path: compiler-test + content: " let b = (false, false, true).0;" + - Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 26 + path: compiler-test + content: " let b = (false, false, true).0;" + - Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 28 + col_stop: 32 + path: compiler-test + content: " let b = (false, false, true).0;" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 33 + path: compiler-test + content: " let b = (false, false, true).0;" + index: + value: "0" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 35 + path: compiler-test + content: " let b = (false, false, true).0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 35 + path: compiler-test + content: " let b = (false, false, true).0;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let c = (false, true, false).1;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let c = (false, true, false).1;" + type_: ~ + value: + TupleAccess: + tuple: + TupleInit: + elements: + - Value: + Boolean: + - "false" + - line_start: 5 + line_stop: 5 + col_start: 14 + col_stop: 19 + path: compiler-test + content: " let c = (false, true, false).1;" + - Value: + Boolean: + - "true" + - line_start: 5 + line_stop: 5 + col_start: 21 + col_stop: 25 + path: compiler-test + content: " let c = (false, true, false).1;" + - Value: + Boolean: + - "false" + - line_start: 5 + line_stop: 5 + col_start: 27 + col_stop: 32 + path: compiler-test + content: " let c = (false, true, false).1;" + span: + line_start: 5 + line_stop: 5 + col_start: 13 + col_stop: 33 + path: compiler-test + content: " let c = (false, true, false).1;" + index: + value: "1" + span: + line_start: 5 + line_stop: 5 + col_start: 13 + col_stop: 35 + path: compiler-test + content: " let c = (false, true, false).1;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 35 + path: compiler-test + content: " let c = (false, true, false).1;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = (true, false, false).2;\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let d = (true, false, false).2;" + type_: ~ + value: + TupleAccess: + tuple: + TupleInit: + elements: + - Value: + Boolean: + - "true" + - line_start: 6 + line_stop: 6 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " let d = (true, false, false).2;" + - Value: + Boolean: + - "false" + - line_start: 6 + line_stop: 6 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " let d = (true, false, false).2;" + - Value: + Boolean: + - "false" + - line_start: 6 + line_stop: 6 + col_start: 27 + col_stop: 32 + path: compiler-test + content: " let d = (true, false, false).2;" + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 33 + path: compiler-test + content: " let d = (true, false, false).2;" + index: + value: "2" + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 35 + path: compiler-test + content: " let d = (true, false, false).2;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 35 + path: compiler-test + content: " let d = (true, false, false).2;" + - Return: + expression: + TupleInit: + elements: + - Binary: + left: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" + index: + value: "0" + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 21 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + - Binary: + left: + Binary: + left: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" + index: + value: "1" + span: + line_start: 8 + line_stop: 8 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 23 + col_stop: 31 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + right: + Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 23 + col_stop: 36 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 37 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 37 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + span: + line_start: 3 + line_stop: 9 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" + span: + line_start: 3 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (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(a: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - Boolean + - Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {" + output: + Tuple: + - Boolean + - Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (false, false, true).0;\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let b = (false, false, true).0;" + type_: Boolean + value: + TupleAccess: + tuple: + TupleInit: + elements: + - Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 19 + path: compiler-test + content: " let b = (false, false, true).0;" + - Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 21 + col_stop: 26 + path: compiler-test + content: " let b = (false, false, true).0;" + - Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 28 + col_stop: 32 + path: compiler-test + content: " let b = (false, false, true).0;" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 33 + path: compiler-test + content: " let b = (false, false, true).0;" + index: + value: "0" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 35 + path: compiler-test + content: " let b = (false, false, true).0;" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 35 + path: compiler-test + content: " let b = (false, false, true).0;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let c = (false, true, false).1;\\\"}\"}" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let c = (false, true, false).1;" + type_: Boolean + value: + TupleAccess: + tuple: + TupleInit: + elements: + - Value: + Boolean: + - "false" + - line_start: 5 + line_stop: 5 + col_start: 14 + col_stop: 19 + path: compiler-test + content: " let c = (false, true, false).1;" + - Value: + Boolean: + - "true" + - line_start: 5 + line_stop: 5 + col_start: 21 + col_stop: 25 + path: compiler-test + content: " let c = (false, true, false).1;" + - Value: + Boolean: + - "false" + - line_start: 5 + line_stop: 5 + col_start: 27 + col_stop: 32 + path: compiler-test + content: " let c = (false, true, false).1;" + span: + line_start: 5 + line_stop: 5 + col_start: 13 + col_stop: 33 + path: compiler-test + content: " let c = (false, true, false).1;" + index: + value: "1" + span: + line_start: 5 + line_stop: 5 + col_start: 13 + col_stop: 35 + path: compiler-test + content: " let c = (false, true, false).1;" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 35 + path: compiler-test + content: " let c = (false, true, false).1;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = (true, false, false).2;\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let d = (true, false, false).2;" + type_: Boolean + value: + TupleAccess: + tuple: + TupleInit: + elements: + - Value: + Boolean: + - "true" + - line_start: 6 + line_stop: 6 + col_start: 14 + col_stop: 18 + path: compiler-test + content: " let d = (true, false, false).2;" + - Value: + Boolean: + - "false" + - line_start: 6 + line_stop: 6 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " let d = (true, false, false).2;" + - Value: + Boolean: + - "false" + - line_start: 6 + line_stop: 6 + col_start: 27 + col_stop: 32 + path: compiler-test + content: " let d = (true, false, false).2;" + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 33 + path: compiler-test + content: " let d = (true, false, false).2;" + index: + value: "2" + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 35 + path: compiler-test + content: " let d = (true, false, false).2;" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 35 + path: compiler-test + content: " let d = (true, false, false).2;" + - Return: + expression: + TupleInit: + elements: + - Binary: + left: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" + index: + value: "0" + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + right: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 13 + col_stop: 21 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + - Binary: + left: + Binary: + left: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" + index: + value: "1" + span: + line_start: 8 + line_stop: 8 + col_start: 23 + col_stop: 26 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + right: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 23 + col_stop: 31 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + right: + Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" + op: Eq + span: + line_start: 8 + line_stop: 8 + col_start: 23 + col_stop: 36 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 37 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 37 + path: compiler-test + content: " return (a.0 == b, a.1 == c == d);" + span: + line_start: 3 + line_stop: 9 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" + span: + line_start: 3 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}\n\n\n\n" diff --git a/tests/expectations/compiler/compiler/tuples/basic.leo.out b/tests/expectations/compiler/compiler/tuples/basic.leo.out index 06cacdebe4..0c03149168 100644 --- a/tests/expectations/compiler/compiler/tuples/basic.leo.out +++ b/tests/expectations/compiler/compiler/tuples/basic.leo.out @@ -19,3 +19,414 @@ outputs: c: 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, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - Boolean + - Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {" + output: + Tuple: + - Boolean + - 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 = (true, false);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = (true, false);" + type_: ~ + value: + TupleInit: + elements: + - Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 20 + path: compiler-test + content: " const a = (true, false);" + - Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 22 + col_stop: 27 + path: compiler-test + content: " const a = (true, false);" + span: + line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 28 + path: compiler-test + content: " const a = (true, false);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 28 + path: compiler-test + content: " const a = (true, false);" + - Return: + expression: + TupleInit: + elements: + - TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" + index: + value: "0" + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " return (a.0, a.1);" + - TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" + index: + value: "1" + span: + line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 3 + line_stop: 7 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - Boolean + - Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {" + output: + Tuple: + - Boolean + - 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 = (true, false);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = (true, false);" + type_: ~ + value: + TupleInit: + elements: + - Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 20 + path: compiler-test + content: " const a = (true, false);" + - Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 22 + col_stop: 27 + path: compiler-test + content: " const a = (true, false);" + span: + line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 28 + path: compiler-test + content: " const a = (true, false);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 28 + path: compiler-test + content: " const a = (true, false);" + - Return: + expression: + TupleInit: + elements: + - TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" + index: + value: "0" + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " return (a.0, a.1);" + - TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" + index: + value: "1" + span: + line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 3 + line_stop: 7 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - Boolean + - Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {" + output: + Tuple: + - Boolean + - 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 = (true, false);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 11 + col_stop: 12 + path: compiler-test + content: " const a = (true, false);" + type_: + Tuple: + - Boolean + - Boolean + value: + TupleInit: + elements: + - Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 16 + col_stop: 20 + path: compiler-test + content: " const a = (true, false);" + - Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 22 + col_stop: 27 + path: compiler-test + content: " const a = (true, false);" + span: + line_start: 4 + line_stop: 4 + col_start: 15 + col_stop: 28 + path: compiler-test + content: " const a = (true, false);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 28 + path: compiler-test + content: " const a = (true, false);" + - Return: + expression: + TupleInit: + elements: + - TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" + index: + value: "0" + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " return (a.0, a.1);" + - TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" + index: + value: "1" + span: + line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 3 + line_stop: 7 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/tuples/dependent.leo.out b/tests/expectations/compiler/compiler/tuples/dependent.leo.out index 06cacdebe4..abf2cc590c 100644 --- a/tests/expectations/compiler/compiler/tuples/dependent.leo.out +++ b/tests/expectations/compiler/compiler/tuples/dependent.leo.out @@ -19,3 +19,606 @@ outputs: c: 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, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - Boolean + - Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {" + output: + Tuple: + - Boolean + - Boolean + 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 = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + type_: ~ + value: + TupleInit: + elements: + - Ternary: + condition: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + index: + value: "0" + span: + line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 17 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + if_true: + Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + if_false: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 28 + col_stop: 32 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 32 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + - Ternary: + condition: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + index: + value: "1" + span: + line_start: 4 + line_stop: 4 + col_start: 34 + col_stop: 37 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + if_true: + Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 45 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + if_false: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 48 + col_stop: 52 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 34 + col_stop: 52 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 53 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + - Return: + expression: + TupleInit: + elements: + - TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" + index: + value: "0" + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " return (a.0, a.1);" + - TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" + index: + value: "1" + span: + line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 3 + line_stop: 7 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - Boolean + - Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {" + output: + Tuple: + - Boolean + - Boolean + 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 = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + type_: ~ + value: + TupleInit: + elements: + - Ternary: + condition: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + index: + value: "0" + span: + line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 17 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + if_true: + Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + if_false: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 28 + col_stop: 32 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 32 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + - Ternary: + condition: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + index: + value: "1" + span: + line_start: 4 + line_stop: 4 + col_start: 34 + col_stop: 37 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + if_true: + Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 45 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + if_false: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 48 + col_stop: 52 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 34 + col_stop: 52 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 53 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + - Return: + expression: + TupleInit: + elements: + - TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" + index: + value: "0" + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " return (a.0, a.1);" + - TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" + index: + value: "1" + span: + line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 3 + line_stop: 7 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - Boolean + - Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {" + output: + Tuple: + - Boolean + - Boolean + 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 = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + type_: + Tuple: + - Boolean + - Boolean + value: + TupleInit: + elements: + - Ternary: + condition: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + index: + value: "0" + span: + line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 17 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + if_true: + Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + if_false: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 28 + col_stop: 32 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 14 + col_stop: 32 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + - Ternary: + condition: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + index: + value: "1" + span: + line_start: 4 + line_stop: 4 + col_start: 34 + col_stop: 37 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + if_true: + Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 40 + col_stop: 45 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + if_false: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 48 + col_stop: 52 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 34 + col_stop: 52 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 53 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 53 + path: compiler-test + content: " let a = (a.0 ? false : true, a.1 ? false : true);" + - Return: + expression: + TupleInit: + elements: + - TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" + index: + value: "0" + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " return (a.0, a.1);" + - TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" + index: + value: "1" + span: + line_start: 6 + line_stop: 6 + col_start: 18 + col_stop: 21 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 22 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 22 + path: compiler-test + content: " return (a.0, a.1);" + span: + line_start: 3 + line_stop: 7 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/tuples/destructured.leo.out b/tests/expectations/compiler/compiler/tuples/destructured.leo.out index c7a4802ab8..ff700ea12f 100644 --- a/tests/expectations/compiler/compiler/tuples/destructured.leo.out +++ b/tests/expectations/compiler/compiler/tuples/destructured.leo.out @@ -19,3 +19,567 @@ outputs: c: 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)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - Boolean + - Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {" + output: + Tuple: + - Boolean + - Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + type_: ~ + value: + TupleInit: + elements: + - Ternary: + condition: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + index: + value: "0" + span: + line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + if_true: + Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 25 + col_stop: 30 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + if_false: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 33 + col_stop: 37 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 37 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + - Ternary: + condition: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":39,\\\"col_stop\\\":40,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + index: + value: "1" + span: + line_start: 4 + line_stop: 4 + col_start: 39 + col_stop: 42 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + if_true: + Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 45 + col_stop: 50 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + if_false: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 53 + col_stop: 57 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 39 + col_stop: 57 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 58 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 58 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + - Return: + expression: + TupleInit: + elements: + - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b, a);\\\"}\"}" + - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b, a);\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return (b, a);" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return (b, a);" + span: + line_start: 3 + line_stop: 7 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - Boolean + - Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {" + output: + Tuple: + - Boolean + - Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + type_: ~ + value: + TupleInit: + elements: + - Ternary: + condition: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + index: + value: "0" + span: + line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + if_true: + Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 25 + col_stop: 30 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + if_false: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 33 + col_stop: 37 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 37 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + - Ternary: + condition: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":39,\\\"col_stop\\\":40,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + index: + value: "1" + span: + line_start: 4 + line_stop: 4 + col_start: 39 + col_stop: 42 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + if_true: + Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 45 + col_stop: 50 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + if_false: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 53 + col_stop: 57 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 39 + col_stop: 57 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 58 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 58 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + - Return: + expression: + TupleInit: + elements: + - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b, a);\\\"}\"}" + - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b, a);\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return (b, a);" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return (b, a);" + span: + line_start: 3 + line_stop: 7 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - Boolean + - Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {" + output: + Tuple: + - Boolean + - Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 10 + col_stop: 11 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 14 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + type_: + Tuple: + - Boolean + - Boolean + value: + TupleInit: + elements: + - Ternary: + condition: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + index: + value: "0" + span: + line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 22 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + if_true: + Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 25 + col_stop: 30 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + if_false: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 33 + col_stop: 37 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 19 + col_stop: 37 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + - Ternary: + condition: + TupleAccess: + tuple: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":39,\\\"col_stop\\\":40,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" + index: + value: "1" + span: + line_start: 4 + line_stop: 4 + col_start: 39 + col_stop: 42 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + if_true: + Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 45 + col_stop: 50 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + if_false: + Value: + Boolean: + - "true" + - line_start: 4 + line_stop: 4 + col_start: 53 + col_stop: 57 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 39 + col_stop: 57 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 18 + col_stop: 58 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 58 + path: compiler-test + content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" + - Return: + expression: + TupleInit: + elements: + - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b, a);\\\"}\"}" + - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b, a);\\\"}\"}" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 18 + path: compiler-test + content: " return (b, a);" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 18 + path: compiler-test + content: " return (b, a);" + span: + line_start: 3 + line_stop: 7 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}\n\n" diff --git a/tests/expectations/compiler/compiler/tuples/nested_access.leo.out b/tests/expectations/compiler/compiler/tuples/nested_access.leo.out index 045f791989..ff52ddfdd0 100644 --- a/tests/expectations/compiler/compiler/tuples/nested_access.leo.out +++ b/tests/expectations/compiler/compiler/tuples/nested_access.leo.out @@ -19,3 +19,596 @@ outputs: c: 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, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - Boolean + - Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {" + output: + Tuple: + - Boolean + - Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (a, false);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let b = (a, false);" + type_: ~ + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (a, false);\\\"}\"}" + - Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 22 + path: compiler-test + content: " let b = (a, false);" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 23 + path: compiler-test + content: " let b = (a, false);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " let b = (a, false);" + - Return: + expression: + TupleInit: + elements: + - Binary: + left: + TupleAccess: + tuple: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" + index: + value: "1" + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + right: + TupleAccess: + tuple: + TupleAccess: + tuple: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" + index: + value: "0" + span: + line_start: 6 + line_stop: 6 + col_start: 20 + col_stop: 23 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + index: + value: "0" + span: + line_start: 6 + line_stop: 6 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + op: Or + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 25 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + - Binary: + left: + TupleAccess: + tuple: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" + index: + value: "1" + span: + line_start: 6 + line_stop: 6 + col_start: 27 + col_stop: 30 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + right: + TupleAccess: + tuple: + TupleAccess: + tuple: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" + index: + value: "0" + span: + line_start: 6 + line_stop: 6 + col_start: 34 + col_stop: 37 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + index: + value: "1" + span: + line_start: 6 + line_stop: 6 + col_start: 34 + col_stop: 39 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + op: And + span: + line_start: 6 + line_stop: 6 + col_start: 27 + col_stop: 39 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 40 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 40 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + span: + line_start: 3 + line_stop: 7 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - Boolean + - Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {" + output: + Tuple: + - Boolean + - Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (a, false);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let b = (a, false);" + type_: ~ + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (a, false);\\\"}\"}" + - Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 22 + path: compiler-test + content: " let b = (a, false);" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 23 + path: compiler-test + content: " let b = (a, false);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " let b = (a, false);" + - Return: + expression: + TupleInit: + elements: + - Binary: + left: + TupleAccess: + tuple: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" + index: + value: "1" + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + right: + TupleAccess: + tuple: + TupleAccess: + tuple: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" + index: + value: "0" + span: + line_start: 6 + line_stop: 6 + col_start: 20 + col_stop: 23 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + index: + value: "0" + span: + line_start: 6 + line_stop: 6 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + op: Or + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 25 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + - Binary: + left: + TupleAccess: + tuple: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" + index: + value: "1" + span: + line_start: 6 + line_stop: 6 + col_start: 27 + col_stop: 30 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + right: + TupleAccess: + tuple: + TupleAccess: + tuple: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" + index: + value: "0" + span: + line_start: 6 + line_stop: 6 + col_start: 34 + col_stop: 37 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + index: + value: "1" + span: + line_start: 6 + line_stop: 6 + col_start: 34 + col_stop: 39 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + op: And + span: + line_start: 6 + line_stop: 6 + col_start: 27 + col_stop: 39 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 40 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 40 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + span: + line_start: 3 + line_stop: 7 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - Boolean + - Boolean + span: + line_start: 3 + line_stop: 3 + col_start: 15 + col_stop: 16 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {" + output: + Tuple: + - Boolean + - Boolean + block: + statements: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (a, false);\\\"}\"}" + span: + line_start: 4 + line_stop: 4 + col_start: 9 + col_stop: 10 + path: compiler-test + content: " let b = (a, false);" + type_: + Tuple: + - Tuple: + - Boolean + - Boolean + - Boolean + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (a, false);\\\"}\"}" + - Value: + Boolean: + - "false" + - line_start: 4 + line_stop: 4 + col_start: 17 + col_stop: 22 + path: compiler-test + content: " let b = (a, false);" + span: + line_start: 4 + line_stop: 4 + col_start: 13 + col_stop: 23 + path: compiler-test + content: " let b = (a, false);" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 23 + path: compiler-test + content: " let b = (a, false);" + - Return: + expression: + TupleInit: + elements: + - Binary: + left: + TupleAccess: + tuple: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" + index: + value: "1" + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 16 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + right: + TupleAccess: + tuple: + TupleAccess: + tuple: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" + index: + value: "0" + span: + line_start: 6 + line_stop: 6 + col_start: 20 + col_stop: 23 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + index: + value: "0" + span: + line_start: 6 + line_stop: 6 + col_start: 20 + col_stop: 25 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + op: Or + span: + line_start: 6 + line_stop: 6 + col_start: 13 + col_stop: 25 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + - Binary: + left: + TupleAccess: + tuple: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" + index: + value: "1" + span: + line_start: 6 + line_stop: 6 + col_start: 27 + col_stop: 30 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + right: + TupleAccess: + tuple: + TupleAccess: + tuple: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" + index: + value: "0" + span: + line_start: 6 + line_stop: 6 + col_start: 34 + col_stop: 37 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + index: + value: "1" + span: + line_start: 6 + line_stop: 6 + col_start: 34 + col_stop: 39 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + op: And + span: + line_start: 6 + line_stop: 6 + col_start: 27 + col_stop: 39 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 40 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + span: + line_start: 6 + line_stop: 6 + col_start: 5 + col_stop: 40 + path: compiler-test + content: " return (b.1 || b.0.0, b.1 && b.0.1);" + span: + line_start: 3 + line_stop: 7 + col_start: 48 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" + span: + line_start: 3 + line_stop: 7 + col_start: 1 + col_stop: 2 + path: compiler-test + content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}\n\n" From baca9ca4a5c40ca986967aa6e6be3521babd916c Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Wed, 14 Jul 2021 02:58:10 -0700 Subject: [PATCH 2/8] Hash the ast in the .out file --- compiler/tests/test.rs | 50 +- .../compiler/compiler/address/equal.leo.out | 279 +- .../compiler/compiler/address/ternary.leo.out | 480 +- .../compiler/array/complex_access.leo.out | 4823 +---------------- .../compiler/array/equal_initializer.leo.out | 286 +- .../array/equal_initializer_2.leo.out | 505 +- .../compiler/array/input_nested_3x2.leo.out | 296 +- .../compiler/array/input_tuple_3x2.leo.out | 286 +- .../compiler/array/multi_initializer.leo.out | 627 +-- .../compiler/compiler/array/nested.leo.out | 522 +- .../compiler/array/nested_3x2_value.leo.out | 779 +-- .../compiler/compiler/array/registers.leo.out | 540 +- .../compiler/compiler/array/slice.leo.out | 416 +- .../compiler/array/slice_lower.leo.out | 894 +-- .../compiler/compiler/array/spread.leo.out | 693 +-- .../compiler/array/ternary_in_array.leo.out | 668 +-- .../compiler/array/tuple_3x2_value.leo.out | 769 +-- .../compiler/array/type_input_3x2.leo.out | 587 +- .../compiler/array/type_input_4x3x2.leo.out | 1579 +----- .../type_nested_value_nested_3x2.leo.out | 831 +-- .../type_nested_value_nested_4x3x2.leo.out | 1805 +----- .../array/type_nested_value_tuple_3x2.leo.out | 770 +-- .../type_nested_value_tuple_4x3x2.leo.out | 1785 +----- .../array/type_tuple_value_nested_3x2.leo.out | 779 +-- .../type_tuple_value_nested_4x3x2.leo.out | 1803 +----- .../array/type_tuple_value_tuple_3x2.leo.out | 769 +-- .../type_tuple_value_tuple_4x3x2.leo.out | 1783 +----- .../compiler/compiler/boolean/and.leo.out | 225 +- .../compiler/boolean/conditional.leo.out | 252 +- .../compiler/compiler/boolean/equal.leo.out | 225 +- .../compiler/boolean/not_equal.leo.out | 225 +- .../compiler/compiler/boolean/or.leo.out | 225 +- .../compiler/compiler/char/circuit.leo.out | 532 +- .../compiler/compiler/char/neq.leo.out | 318 +- .../compiler/char/nonprinting.leo.out | 1773 +----- .../compiler/compiler/char/out.leo.out | 354 +- .../circuits/const_self_variable.leo.out | 674 +-- ...ne_circuit_inside_circuit_function.leo.out | 617 +-- .../circuits/duplicate_name_context.leo.out | 810 +-- .../compiler/compiler/circuits/inline.leo.out | 310 +- .../circuits/inline_member_pass.leo.out | 739 +-- .../compiler/circuits/member_function.leo.out | 613 +-- .../circuits/member_function_nested.leo.out | 933 +--- .../circuits/member_static_function.leo.out | 553 +- .../member_static_function_nested.leo.out | 687 +-- .../compiler/circuits/member_variable.leo.out | 430 +- .../member_variable_and_function.leo.out | 714 +-- .../circuits/mut_self_variable.leo.out | 843 +-- .../circuits/mut_self_variable_branch.leo.out | 1287 +---- .../mut_self_variable_conditional.leo.out | 696 +-- .../compiler/circuits/mut_variable.leo.out | 640 +-- .../mutable_call_immutable_context.leo.out | 1385 +---- .../compiler/circuits/pedersen_mock.leo.out | 1484 +---- .../compiler/circuits/self_member.leo.out | 656 +-- .../compiler/compiler/console/assert.leo.out | 306 +- .../console/conditional_assert.leo.out | 398 +- .../compiler/compiler/console/debug.leo.out | 273 +- .../compiler/compiler/console/error.leo.out | 273 +- .../compiler/compiler/console/log.leo.out | 273 +- .../compiler/console/log_conditional.leo.out | 402 +- .../compiler/console/log_input.leo.out | 279 +- .../compiler/console/log_parameter.leo.out | 306 +- .../console/log_parameter_many.leo.out | 339 +- .../compiler/definition/out_of_order.leo.out | 314 +- .../out_of_order_with_import.leo.out | 458 +- .../compiler/compiler/field/add.leo.out | 297 +- .../compiler/compiler/field/div.leo.out | 297 +- .../compiler/compiler/field/eq.leo.out | 225 +- .../compiler/compiler/field/field.leo.out | 369 +- .../compiler/compiler/field/mul.leo.out | 297 +- .../compiler/compiler/field/negate.leo.out | 285 +- .../compiler/function/array_input.leo.out | 519 +- .../function/array_params_direct_call.leo.out | 738 +-- .../function/conditional_return.leo.out | 393 +- .../duplicate_definition_fail.leo.out | 2 +- .../compiler/compiler/function/empty.leo.out | 338 +- .../compiler/function/iteration.leo.out | 702 +-- .../function/iteration_repeated.leo.out | 831 +-- .../function/multiple_returns.leo.out | 711 +-- .../function/multiple_returns_main.leo.out | 276 +- .../compiler/function/newlines.leo.out | 234 +- .../compiler/function/repeated.leo.out | 528 +- .../compiler/compiler/function/return.leo.out | 405 +- .../function/return_array_nested_pass.leo.out | 807 +-- .../function/return_array_tuple_pass.leo.out | 805 +-- .../compiler/function/return_tuple.leo.out | 752 +-- .../function/return_tuple_conditional.leo.out | 835 +-- .../compiler/function/value_unchanged.leo.out | 601 +- .../global_consts/global_const_types.leo.out | 4551 +--------------- .../input_files/program_input/main.leo.out | 213 +- .../program_input/main_array.leo.out | 281 +- .../program_input/main_char.leo.out | 351 +- .../program_input/main_field.leo.out | 357 +- .../program_input/main_group.leo.out | 395 +- .../main_multi_dimension_array.leo.out | 1299 +---- .../program_input/main_multiple.leo.out | 225 +- .../program_input/main_string.leo.out | 478 +- .../program_input/main_tuple.leo.out | 518 +- .../basic.leo.out | 249 +- .../token_withdraw.leo.out | 894 +-- .../program_input_constants/main.leo.out | 285 +- .../main_array.leo.out | 419 +- .../program_input_constants/main_char.leo.out | 351 +- .../main_field.leo.out | 357 +- .../main_group.leo.out | 519 +- .../main_multi_dimension_array.leo.out | 1031 +--- .../main_multiple.leo.out | 297 +- .../main_string.leo.out | 478 +- .../main_tuple.leo.out | 554 +- .../program_registers/registers_array.leo.out | 183 +- .../program_registers/registers_pass.leo.out | 222 +- .../program_state/access_all.leo.out | 522 +- .../program_state/access_state.leo.out | 273 +- .../input_files/program_state/basic.leo.out | 213 +- .../compiler/integers/i128/add.leo.out | 306 +- .../integers/i128/console_assert.leo.out | 236 +- .../compiler/integers/i128/div.leo.out | 306 +- .../compiler/integers/i128/eq.leo.out | 303 +- .../compiler/integers/i128/ge.leo.out | 303 +- .../compiler/integers/i128/gt.leo.out | 303 +- .../compiler/integers/i128/le.leo.out | 303 +- .../compiler/integers/i128/lt.leo.out | 303 +- .../compiler/integers/i128/max.leo.out | 307 +- .../compiler/integers/i128/min.leo.out | 307 +- .../compiler/integers/i128/mul.leo.out | 306 +- .../compiler/integers/i128/ne.leo.out | 303 +- .../compiler/integers/i128/negate.leo.out | 261 +- .../compiler/integers/i128/negate_min.leo.out | 446 +- .../integers/i128/negate_zero.leo.out | 376 +- .../compiler/integers/i128/sub.leo.out | 306 +- .../compiler/integers/i128/ternary.leo.out | 412 +- .../compiler/integers/i16/add.leo.out | 306 +- .../integers/i16/console_assert.leo.out | 236 +- .../compiler/integers/i16/div.leo.out | 306 +- .../compiler/compiler/integers/i16/eq.leo.out | 303 +- .../compiler/compiler/integers/i16/ge.leo.out | 303 +- .../compiler/compiler/integers/i16/gt.leo.out | 303 +- .../compiler/compiler/integers/i16/le.leo.out | 303 +- .../compiler/compiler/integers/i16/lt.leo.out | 303 +- .../compiler/integers/i16/max.leo.out | 307 +- .../compiler/integers/i16/min.leo.out | 307 +- .../compiler/integers/i16/mul.leo.out | 306 +- .../compiler/compiler/integers/i16/ne.leo.out | 303 +- .../compiler/integers/i16/negate.leo.out | 261 +- .../compiler/integers/i16/negate_min.leo.out | 446 +- .../compiler/integers/i16/negate_zero.leo.out | 376 +- .../compiler/integers/i16/sub.leo.out | 306 +- .../compiler/integers/i16/ternary.leo.out | 412 +- .../compiler/integers/i32/add.leo.out | 306 +- .../integers/i32/console_assert.leo.out | 236 +- .../compiler/integers/i32/div.leo.out | 306 +- .../compiler/compiler/integers/i32/eq.leo.out | 303 +- .../compiler/compiler/integers/i32/ge.leo.out | 303 +- .../compiler/compiler/integers/i32/gt.leo.out | 303 +- .../compiler/compiler/integers/i32/le.leo.out | 303 +- .../compiler/compiler/integers/i32/lt.leo.out | 303 +- .../compiler/integers/i32/max.leo.out | 307 +- .../compiler/integers/i32/min.leo.out | 307 +- .../compiler/integers/i32/mul.leo.out | 306 +- .../compiler/compiler/integers/i32/ne.leo.out | 303 +- .../compiler/integers/i32/negate.leo.out | 261 +- .../compiler/integers/i32/negate_min.leo.out | 446 +- .../compiler/integers/i32/negate_zero.leo.out | 376 +- .../compiler/integers/i32/sub.leo.out | 306 +- .../compiler/integers/i32/ternary.leo.out | 412 +- .../compiler/integers/i64/add.leo.out | 306 +- .../integers/i64/console_assert.leo.out | 236 +- .../compiler/integers/i64/div.leo.out | 306 +- .../compiler/compiler/integers/i64/eq.leo.out | 303 +- .../compiler/compiler/integers/i64/ge.leo.out | 303 +- .../compiler/compiler/integers/i64/gt.leo.out | 303 +- .../compiler/compiler/integers/i64/le.leo.out | 303 +- .../compiler/compiler/integers/i64/lt.leo.out | 303 +- .../compiler/integers/i64/max.leo.out | 307 +- .../compiler/integers/i64/min.leo.out | 307 +- .../compiler/integers/i64/mul.leo.out | 306 +- .../compiler/compiler/integers/i64/ne.leo.out | 303 +- .../compiler/integers/i64/negate.leo.out | 261 +- .../compiler/integers/i64/negate_min.leo.out | 446 +- .../compiler/integers/i64/negate_zero.leo.out | 376 +- .../compiler/integers/i64/sub.leo.out | 306 +- .../compiler/integers/i64/ternary.leo.out | 412 +- .../compiler/compiler/integers/i8/add.leo.out | 306 +- .../integers/i8/console_assert.leo.out | 236 +- .../compiler/compiler/integers/i8/div.leo.out | 306 +- .../compiler/compiler/integers/i8/eq.leo.out | 303 +- .../compiler/compiler/integers/i8/ge.leo.out | 303 +- .../compiler/compiler/integers/i8/gt.leo.out | 303 +- .../compiler/compiler/integers/i8/le.leo.out | 303 +- .../compiler/compiler/integers/i8/lt.leo.out | 303 +- .../compiler/compiler/integers/i8/max.leo.out | 307 +- .../compiler/compiler/integers/i8/min.leo.out | 307 +- .../compiler/compiler/integers/i8/mul.leo.out | 306 +- .../compiler/compiler/integers/i8/ne.leo.out | 303 +- .../compiler/integers/i8/negate.leo.out | 261 +- .../compiler/integers/i8/negate_zero.leo.out | 376 +- .../compiler/compiler/integers/i8/sub.leo.out | 306 +- .../compiler/integers/i8/ternary.leo.out | 412 +- .../compiler/integers/u128/add.leo.out | 306 +- .../integers/u128/console_assert.leo.out | 300 +- .../compiler/integers/u128/div.leo.out | 306 +- .../compiler/integers/u128/eq.leo.out | 303 +- .../compiler/integers/u128/ge.leo.out | 303 +- .../compiler/integers/u128/gt.leo.out | 308 +- .../compiler/integers/u128/input.leo.out | 231 +- .../compiler/integers/u128/le.leo.out | 303 +- .../compiler/integers/u128/lt.leo.out | 303 +- .../compiler/integers/u128/max.leo.out | 307 +- .../compiler/integers/u128/min.leo.out | 307 +- .../compiler/integers/u128/mul.leo.out | 306 +- .../compiler/integers/u128/ne.leo.out | 303 +- .../compiler/integers/u128/sub.leo.out | 306 +- .../compiler/integers/u128/ternary.leo.out | 412 +- .../compiler/integers/u16/add.leo.out | 306 +- .../integers/u16/console_assert.leo.out | 300 +- .../compiler/integers/u16/div.leo.out | 306 +- .../compiler/compiler/integers/u16/eq.leo.out | 303 +- .../compiler/compiler/integers/u16/ge.leo.out | 303 +- .../compiler/compiler/integers/u16/gt.leo.out | 308 +- .../compiler/integers/u16/input.leo.out | 231 +- .../compiler/compiler/integers/u16/le.leo.out | 303 +- .../compiler/compiler/integers/u16/lt.leo.out | 303 +- .../compiler/integers/u16/max.leo.out | 307 +- .../compiler/integers/u16/min.leo.out | 307 +- .../compiler/integers/u16/mul.leo.out | 306 +- .../compiler/compiler/integers/u16/ne.leo.out | 303 +- .../compiler/integers/u16/sub.leo.out | 306 +- .../compiler/integers/u16/ternary.leo.out | 412 +- .../compiler/integers/u32/add.leo.out | 306 +- .../integers/u32/console_assert.leo.out | 300 +- .../compiler/integers/u32/div.leo.out | 306 +- .../compiler/compiler/integers/u32/eq.leo.out | 303 +- .../compiler/compiler/integers/u32/ge.leo.out | 303 +- .../compiler/compiler/integers/u32/gt.leo.out | 308 +- .../compiler/integers/u32/input.leo.out | 231 +- .../compiler/compiler/integers/u32/le.leo.out | 303 +- .../compiler/compiler/integers/u32/lt.leo.out | 303 +- .../compiler/integers/u32/max.leo.out | 307 +- .../compiler/integers/u32/min.leo.out | 307 +- .../compiler/integers/u32/mul.leo.out | 306 +- .../compiler/compiler/integers/u32/ne.leo.out | 303 +- .../compiler/integers/u32/sub.leo.out | 306 +- .../compiler/integers/u32/ternary.leo.out | 412 +- .../compiler/integers/u64/add.leo.out | 306 +- .../integers/u64/console_assert.leo.out | 300 +- .../compiler/integers/u64/div.leo.out | 306 +- .../compiler/compiler/integers/u64/eq.leo.out | 303 +- .../compiler/compiler/integers/u64/ge.leo.out | 303 +- .../compiler/compiler/integers/u64/gt.leo.out | 308 +- .../compiler/integers/u64/input.leo.out | 231 +- .../compiler/compiler/integers/u64/le.leo.out | 303 +- .../compiler/compiler/integers/u64/lt.leo.out | 303 +- .../compiler/integers/u64/max.leo.out | 307 +- .../compiler/integers/u64/min.leo.out | 307 +- .../compiler/integers/u64/mul.leo.out | 306 +- .../compiler/compiler/integers/u64/ne.leo.out | 303 +- .../compiler/integers/u64/sub.leo.out | 306 +- .../compiler/integers/u64/ternary.leo.out | 412 +- .../compiler/compiler/integers/u8/add.leo.out | 306 +- .../integers/u8/console_assert.leo.out | 300 +- .../compiler/compiler/integers/u8/div.leo.out | 306 +- .../compiler/compiler/integers/u8/eq.leo.out | 303 +- .../compiler/compiler/integers/u8/ge.leo.out | 303 +- .../compiler/compiler/integers/u8/gt.leo.out | 308 +- .../compiler/integers/u8/input.leo.out | 231 +- .../compiler/compiler/integers/u8/le.leo.out | 303 +- .../compiler/compiler/integers/u8/lt.leo.out | 303 +- .../compiler/compiler/integers/u8/max.leo.out | 307 +- .../compiler/compiler/integers/u8/min.leo.out | 307 +- .../compiler/compiler/integers/u8/mul.leo.out | 306 +- .../compiler/compiler/integers/u8/ne.leo.out | 303 +- .../compiler/compiler/integers/u8/sub.leo.out | 306 +- .../compiler/integers/u8/ternary.leo.out | 412 +- .../compiler/mutability/array_dyn_mut.leo.out | 701 +-- .../mutability/array_dyn_mut_indirect.leo.out | 772 +-- .../compiler/mutability/array_mut.leo.out | 555 +- .../mutability/array_splice_mut.leo.out | 1092 +--- .../mutability/array_tuple_mut.leo.out | 929 +--- .../mutability/circuit_function_mut.leo.out | 677 +-- .../mutability/circuit_variable_mut.leo.out | 519 +- .../compiler/mutability/cond_mut.leo.out | 634 +-- .../mutability/function_input_mut.leo.out | 300 +- .../compiler/mutability/let_mut.leo.out | 434 +- .../mutability/let_mut_nested.leo.out | 541 +- .../compiler/compiler/mutability/swap.leo.out | 1317 +---- .../compiler/statements/block.leo.out | 425 +- .../compiler/statements/chain.leo.out | 819 +-- .../compiler/statements/for_loop.leo.out | 829 +-- .../statements/iteration_basic.leo.out | 512 +- .../statements/iteration_variable.leo.out | 581 +- .../statements/multiple_returns.leo.out | 382 +- .../compiler/statements/mutate.leo.out | 874 +-- .../compiler/statements/nested_mutate.leo.out | 822 +-- .../compiler/compiler/string/circuit.leo.out | 1786 +----- .../compiler/compiler/string/equality.leo.out | 2420 +-------- .../compiler/compiler/string/replace.leo.out | 688 +-- .../compiler/compiler/tuples/access.leo.out | 987 +--- .../compiler/compiler/tuples/basic.leo.out | 414 +- .../compiler/tuples/dependent.leo.out | 606 +-- .../compiler/tuples/destructured.leo.out | 567 +- .../compiler/tuples/nested_access.leo.out | 596 +- 301 files changed, 932 insertions(+), 144343 deletions(-) diff --git a/compiler/tests/test.rs b/compiler/tests/test.rs index 08bfbb5e34..79768cdcbb 100644 --- a/compiler/tests/test.rs +++ b/compiler/tests/test.rs @@ -34,6 +34,8 @@ use leo_compiler::{ TheoremOptions, }; +use sha2::Sha256; + pub type EdwardsTestCompiler = Compiler<'static, Fq, EdwardsGroupType>; // pub type EdwardsConstrainedValue = ConstrainedValue<'static, Fq, EdwardsGroupType>; @@ -58,6 +60,13 @@ fn new_compiler(path: PathBuf, theorem_options: Option) -> Edwar ) } +fn hash(input: String) -> String { + let mut hasher = Sha256::new(); + hasher.update(input.as_bytes()); + let output = hasher.finalize(); + hex::encode(&output[..]) +} + pub(crate) fn parse_program( program_string: &str, theorem_options: Option, @@ -81,9 +90,9 @@ struct OutputItem { struct CompileOutput { pub circuit: SummarizedCircuit, pub output: Vec, - pub initial_theorem: Program, - pub canonicalized_theorem: Program, - pub type_inferenced_theorem: Program, + pub initial_theorem: String, + pub canonicalized_theorem: String, + pub type_inferenced_theorem: String, } impl Namespace for CompileNamespace { @@ -205,19 +214,28 @@ impl Namespace for CompileNamespace { }); } - 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 initial_theorem: String = hash( + Ast::from_json_file("/tmp/output/initial_ast.json".into()) + .unwrap_or(Ast::new(Program::new("Error reading initial theorem.".to_string()))) + .to_json_string() + .unwrap_or("Error converting ast to string.".to_string()), + ); + let canonicalized_theorem: String = hash( + Ast::from_json_file("/tmp/output/canonicalization_ast.json".into()) + .unwrap_or(Ast::new(Program::new( + "Error reading canonicalized theorem.".to_string(), + ))) + .to_json_string() + .unwrap_or("Error converting ast to string.".to_string()), + ); + let type_inferenced_theorem = hash( + Ast::from_json_file("/tmp/output/type_inferenced_ast.json".into()) + .unwrap_or(Ast::new(Program::new( + "Error reading type inferenced theorem.".to_string(), + ))) + .to_json_string() + .unwrap_or("Error converting ast to string.".to_string()), + ); let final_output = CompileOutput { circuit: last_circuit.unwrap(), diff --git a/tests/expectations/compiler/compiler/address/equal.leo.out b/tests/expectations/compiler/compiler/address/equal.leo.out index d9877a9e54..48c8b22837 100644 --- a/tests/expectations/compiler/compiler/address/equal.leo.out +++ b/tests/expectations/compiler/compiler/address/equal.leo.out @@ -22,279 +22,6 @@ 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" + initial_theorem: 1b4069c1fe2f0b258116c5864b19dfb2205e3cd8e13ea79d78fcdb0e9c1a8d50 + canonicalized_theorem: 1b4069c1fe2f0b258116c5864b19dfb2205e3cd8e13ea79d78fcdb0e9c1a8d50 + type_inferenced_theorem: d2aefbdd9fd4c931d4ee60f1a435f3da0d827e7425d2fd0a9868de22cc11ed73 diff --git a/tests/expectations/compiler/compiler/address/ternary.leo.out b/tests/expectations/compiler/compiler/address/ternary.leo.out index b686935393..2464f9c103 100644 --- a/tests/expectations/compiler/compiler/address/ternary.leo.out +++ b/tests/expectations/compiler/compiler/address/ternary.leo.out @@ -22,480 +22,6 @@ 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" + initial_theorem: 975c6893ed20b632a3dc9c39f7fe9f381e7dda4b17b6c1f05ff7480e3bf2ee9d + canonicalized_theorem: 975c6893ed20b632a3dc9c39f7fe9f381e7dda4b17b6c1f05ff7480e3bf2ee9d + type_inferenced_theorem: bbc3818f0267a746d6ab324ef9b9de489ca65cd1624f528dae941841f39517af diff --git a/tests/expectations/compiler/compiler/array/complex_access.leo.out b/tests/expectations/compiler/compiler/array/complex_access.leo.out index 4fa16ee727..eac12a0947 100644 --- a/tests/expectations/compiler/compiler/array/complex_access.leo.out +++ b/tests/expectations/compiler/compiler/array/complex_access.leo.out @@ -16,4823 +16,6 @@ outputs: out: type: bool value: "true" - initial_theorem: - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Circ {\\\"}\"}": - circuit_name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Circ {\\\"}\"}" - 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 - global_consts: {} - functions: - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: U8 - - - value: "8" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 17 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 7 - line_stop: 7 - col_start: 28 - col_stop: 29 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":36,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Array: - - IntegerType: U8 - - - value: "3" - - - value: "3" - span: - line_start: 7 - line_stop: 7 - col_start: 36 - col_stop: 37 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" - - Variable: - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":53,\\\"col_stop\\\":54,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Tuple: - - IntegerType: U8 - - IntegerType: U32 - - - value: "1" - span: - line_start: 7 - line_stop: 7 - col_start: 53 - col_stop: 54 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" - - Variable: - identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":72,\\\"col_stop\\\":73,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: U8 - - - value: "3" - - value: "4" - span: - line_start: 7 - line_stop: 7 - col_start: 72 - col_stop: 73 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" - output: Boolean - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..3][b] = 93;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "0" - - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[0..3][b] = 93;" - - Value: - Implicit: - - "3" - - line_start: 8 - line_stop: 8 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[0..3][b] = 93;" - - ArrayIndex: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..3][b] = 93;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 3 - col_stop: 13 - path: compiler-test - content: " a[0..3][b] = 93;" - value: - Value: - Implicit: - - "93" - - line_start: 8 - line_stop: 8 - col_start: 16 - col_stop: 18 - path: compiler-test - content: " a[0..3][b] = 93;" - span: - line_start: 8 - line_stop: 8 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " a[0..3][b] = 93;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] = 87;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "2" - - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[2..6][1] = 87;" - - Value: - Implicit: - - "6" - - line_start: 9 - line_stop: 9 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[2..6][1] = 87;" - - ArrayIndex: - Value: - Implicit: - - "1" - - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[2..6][1] = 87;" - span: - line_start: 9 - line_stop: 9 - col_start: 3 - col_stop: 13 - path: compiler-test - content: " a[2..6][1] = 87;" - value: - Value: - Implicit: - - "87" - - line_start: 9 - line_stop: 9 - col_start: 16 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] = 87;" - span: - line_start: 9 - line_stop: 9 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] = 87;" - - Assign: - operation: Mul - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] *= 2;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "2" - - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[2..6][1] *= 2;" - - Value: - Implicit: - - "6" - - line_start: 10 - line_stop: 10 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[2..6][1] *= 2;" - - ArrayIndex: - Value: - Implicit: - - "1" - - line_start: 10 - line_stop: 10 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[2..6][1] *= 2;" - span: - line_start: 10 - line_stop: 10 - col_start: 3 - col_stop: 13 - path: compiler-test - content: " a[2..6][1] *= 2;" - value: - Value: - Implicit: - - "2" - - line_start: 10 - line_stop: 10 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] *= 2;" - span: - line_start: 10 - line_stop: 10 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] *= 2;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..3] = [42u8];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "2" - - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[2..3] = [42u8];" - - Value: - Implicit: - - "3" - - line_start: 11 - line_stop: 11 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[2..3] = [42u8];" - span: - line_start: 11 - line_stop: 11 - col_start: 3 - col_stop: 10 - path: compiler-test - content: " a[2..3] = [42u8];" - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "42" - - line_start: 11 - line_stop: 11 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " a[2..3] = [42u8];" - span: - line_start: 11 - line_stop: 11 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " a[2..3] = [42u8];" - span: - line_start: 11 - line_stop: 11 - col_start: 3 - col_stop: 19 - path: compiler-test - content: " a[2..3] = [42u8];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[6..][0] = 43u8;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "6" - - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[6..][0] = 43u8;" - - ~ - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 12 - line_stop: 12 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " a[6..][0] = 43u8;" - span: - line_start: 12 - line_stop: 12 - col_start: 3 - col_stop: 12 - path: compiler-test - content: " a[6..][0] = 43u8;" - value: - Value: - Integer: - - U8 - - "43" - - line_start: 12 - line_stop: 12 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " a[6..][0] = 43u8;" - span: - line_start: 12 - line_stop: 12 - col_start: 3 - col_stop: 19 - path: compiler-test - content: " a[6..][0] = 43u8;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..1][0..1] = [200];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "0" - - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[0..1][0..1] = [200];" - - Value: - Implicit: - - "1" - - line_start: 13 - line_stop: 13 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[0..1][0..1] = [200];" - - ArrayRange: - - Value: - Implicit: - - "0" - - line_start: 13 - line_stop: 13 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[0..1][0..1] = [200];" - - Value: - Implicit: - - "1" - - line_start: 13 - line_stop: 13 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " a[0..1][0..1] = [200];" - span: - line_start: 13 - line_stop: 13 - col_start: 3 - col_stop: 16 - path: compiler-test - content: " a[0..1][0..1] = [200];" - value: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "200" - - line_start: 13 - line_stop: 13 - col_start: 20 - col_stop: 23 - path: compiler-test - content: " a[0..1][0..1] = [200];" - span: - line_start: 13 - line_stop: 13 - col_start: 19 - col_stop: 24 - path: compiler-test - content: " a[0..1][0..1] = [200];" - span: - line_start: 13 - line_stop: 13 - col_start: 3 - col_stop: 24 - path: compiler-test - content: " a[0..1][0..1] = [200];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[0..2][0] = [1u8; 3];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "0" - - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - - Value: - Implicit: - - "2" - - line_start: 15 - line_stop: 15 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 15 - line_stop: 15 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - span: - line_start: 15 - line_stop: 15 - col_start: 3 - col_stop: 13 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - value: - ArrayInit: - element: - Value: - Integer: - - U8 - - "1" - - line_start: 15 - line_stop: 15 - col_start: 17 - col_stop: 20 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - dimensions: - - value: "3" - span: - line_start: 15 - line_stop: 15 - col_start: 16 - col_stop: 24 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - span: - line_start: 15 - line_stop: 15 - col_start: 3 - col_stop: 24 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[1..][1][1..2][0] = 126;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "1" - - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - - ~ - - ArrayIndex: - Value: - Implicit: - - "1" - - line_start: 16 - line_stop: 16 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - - ArrayRange: - - Value: - Implicit: - - "1" - - line_start: 16 - line_stop: 16 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - - Value: - Implicit: - - "2" - - line_start: 16 - line_stop: 16 - col_start: 16 - col_stop: 17 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 16 - line_stop: 16 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - span: - line_start: 16 - line_stop: 16 - col_start: 3 - col_stop: 21 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - value: - Value: - Implicit: - - "126" - - line_start: 16 - line_stop: 16 - col_start: 24 - col_stop: 27 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - span: - line_start: 16 - line_stop: 16 - col_start: 3 - col_stop: 27 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[1..][0] = [42, 43, 44];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "1" - - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - - ~ - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 17 - line_stop: 17 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - span: - line_start: 17 - line_stop: 17 - col_start: 3 - col_stop: 12 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - value: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "42" - - line_start: 17 - line_stop: 17 - col_start: 16 - col_stop: 18 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - - Expression: - Value: - Implicit: - - "43" - - line_start: 17 - line_stop: 17 - col_start: 20 - col_stop: 22 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - - Expression: - Value: - Implicit: - - "44" - - line_start: 17 - line_stop: 17 - col_start: 24 - col_stop: 26 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - span: - line_start: 17 - line_stop: 17 - col_start: 15 - col_stop: 27 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - span: - line_start: 17 - line_stop: 17 - col_start: 3 - col_stop: 27 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - - Assign: - operation: Add - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - accesses: - - ArrayRange: - - CircuitMemberAccess: - circuit: - CircuitInit: - name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - members: - - identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - expression: - Value: - Implicit: - - "0" - - line_start: 18 - line_stop: 18 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 16 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - name: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - - Value: - Implicit: - - "1" - - line_start: 18 - line_stop: 18 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 18 - line_stop: 18 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 18 - line_stop: 18 - col_start: 26 - col_stop: 27 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 3 - col_stop: 28 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - value: - Value: - Implicit: - - "2" - - line_start: 18 - line_stop: 18 - col_start: 32 - col_stop: 33 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 3 - col_stop: 33 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d[..1][0].1 = 1;\\\"}\"}" - accesses: - - ArrayRange: - - ~ - - Value: - Implicit: - - "1" - - line_start: 20 - line_stop: 20 - col_start: 7 - col_stop: 8 - path: compiler-test - content: " d[..1][0].1 = 1;" - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 20 - line_stop: 20 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " d[..1][0].1 = 1;" - - Tuple: - - value: "1" - - line_start: 20 - line_stop: 20 - col_start: 3 - col_stop: 14 - path: compiler-test - content: " d[..1][0].1 = 1;" - span: - line_start: 20 - line_stop: 20 - col_start: 3 - col_stop: 14 - path: compiler-test - content: " d[..1][0].1 = 1;" - value: - Value: - Implicit: - - "1" - - line_start: 20 - line_stop: 20 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " d[..1][0].1 = 1;" - span: - line_start: 20 - line_stop: 20 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " d[..1][0].1 = 1;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" e[0..][0] = [22; 4];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "0" - - line_start: 22 - line_stop: 22 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " e[0..][0] = [22; 4];" - - ~ - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 22 - line_stop: 22 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " e[0..][0] = [22; 4];" - span: - line_start: 22 - line_stop: 22 - col_start: 3 - col_stop: 12 - path: compiler-test - content: " e[0..][0] = [22; 4];" - value: - ArrayInit: - element: - Value: - Implicit: - - "22" - - line_start: 22 - line_stop: 22 - col_start: 16 - col_stop: 18 - path: compiler-test - content: " e[0..][0] = [22; 4];" - dimensions: - - value: "4" - span: - line_start: 22 - line_stop: 22 - col_start: 15 - col_stop: 22 - path: compiler-test - content: " e[0..][0] = [22; 4];" - span: - line_start: 22 - line_stop: 22 - col_start: 3 - col_stop: 22 - path: compiler-test - content: " e[0..][0] = [22; 4];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" e[0..][0][0] = 33;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "0" - - line_start: 23 - line_stop: 23 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " e[0..][0][0] = 33;" - - ~ - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 23 - line_stop: 23 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " e[0..][0][0] = 33;" - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 23 - line_stop: 23 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " e[0..][0][0] = 33;" - span: - line_start: 23 - line_stop: 23 - col_start: 3 - col_stop: 15 - path: compiler-test - content: " e[0..][0][0] = 33;" - value: - Value: - Implicit: - - "33" - - line_start: 23 - line_stop: 23 - col_start: 18 - col_stop: 20 - path: compiler-test - content: " e[0..][0][0] = 33;" - span: - line_start: 23 - line_stop: 23 - col_start: 3 - col_stop: 20 - path: compiler-test - content: " e[0..][0][0] = 33;" - - Return: - expression: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a == [200u8, 93, 42, 174, 5, 6, 43, 8]\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "200" - - line_start: 26 - line_stop: 26 - col_start: 11 - col_stop: 16 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Implicit: - - "93" - - line_start: 26 - line_stop: 26 - col_start: 18 - col_stop: 20 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Implicit: - - "42" - - line_start: 26 - line_stop: 26 - col_start: 22 - col_stop: 24 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Implicit: - - "174" - - line_start: 26 - line_stop: 26 - col_start: 26 - col_stop: 29 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Implicit: - - "5" - - line_start: 26 - line_stop: 26 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Implicit: - - "6" - - line_start: 26 - line_stop: 26 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Implicit: - - "43" - - line_start: 26 - line_stop: 26 - col_start: 37 - col_stop: 39 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Implicit: - - "8" - - line_start: 26 - line_stop: 26 - col_start: 41 - col_stop: 42 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - span: - line_start: 26 - line_stop: 26 - col_start: 10 - col_stop: 43 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - op: Eq - span: - line_start: 26 - line_stop: 26 - col_start: 5 - col_stop: 43 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - right: - Binary: - left: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "3" - - line_start: 27 - line_stop: 27 - col_start: 15 - col_stop: 18 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Implicit: - - "1" - - line_start: 27 - line_stop: 27 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Implicit: - - "1" - - line_start: 27 - line_stop: 27 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - span: - line_start: 27 - line_stop: 27 - col_start: 14 - col_stop: 25 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "42" - - line_start: 27 - line_stop: 27 - col_start: 28 - col_stop: 30 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Implicit: - - "43" - - line_start: 27 - line_stop: 27 - col_start: 32 - col_stop: 34 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Implicit: - - "44" - - line_start: 27 - line_stop: 27 - col_start: 36 - col_stop: 38 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - span: - line_start: 27 - line_stop: 27 - col_start: 27 - col_stop: 39 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "7" - - line_start: 27 - line_stop: 27 - col_start: 42 - col_stop: 43 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Implicit: - - "126" - - line_start: 27 - line_stop: 27 - col_start: 45 - col_stop: 48 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Implicit: - - "9" - - line_start: 27 - line_stop: 27 - col_start: 50 - col_stop: 51 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - span: - line_start: 27 - line_stop: 27 - col_start: 41 - col_stop: 52 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - span: - line_start: 27 - line_stop: 27 - col_start: 13 - col_stop: 53 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - op: Eq - span: - line_start: 27 - line_stop: 27 - col_start: 8 - col_stop: 53 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - op: And - span: - line_start: 26 - line_stop: 27 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - right: - Binary: - left: - Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && d == [(0u8, 1u32)]\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - TupleInit: - elements: - - Value: - Integer: - - U8 - - "0" - - line_start: 28 - line_stop: 28 - col_start: 15 - col_stop: 18 - path: compiler-test - content: " && d == [(0u8, 1u32)]" - - Value: - Integer: - - U32 - - "1" - - line_start: 28 - line_stop: 28 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " && d == [(0u8, 1u32)]" - span: - line_start: 28 - line_stop: 28 - col_start: 14 - col_stop: 25 - path: compiler-test - content: " && d == [(0u8, 1u32)]" - span: - line_start: 28 - line_stop: 28 - col_start: 13 - col_stop: 26 - path: compiler-test - content: " && d == [(0u8, 1u32)]" - op: Eq - span: - line_start: 28 - line_stop: 28 - col_start: 8 - col_stop: 26 - path: compiler-test - content: " && d == [(0u8, 1u32)]" - op: And - span: - line_start: 26 - line_stop: 28 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]" - right: - Binary: - left: - Identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "33" - - line_start: 29 - line_stop: 29 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "22" - - line_start: 29 - line_stop: 29 - col_start: 21 - col_stop: 23 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "22" - - line_start: 29 - line_stop: 29 - col_start: 25 - col_stop: 27 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "22" - - line_start: 29 - line_stop: 29 - col_start: 29 - col_stop: 31 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 29 - line_stop: 29 - col_start: 14 - col_stop: 32 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 35 - col_stop: 36 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 38 - col_stop: 39 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 41 - col_stop: 42 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 44 - col_stop: 45 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 29 - line_stop: 29 - col_start: 34 - col_stop: 46 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 49 - col_stop: 50 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 52 - col_stop: 53 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 55 - col_stop: 56 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 58 - col_stop: 59 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 29 - line_stop: 29 - col_start: 48 - col_stop: 60 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 29 - line_stop: 29 - col_start: 13 - col_stop: 61 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - op: Eq - span: - line_start: 29 - line_stop: 29 - col_start: 8 - col_stop: 61 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - op: And - span: - line_start: 26 - line_stop: 29 - col_start: 5 - col_stop: 61 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]\n && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 25 - line_stop: 29 - col_start: 3 - col_stop: 61 - path: compiler-test - content: " return\n a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]\n && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 7 - line_stop: 30 - col_start: 98 - col_stop: 2 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\n...\n}" - span: - line_start: 7 - line_stop: 30 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" - canonicalized_theorem: - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Circ {\\\"}\"}": - circuit_name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Circ {\\\"}\"}" - 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 - global_consts: {} - functions: - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: U8 - - - value: "8" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 17 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 7 - line_stop: 7 - col_start: 28 - col_stop: 29 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":36,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Array: - - IntegerType: U8 - - - value: "3" - - - value: "3" - span: - line_start: 7 - line_stop: 7 - col_start: 36 - col_stop: 37 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" - - Variable: - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":53,\\\"col_stop\\\":54,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Tuple: - - IntegerType: U8 - - IntegerType: U32 - - - value: "1" - span: - line_start: 7 - line_stop: 7 - col_start: 53 - col_stop: 54 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" - - Variable: - identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":72,\\\"col_stop\\\":73,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Array: - - IntegerType: U8 - - - value: "4" - - - value: "3" - span: - line_start: 7 - line_stop: 7 - col_start: 72 - col_stop: 73 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" - output: Boolean - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..3][b] = 93;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "0" - - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[0..3][b] = 93;" - - Value: - Implicit: - - "3" - - line_start: 8 - line_stop: 8 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[0..3][b] = 93;" - - ArrayIndex: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..3][b] = 93;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 3 - col_stop: 13 - path: compiler-test - content: " a[0..3][b] = 93;" - value: - Value: - Implicit: - - "93" - - line_start: 8 - line_stop: 8 - col_start: 16 - col_stop: 18 - path: compiler-test - content: " a[0..3][b] = 93;" - span: - line_start: 8 - line_stop: 8 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " a[0..3][b] = 93;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] = 87;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "2" - - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[2..6][1] = 87;" - - Value: - Implicit: - - "6" - - line_start: 9 - line_stop: 9 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[2..6][1] = 87;" - - ArrayIndex: - Value: - Implicit: - - "1" - - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[2..6][1] = 87;" - span: - line_start: 9 - line_stop: 9 - col_start: 3 - col_stop: 13 - path: compiler-test - content: " a[2..6][1] = 87;" - value: - Value: - Implicit: - - "87" - - line_start: 9 - line_stop: 9 - col_start: 16 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] = 87;" - span: - line_start: 9 - line_stop: 9 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] = 87;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] *= 2;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "2" - - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[2..6][1] *= 2;" - - Value: - Implicit: - - "6" - - line_start: 10 - line_stop: 10 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[2..6][1] *= 2;" - - ArrayIndex: - Value: - Implicit: - - "1" - - line_start: 10 - line_stop: 10 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[2..6][1] *= 2;" - span: - line_start: 10 - line_stop: 10 - col_start: 3 - col_stop: 13 - path: compiler-test - content: " a[2..6][1] *= 2;" - value: - Binary: - left: - ArrayAccess: - array: - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] *= 2;\\\"}\"}" - left: - Value: - Implicit: - - "2" - - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[2..6][1] *= 2;" - right: - Value: - Implicit: - - "6" - - line_start: 10 - line_stop: 10 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[2..6][1] *= 2;" - span: - line_start: 10 - line_stop: 10 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] *= 2;" - index: - Value: - Implicit: - - "1" - - line_start: 10 - line_stop: 10 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[2..6][1] *= 2;" - span: - line_start: 10 - line_stop: 10 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] *= 2;" - right: - Value: - Implicit: - - "2" - - line_start: 10 - line_stop: 10 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] *= 2;" - op: Mul - span: - line_start: 10 - line_stop: 10 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] *= 2;" - span: - line_start: 10 - line_stop: 10 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] *= 2;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..3] = [42u8];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "2" - - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[2..3] = [42u8];" - - Value: - Implicit: - - "3" - - line_start: 11 - line_stop: 11 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[2..3] = [42u8];" - span: - line_start: 11 - line_stop: 11 - col_start: 3 - col_stop: 10 - path: compiler-test - content: " a[2..3] = [42u8];" - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "42" - - line_start: 11 - line_stop: 11 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " a[2..3] = [42u8];" - span: - line_start: 11 - line_stop: 11 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " a[2..3] = [42u8];" - span: - line_start: 11 - line_stop: 11 - col_start: 3 - col_stop: 19 - path: compiler-test - content: " a[2..3] = [42u8];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[6..][0] = 43u8;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "6" - - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[6..][0] = 43u8;" - - ~ - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 12 - line_stop: 12 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " a[6..][0] = 43u8;" - span: - line_start: 12 - line_stop: 12 - col_start: 3 - col_stop: 12 - path: compiler-test - content: " a[6..][0] = 43u8;" - value: - Value: - Integer: - - U8 - - "43" - - line_start: 12 - line_stop: 12 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " a[6..][0] = 43u8;" - span: - line_start: 12 - line_stop: 12 - col_start: 3 - col_stop: 19 - path: compiler-test - content: " a[6..][0] = 43u8;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..1][0..1] = [200];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "0" - - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[0..1][0..1] = [200];" - - Value: - Implicit: - - "1" - - line_start: 13 - line_stop: 13 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[0..1][0..1] = [200];" - - ArrayRange: - - Value: - Implicit: - - "0" - - line_start: 13 - line_stop: 13 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[0..1][0..1] = [200];" - - Value: - Implicit: - - "1" - - line_start: 13 - line_stop: 13 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " a[0..1][0..1] = [200];" - span: - line_start: 13 - line_stop: 13 - col_start: 3 - col_stop: 16 - path: compiler-test - content: " a[0..1][0..1] = [200];" - value: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "200" - - line_start: 13 - line_stop: 13 - col_start: 20 - col_stop: 23 - path: compiler-test - content: " a[0..1][0..1] = [200];" - span: - line_start: 13 - line_stop: 13 - col_start: 19 - col_stop: 24 - path: compiler-test - content: " a[0..1][0..1] = [200];" - span: - line_start: 13 - line_stop: 13 - col_start: 3 - col_stop: 24 - path: compiler-test - content: " a[0..1][0..1] = [200];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[0..2][0] = [1u8; 3];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "0" - - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - - Value: - Implicit: - - "2" - - line_start: 15 - line_stop: 15 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 15 - line_stop: 15 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - span: - line_start: 15 - line_stop: 15 - col_start: 3 - col_stop: 13 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - value: - ArrayInit: - element: - Value: - Integer: - - U8 - - "1" - - line_start: 15 - line_stop: 15 - col_start: 17 - col_stop: 20 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - dimensions: - - value: "3" - span: - line_start: 15 - line_stop: 15 - col_start: 16 - col_stop: 24 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - span: - line_start: 15 - line_stop: 15 - col_start: 3 - col_stop: 24 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[1..][1][1..2][0] = 126;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "1" - - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - - ~ - - ArrayIndex: - Value: - Implicit: - - "1" - - line_start: 16 - line_stop: 16 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - - ArrayRange: - - Value: - Implicit: - - "1" - - line_start: 16 - line_stop: 16 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - - Value: - Implicit: - - "2" - - line_start: 16 - line_stop: 16 - col_start: 16 - col_stop: 17 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 16 - line_stop: 16 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - span: - line_start: 16 - line_stop: 16 - col_start: 3 - col_stop: 21 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - value: - Value: - Implicit: - - "126" - - line_start: 16 - line_stop: 16 - col_start: 24 - col_stop: 27 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - span: - line_start: 16 - line_stop: 16 - col_start: 3 - col_stop: 27 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[1..][0] = [42, 43, 44];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "1" - - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - - ~ - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 17 - line_stop: 17 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - span: - line_start: 17 - line_stop: 17 - col_start: 3 - col_stop: 12 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - value: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "42" - - line_start: 17 - line_stop: 17 - col_start: 16 - col_stop: 18 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - - Expression: - Value: - Implicit: - - "43" - - line_start: 17 - line_stop: 17 - col_start: 20 - col_stop: 22 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - - Expression: - Value: - Implicit: - - "44" - - line_start: 17 - line_stop: 17 - col_start: 24 - col_stop: 26 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - span: - line_start: 17 - line_stop: 17 - col_start: 15 - col_stop: 27 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - span: - line_start: 17 - line_stop: 17 - col_start: 3 - col_stop: 27 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - accesses: - - ArrayRange: - - CircuitMemberAccess: - circuit: - CircuitInit: - name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - members: - - identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - expression: - Value: - Implicit: - - "0" - - line_start: 18 - line_stop: 18 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 16 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - name: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - - Value: - Implicit: - - "1" - - line_start: 18 - line_stop: 18 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 18 - line_stop: 18 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 18 - line_stop: 18 - col_start: 26 - col_stop: 27 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 3 - col_stop: 28 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - value: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - left: - CircuitMemberAccess: - circuit: - CircuitInit: - name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - members: - - identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - expression: - Value: - Implicit: - - "0" - - line_start: 18 - line_stop: 18 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 16 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - name: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - right: - Value: - Implicit: - - "1" - - line_start: 18 - line_stop: 18 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 3 - col_stop: 33 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - index: - Value: - Implicit: - - "0" - - line_start: 18 - line_stop: 18 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 3 - col_stop: 33 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - index: - Value: - Implicit: - - "0" - - line_start: 18 - line_stop: 18 - col_start: 26 - col_stop: 27 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 3 - col_stop: 33 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - right: - Value: - Implicit: - - "2" - - line_start: 18 - line_stop: 18 - col_start: 32 - col_stop: 33 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - op: Add - span: - line_start: 18 - line_stop: 18 - col_start: 3 - col_stop: 33 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 3 - col_stop: 33 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d[..1][0].1 = 1;\\\"}\"}" - accesses: - - ArrayRange: - - ~ - - Value: - Implicit: - - "1" - - line_start: 20 - line_stop: 20 - col_start: 7 - col_stop: 8 - path: compiler-test - content: " d[..1][0].1 = 1;" - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 20 - line_stop: 20 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " d[..1][0].1 = 1;" - - Tuple: - - value: "1" - - line_start: 20 - line_stop: 20 - col_start: 3 - col_stop: 14 - path: compiler-test - content: " d[..1][0].1 = 1;" - span: - line_start: 20 - line_stop: 20 - col_start: 3 - col_stop: 14 - path: compiler-test - content: " d[..1][0].1 = 1;" - value: - Value: - Implicit: - - "1" - - line_start: 20 - line_stop: 20 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " d[..1][0].1 = 1;" - span: - line_start: 20 - line_stop: 20 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " d[..1][0].1 = 1;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" e[0..][0] = [22; 4];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "0" - - line_start: 22 - line_stop: 22 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " e[0..][0] = [22; 4];" - - ~ - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 22 - line_stop: 22 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " e[0..][0] = [22; 4];" - span: - line_start: 22 - line_stop: 22 - col_start: 3 - col_stop: 12 - path: compiler-test - content: " e[0..][0] = [22; 4];" - value: - ArrayInit: - element: - Value: - Implicit: - - "22" - - line_start: 22 - line_stop: 22 - col_start: 16 - col_stop: 18 - path: compiler-test - content: " e[0..][0] = [22; 4];" - dimensions: - - value: "4" - span: - line_start: 22 - line_stop: 22 - col_start: 15 - col_stop: 22 - path: compiler-test - content: " e[0..][0] = [22; 4];" - span: - line_start: 22 - line_stop: 22 - col_start: 3 - col_stop: 22 - path: compiler-test - content: " e[0..][0] = [22; 4];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" e[0..][0][0] = 33;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "0" - - line_start: 23 - line_stop: 23 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " e[0..][0][0] = 33;" - - ~ - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 23 - line_stop: 23 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " e[0..][0][0] = 33;" - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 23 - line_stop: 23 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " e[0..][0][0] = 33;" - span: - line_start: 23 - line_stop: 23 - col_start: 3 - col_stop: 15 - path: compiler-test - content: " e[0..][0][0] = 33;" - value: - Value: - Implicit: - - "33" - - line_start: 23 - line_stop: 23 - col_start: 18 - col_stop: 20 - path: compiler-test - content: " e[0..][0][0] = 33;" - span: - line_start: 23 - line_stop: 23 - col_start: 3 - col_stop: 20 - path: compiler-test - content: " e[0..][0][0] = 33;" - - Return: - expression: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a == [200u8, 93, 42, 174, 5, 6, 43, 8]\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "200" - - line_start: 26 - line_stop: 26 - col_start: 11 - col_stop: 16 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Implicit: - - "93" - - line_start: 26 - line_stop: 26 - col_start: 18 - col_stop: 20 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Implicit: - - "42" - - line_start: 26 - line_stop: 26 - col_start: 22 - col_stop: 24 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Implicit: - - "174" - - line_start: 26 - line_stop: 26 - col_start: 26 - col_stop: 29 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Implicit: - - "5" - - line_start: 26 - line_stop: 26 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Implicit: - - "6" - - line_start: 26 - line_stop: 26 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Implicit: - - "43" - - line_start: 26 - line_stop: 26 - col_start: 37 - col_stop: 39 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Implicit: - - "8" - - line_start: 26 - line_stop: 26 - col_start: 41 - col_stop: 42 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - span: - line_start: 26 - line_stop: 26 - col_start: 10 - col_stop: 43 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - op: Eq - span: - line_start: 26 - line_stop: 26 - col_start: 5 - col_stop: 43 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - right: - Binary: - left: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "3" - - line_start: 27 - line_stop: 27 - col_start: 15 - col_stop: 18 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Implicit: - - "1" - - line_start: 27 - line_stop: 27 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Implicit: - - "1" - - line_start: 27 - line_stop: 27 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - span: - line_start: 27 - line_stop: 27 - col_start: 14 - col_stop: 25 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "42" - - line_start: 27 - line_stop: 27 - col_start: 28 - col_stop: 30 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Implicit: - - "43" - - line_start: 27 - line_stop: 27 - col_start: 32 - col_stop: 34 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Implicit: - - "44" - - line_start: 27 - line_stop: 27 - col_start: 36 - col_stop: 38 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - span: - line_start: 27 - line_stop: 27 - col_start: 27 - col_stop: 39 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "7" - - line_start: 27 - line_stop: 27 - col_start: 42 - col_stop: 43 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Implicit: - - "126" - - line_start: 27 - line_stop: 27 - col_start: 45 - col_stop: 48 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Implicit: - - "9" - - line_start: 27 - line_stop: 27 - col_start: 50 - col_stop: 51 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - span: - line_start: 27 - line_stop: 27 - col_start: 41 - col_stop: 52 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - span: - line_start: 27 - line_stop: 27 - col_start: 13 - col_stop: 53 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - op: Eq - span: - line_start: 27 - line_stop: 27 - col_start: 8 - col_stop: 53 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - op: And - span: - line_start: 26 - line_stop: 27 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - right: - Binary: - left: - Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && d == [(0u8, 1u32)]\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - TupleInit: - elements: - - Value: - Integer: - - U8 - - "0" - - line_start: 28 - line_stop: 28 - col_start: 15 - col_stop: 18 - path: compiler-test - content: " && d == [(0u8, 1u32)]" - - Value: - Integer: - - U32 - - "1" - - line_start: 28 - line_stop: 28 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " && d == [(0u8, 1u32)]" - span: - line_start: 28 - line_stop: 28 - col_start: 14 - col_stop: 25 - path: compiler-test - content: " && d == [(0u8, 1u32)]" - span: - line_start: 28 - line_stop: 28 - col_start: 13 - col_stop: 26 - path: compiler-test - content: " && d == [(0u8, 1u32)]" - op: Eq - span: - line_start: 28 - line_stop: 28 - col_start: 8 - col_stop: 26 - path: compiler-test - content: " && d == [(0u8, 1u32)]" - op: And - span: - line_start: 26 - line_stop: 28 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]" - right: - Binary: - left: - Identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "33" - - line_start: 29 - line_stop: 29 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "22" - - line_start: 29 - line_stop: 29 - col_start: 21 - col_stop: 23 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "22" - - line_start: 29 - line_stop: 29 - col_start: 25 - col_stop: 27 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "22" - - line_start: 29 - line_stop: 29 - col_start: 29 - col_stop: 31 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 29 - line_stop: 29 - col_start: 14 - col_stop: 32 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 35 - col_stop: 36 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 38 - col_stop: 39 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 41 - col_stop: 42 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 44 - col_stop: 45 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 29 - line_stop: 29 - col_start: 34 - col_stop: 46 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 49 - col_stop: 50 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 52 - col_stop: 53 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 55 - col_stop: 56 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Implicit: - - "0" - - line_start: 29 - line_stop: 29 - col_start: 58 - col_stop: 59 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 29 - line_stop: 29 - col_start: 48 - col_stop: 60 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 29 - line_stop: 29 - col_start: 13 - col_stop: 61 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - op: Eq - span: - line_start: 29 - line_stop: 29 - col_start: 8 - col_stop: 61 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - op: And - span: - line_start: 26 - line_stop: 29 - col_start: 5 - col_stop: 61 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]\n && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 25 - line_stop: 29 - col_start: 3 - col_stop: 61 - path: compiler-test - content: " return\n a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]\n && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 7 - line_stop: 30 - col_start: 98 - col_stop: 2 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\n...\n}" - span: - line_start: 7 - line_stop: 30 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" - type_inferenced_theorem: - name: test - expected_input: [] - imports: [] - circuits: - "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Circ {\\\"}\"}": - circuit_name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Circ {\\\"}\"}" - 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 - global_consts: {} - functions: - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: U8 - - - value: "8" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 17 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 7 - line_stop: 7 - col_start: 28 - col_stop: 29 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":36,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Array: - - IntegerType: U8 - - - value: "3" - - - value: "3" - span: - line_start: 7 - line_stop: 7 - col_start: 36 - col_stop: 37 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" - - Variable: - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":53,\\\"col_stop\\\":54,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Tuple: - - IntegerType: U8 - - IntegerType: U32 - - - value: "1" - span: - line_start: 7 - line_stop: 7 - col_start: 53 - col_stop: 54 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" - - Variable: - identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":72,\\\"col_stop\\\":73,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Array: - - IntegerType: U8 - - - value: "4" - - - value: "3" - span: - line_start: 7 - line_stop: 7 - col_start: 72 - col_stop: 73 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {" - output: Boolean - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..3][b] = 93;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Integer: - - U32 - - "0" - - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[0..3][b] = 93;" - - Value: - Integer: - - U32 - - "3" - - line_start: 8 - line_stop: 8 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[0..3][b] = 93;" - - ArrayIndex: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..3][b] = 93;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 3 - col_stop: 13 - path: compiler-test - content: " a[0..3][b] = 93;" - value: - Value: - Integer: - - U8 - - "93" - - line_start: 8 - line_stop: 8 - col_start: 16 - col_stop: 18 - path: compiler-test - content: " a[0..3][b] = 93;" - span: - line_start: 8 - line_stop: 8 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " a[0..3][b] = 93;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] = 87;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Integer: - - U32 - - "2" - - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[2..6][1] = 87;" - - Value: - Integer: - - U32 - - "6" - - line_start: 9 - line_stop: 9 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[2..6][1] = 87;" - - ArrayIndex: - Value: - Integer: - - U32 - - "1" - - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[2..6][1] = 87;" - span: - line_start: 9 - line_stop: 9 - col_start: 3 - col_stop: 13 - path: compiler-test - content: " a[2..6][1] = 87;" - value: - Value: - Integer: - - U8 - - "87" - - line_start: 9 - line_stop: 9 - col_start: 16 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] = 87;" - span: - line_start: 9 - line_stop: 9 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] = 87;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] *= 2;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Integer: - - U32 - - "2" - - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[2..6][1] *= 2;" - - Value: - Integer: - - U32 - - "6" - - line_start: 10 - line_stop: 10 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[2..6][1] *= 2;" - - ArrayIndex: - Value: - Integer: - - U32 - - "1" - - line_start: 10 - line_stop: 10 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[2..6][1] *= 2;" - span: - line_start: 10 - line_stop: 10 - col_start: 3 - col_stop: 13 - path: compiler-test - content: " a[2..6][1] *= 2;" - value: - Binary: - left: - ArrayAccess: - array: - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..6][1] *= 2;\\\"}\"}" - left: - Value: - Integer: - - U32 - - "2" - - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[2..6][1] *= 2;" - right: - Value: - Integer: - - U32 - - "6" - - line_start: 10 - line_stop: 10 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[2..6][1] *= 2;" - span: - line_start: 10 - line_stop: 10 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] *= 2;" - index: - Value: - Integer: - - U32 - - "1" - - line_start: 10 - line_stop: 10 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[2..6][1] *= 2;" - span: - line_start: 10 - line_stop: 10 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] *= 2;" - right: - Value: - Integer: - - U8 - - "2" - - line_start: 10 - line_stop: 10 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] *= 2;" - op: Mul - span: - line_start: 10 - line_stop: 10 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] *= 2;" - span: - line_start: 10 - line_stop: 10 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " a[2..6][1] *= 2;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[2..3] = [42u8];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Integer: - - U32 - - "2" - - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[2..3] = [42u8];" - - Value: - Integer: - - U32 - - "3" - - line_start: 11 - line_stop: 11 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[2..3] = [42u8];" - span: - line_start: 11 - line_stop: 11 - col_start: 3 - col_stop: 10 - path: compiler-test - content: " a[2..3] = [42u8];" - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "42" - - line_start: 11 - line_stop: 11 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " a[2..3] = [42u8];" - span: - line_start: 11 - line_stop: 11 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " a[2..3] = [42u8];" - span: - line_start: 11 - line_stop: 11 - col_start: 3 - col_stop: 19 - path: compiler-test - content: " a[2..3] = [42u8];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[6..][0] = 43u8;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Integer: - - U32 - - "6" - - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[6..][0] = 43u8;" - - ~ - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 12 - line_stop: 12 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " a[6..][0] = 43u8;" - span: - line_start: 12 - line_stop: 12 - col_start: 3 - col_stop: 12 - path: compiler-test - content: " a[6..][0] = 43u8;" - value: - Value: - Integer: - - U8 - - "43" - - line_start: 12 - line_stop: 12 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " a[6..][0] = 43u8;" - span: - line_start: 12 - line_stop: 12 - col_start: 3 - col_stop: 19 - path: compiler-test - content: " a[6..][0] = 43u8;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0..1][0..1] = [200];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Integer: - - U32 - - "0" - - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a[0..1][0..1] = [200];" - - Value: - Integer: - - U32 - - "1" - - line_start: 13 - line_stop: 13 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " a[0..1][0..1] = [200];" - - ArrayRange: - - Value: - Integer: - - U32 - - "0" - - line_start: 13 - line_stop: 13 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[0..1][0..1] = [200];" - - Value: - Integer: - - U32 - - "1" - - line_start: 13 - line_stop: 13 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " a[0..1][0..1] = [200];" - span: - line_start: 13 - line_stop: 13 - col_start: 3 - col_stop: 16 - path: compiler-test - content: " a[0..1][0..1] = [200];" - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "200" - - line_start: 13 - line_stop: 13 - col_start: 20 - col_stop: 23 - path: compiler-test - content: " a[0..1][0..1] = [200];" - span: - line_start: 13 - line_stop: 13 - col_start: 19 - col_stop: 24 - path: compiler-test - content: " a[0..1][0..1] = [200];" - span: - line_start: 13 - line_stop: 13 - col_start: 3 - col_stop: 24 - path: compiler-test - content: " a[0..1][0..1] = [200];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[0..2][0] = [1u8; 3];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Integer: - - U32 - - "0" - - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - - Value: - Integer: - - U32 - - "2" - - line_start: 15 - line_stop: 15 - col_start: 8 - col_stop: 9 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 15 - line_stop: 15 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - span: - line_start: 15 - line_stop: 15 - col_start: 3 - col_stop: 13 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - value: - ArrayInit: - element: - Value: - Integer: - - U8 - - "1" - - line_start: 15 - line_stop: 15 - col_start: 17 - col_stop: 20 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - dimensions: - - value: "3" - span: - line_start: 15 - line_stop: 15 - col_start: 16 - col_stop: 24 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - span: - line_start: 15 - line_stop: 15 - col_start: 3 - col_stop: 24 - path: compiler-test - content: " c[0..2][0] = [1u8; 3];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[1..][1][1..2][0] = 126;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Integer: - - U32 - - "1" - - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - - ~ - - ArrayIndex: - Value: - Integer: - - U32 - - "1" - - line_start: 16 - line_stop: 16 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - - ArrayRange: - - Value: - Integer: - - U32 - - "1" - - line_start: 16 - line_stop: 16 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - - Value: - Integer: - - U32 - - "2" - - line_start: 16 - line_stop: 16 - col_start: 16 - col_stop: 17 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 16 - line_stop: 16 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - span: - line_start: 16 - line_stop: 16 - col_start: 3 - col_stop: 21 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - value: - Value: - Integer: - - U8 - - "126" - - line_start: 16 - line_stop: 16 - col_start: 24 - col_stop: 27 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - span: - line_start: 16 - line_stop: 16 - col_start: 3 - col_stop: 27 - path: compiler-test - content: " c[1..][1][1..2][0] = 126;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[1..][0] = [42, 43, 44];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Integer: - - U32 - - "1" - - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - - ~ - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 17 - line_stop: 17 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - span: - line_start: 17 - line_stop: 17 - col_start: 3 - col_stop: 12 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "42" - - line_start: 17 - line_stop: 17 - col_start: 16 - col_stop: 18 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - - Expression: - Value: - Integer: - - U8 - - "43" - - line_start: 17 - line_stop: 17 - col_start: 20 - col_stop: 22 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - - Expression: - Value: - Integer: - - U8 - - "44" - - line_start: 17 - line_stop: 17 - col_start: 24 - col_stop: 26 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - span: - line_start: 17 - line_stop: 17 - col_start: 15 - col_stop: 27 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - span: - line_start: 17 - line_stop: 17 - col_start: 3 - col_stop: 27 - path: compiler-test - content: " c[1..][0] = [42, 43, 44];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - accesses: - - ArrayRange: - - CircuitMemberAccess: - circuit: - CircuitInit: - name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - members: - - identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - expression: - Value: - Implicit: - - "0" - - line_start: 18 - line_stop: 18 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 16 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - name: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - - Value: - Integer: - - U32 - - "1" - - line_start: 18 - line_stop: 18 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 18 - line_stop: 18 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 18 - line_stop: 18 - col_start: 26 - col_stop: 27 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 3 - col_stop: 28 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - value: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - left: - CircuitMemberAccess: - circuit: - CircuitInit: - name: "{\"name\":\"Circ\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - members: - - identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - expression: - Value: - Implicit: - - "0" - - line_start: 18 - line_stop: 18 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 16 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - name: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c[Circ {f: 0}.f..1][0][0] += 2;\\\"}\"}" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 18 - line_stop: 18 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 3 - col_stop: 33 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 18 - line_stop: 18 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 3 - col_stop: 33 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 18 - line_stop: 18 - col_start: 26 - col_stop: 27 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 3 - col_stop: 33 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - right: - Value: - Integer: - - U8 - - "2" - - line_start: 18 - line_stop: 18 - col_start: 32 - col_stop: 33 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - op: Add - span: - line_start: 18 - line_stop: 18 - col_start: 3 - col_stop: 33 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - span: - line_start: 18 - line_stop: 18 - col_start: 3 - col_stop: 33 - path: compiler-test - content: " c[Circ {f: 0}.f..1][0][0] += 2;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d[..1][0].1 = 1;\\\"}\"}" - accesses: - - ArrayRange: - - ~ - - Value: - Integer: - - U32 - - "1" - - line_start: 20 - line_stop: 20 - col_start: 7 - col_stop: 8 - path: compiler-test - content: " d[..1][0].1 = 1;" - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 20 - line_stop: 20 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " d[..1][0].1 = 1;" - - Tuple: - - value: "1" - - line_start: 20 - line_stop: 20 - col_start: 3 - col_stop: 14 - path: compiler-test - content: " d[..1][0].1 = 1;" - span: - line_start: 20 - line_stop: 20 - col_start: 3 - col_stop: 14 - path: compiler-test - content: " d[..1][0].1 = 1;" - value: - Value: - Integer: - - U32 - - "1" - - line_start: 20 - line_stop: 20 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " d[..1][0].1 = 1;" - span: - line_start: 20 - line_stop: 20 - col_start: 3 - col_stop: 18 - path: compiler-test - content: " d[..1][0].1 = 1;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" e[0..][0] = [22; 4];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Integer: - - U32 - - "0" - - line_start: 22 - line_stop: 22 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " e[0..][0] = [22; 4];" - - ~ - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 22 - line_stop: 22 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " e[0..][0] = [22; 4];" - span: - line_start: 22 - line_stop: 22 - col_start: 3 - col_stop: 12 - path: compiler-test - content: " e[0..][0] = [22; 4];" - value: - ArrayInit: - element: - Value: - Integer: - - U8 - - "22" - - line_start: 22 - line_stop: 22 - col_start: 16 - col_stop: 18 - path: compiler-test - content: " e[0..][0] = [22; 4];" - dimensions: - - value: "4" - span: - line_start: 22 - line_stop: 22 - col_start: 15 - col_stop: 22 - path: compiler-test - content: " e[0..][0] = [22; 4];" - span: - line_start: 22 - line_stop: 22 - col_start: 3 - col_stop: 22 - path: compiler-test - content: " e[0..][0] = [22; 4];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" e[0..][0][0] = 33;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Integer: - - U32 - - "0" - - line_start: 23 - line_stop: 23 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " e[0..][0][0] = 33;" - - ~ - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 23 - line_stop: 23 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " e[0..][0][0] = 33;" - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 23 - line_stop: 23 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " e[0..][0][0] = 33;" - span: - line_start: 23 - line_stop: 23 - col_start: 3 - col_stop: 15 - path: compiler-test - content: " e[0..][0][0] = 33;" - value: - Value: - Integer: - - U8 - - "33" - - line_start: 23 - line_stop: 23 - col_start: 18 - col_stop: 20 - path: compiler-test - content: " e[0..][0][0] = 33;" - span: - line_start: 23 - line_stop: 23 - col_start: 3 - col_stop: 20 - path: compiler-test - content: " e[0..][0][0] = 33;" - - Return: - expression: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a == [200u8, 93, 42, 174, 5, 6, 43, 8]\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "200" - - line_start: 26 - line_stop: 26 - col_start: 11 - col_stop: 16 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Integer: - - U8 - - "93" - - line_start: 26 - line_stop: 26 - col_start: 18 - col_stop: 20 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Integer: - - U8 - - "42" - - line_start: 26 - line_stop: 26 - col_start: 22 - col_stop: 24 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Integer: - - U8 - - "174" - - line_start: 26 - line_stop: 26 - col_start: 26 - col_stop: 29 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Integer: - - U8 - - "5" - - line_start: 26 - line_stop: 26 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Integer: - - U8 - - "6" - - line_start: 26 - line_stop: 26 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Integer: - - U8 - - "43" - - line_start: 26 - line_stop: 26 - col_start: 37 - col_stop: 39 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - - Expression: - Value: - Integer: - - U8 - - "8" - - line_start: 26 - line_stop: 26 - col_start: 41 - col_stop: 42 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - span: - line_start: 26 - line_stop: 26 - col_start: 10 - col_stop: 43 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - op: Eq - span: - line_start: 26 - line_stop: 26 - col_start: 5 - col_stop: 43 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]" - right: - Binary: - left: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "3" - - line_start: 27 - line_stop: 27 - col_start: 15 - col_stop: 18 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Integer: - - U8 - - "1" - - line_start: 27 - line_stop: 27 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Integer: - - U8 - - "1" - - line_start: 27 - line_stop: 27 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - span: - line_start: 27 - line_stop: 27 - col_start: 14 - col_stop: 25 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "42" - - line_start: 27 - line_stop: 27 - col_start: 28 - col_stop: 30 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Integer: - - U8 - - "43" - - line_start: 27 - line_stop: 27 - col_start: 32 - col_stop: 34 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Integer: - - U8 - - "44" - - line_start: 27 - line_stop: 27 - col_start: 36 - col_stop: 38 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - span: - line_start: 27 - line_stop: 27 - col_start: 27 - col_stop: 39 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "7" - - line_start: 27 - line_stop: 27 - col_start: 42 - col_stop: 43 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Integer: - - U8 - - "126" - - line_start: 27 - line_stop: 27 - col_start: 45 - col_stop: 48 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - - Expression: - Value: - Integer: - - U8 - - "9" - - line_start: 27 - line_stop: 27 - col_start: 50 - col_stop: 51 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - span: - line_start: 27 - line_stop: 27 - col_start: 41 - col_stop: 52 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - span: - line_start: 27 - line_stop: 27 - col_start: 13 - col_stop: 53 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - op: Eq - span: - line_start: 27 - line_stop: 27 - col_start: 8 - col_stop: 53 - path: compiler-test - content: " && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - op: And - span: - line_start: 26 - line_stop: 27 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]" - right: - Binary: - left: - Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && d == [(0u8, 1u32)]\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - TupleInit: - elements: - - Value: - Integer: - - U8 - - "0" - - line_start: 28 - line_stop: 28 - col_start: 15 - col_stop: 18 - path: compiler-test - content: " && d == [(0u8, 1u32)]" - - Value: - Integer: - - U32 - - "1" - - line_start: 28 - line_stop: 28 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " && d == [(0u8, 1u32)]" - span: - line_start: 28 - line_stop: 28 - col_start: 14 - col_stop: 25 - path: compiler-test - content: " && d == [(0u8, 1u32)]" - span: - line_start: 28 - line_stop: 28 - col_start: 13 - col_stop: 26 - path: compiler-test - content: " && d == [(0u8, 1u32)]" - op: Eq - span: - line_start: 28 - line_stop: 28 - col_start: 8 - col_stop: 26 - path: compiler-test - content: " && d == [(0u8, 1u32)]" - op: And - span: - line_start: 26 - line_stop: 28 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]" - right: - Binary: - left: - Identifier: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "33" - - line_start: 29 - line_stop: 29 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Integer: - - U8 - - "22" - - line_start: 29 - line_stop: 29 - col_start: 21 - col_stop: 23 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Integer: - - U8 - - "22" - - line_start: 29 - line_stop: 29 - col_start: 25 - col_stop: 27 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Integer: - - U8 - - "22" - - line_start: 29 - line_stop: 29 - col_start: 29 - col_stop: 31 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 29 - line_stop: 29 - col_start: 14 - col_stop: 32 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 29 - line_stop: 29 - col_start: 35 - col_stop: 36 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 29 - line_stop: 29 - col_start: 38 - col_stop: 39 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 29 - line_stop: 29 - col_start: 41 - col_stop: 42 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 29 - line_stop: 29 - col_start: 44 - col_stop: 45 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 29 - line_stop: 29 - col_start: 34 - col_stop: 46 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 29 - line_stop: 29 - col_start: 49 - col_stop: 50 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 29 - line_stop: 29 - col_start: 52 - col_stop: 53 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 29 - line_stop: 29 - col_start: 55 - col_stop: 56 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 29 - line_stop: 29 - col_start: 58 - col_stop: 59 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 29 - line_stop: 29 - col_start: 48 - col_stop: 60 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 29 - line_stop: 29 - col_start: 13 - col_stop: 61 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - op: Eq - span: - line_start: 29 - line_stop: 29 - col_start: 8 - col_stop: 61 - path: compiler-test - content: " && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - op: And - span: - line_start: 26 - line_stop: 29 - col_start: 5 - col_stop: 61 - path: compiler-test - content: " a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]\n && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 25 - line_stop: 29 - col_start: 3 - col_stop: 61 - path: compiler-test - content: " return\n a == [200u8, 93, 42, 174, 5, 6, 43, 8]\n && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]]\n && d == [(0u8, 1u32)]\n && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]];" - span: - line_start: 7 - line_stop: 30 - col_start: 98 - col_stop: 2 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\n...\n}" - span: - line_start: 7 - line_stop: 30 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + initial_theorem: 9808de8c342c41e060d3d3134eb168c8d8cc3ff0641cb8d9779a1746b9fa1687 + canonicalized_theorem: 1479a9afd623ad11ca137555fd86a3f0a6da39641d5b2da712273242541c246e + type_inferenced_theorem: 9bf998e088b9cce0f40a0326fa8e744c88d8168e04c563a2fbd6a57acd23da1f diff --git a/tests/expectations/compiler/compiler/array/equal_initializer.leo.out b/tests/expectations/compiler/compiler/array/equal_initializer.leo.out index 0e8552ccb3..1743444985 100644 --- a/tests/expectations/compiler/compiler/array/equal_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/equal_initializer.leo.out @@ -22,286 +22,6 @@ 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}" + initial_theorem: 25f4af112eb1512952d78bb7fa1d5287e3ab778255307f69304bbe1756575085 + canonicalized_theorem: 248b7cc7462c3f035f337c9232a08bb5a911d7f4e153dd804a32bc597adb0210 + type_inferenced_theorem: ebc3a5632c2d65e51cd9934b1ee4e395867808deeda3ecddfeaebb1b08093ed7 diff --git a/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out b/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out index a39f27257f..74950b1889 100644 --- a/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out +++ b/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out @@ -22,505 +22,6 @@ 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}" + initial_theorem: b3bae883863f88babaafa80d4c029974767fba5fea89ac8c2ab10512e61a38ba + canonicalized_theorem: 9070de3276acf8d06ac58439247130e444c9b02de25b968ad1fc746650a1896c + type_inferenced_theorem: 40a38002031be2cf0141c9ea33562fe69fc3891baeba9c92c487915b97d82507 diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out index ad2d06ca91..acf416ce58 100644 --- a/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out @@ -16,296 +16,6 @@ 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}" + initial_theorem: f5e4014d45239734a04d57c7b130fdf9752de245a4341062063aa5e818c5aa05 + canonicalized_theorem: 8c16a6b011fc067411acaa497386bc5df9b96b91ef739f4992ba416ecf98bafc + type_inferenced_theorem: 17d810699ef381a0a9c4efcd2ad6da64b76ce5d629c05db7b2d07d563e077548 diff --git a/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out index 33387f1cb1..ab2d409cae 100644 --- a/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out @@ -16,286 +16,6 @@ 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}" + initial_theorem: 25f4af112eb1512952d78bb7fa1d5287e3ab778255307f69304bbe1756575085 + canonicalized_theorem: 248b7cc7462c3f035f337c9232a08bb5a911d7f4e153dd804a32bc597adb0210 + type_inferenced_theorem: ebc3a5632c2d65e51cd9934b1ee4e395867808deeda3ecddfeaebb1b08093ed7 diff --git a/tests/expectations/compiler/compiler/array/multi_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_initializer.leo.out index 8c071efaa2..cd80aadaf8 100644 --- a/tests/expectations/compiler/compiler/array/multi_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_initializer.leo.out @@ -16,627 +16,6 @@ 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" + initial_theorem: c45ead50a2983d040085c68b6ec28ab68cba08496478ff590b81205522acc59b + canonicalized_theorem: ad38508a91e16e3ed92d40962dc77e09264c6c7920a88f136f7e5919225becf4 + type_inferenced_theorem: 8e0c3cf4e018444c0abbb52902ca70a413ab7cb2eee04d90598e034d3d67dbe7 diff --git a/tests/expectations/compiler/compiler/array/nested.leo.out b/tests/expectations/compiler/compiler/array/nested.leo.out index c9b47949f5..8ddc167cdf 100644 --- a/tests/expectations/compiler/compiler/array/nested.leo.out +++ b/tests/expectations/compiler/compiler/array/nested.leo.out @@ -16,522 +16,6 @@ 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" + initial_theorem: 796cfe23085a2fd72700df353d266d3e2f62e893faeba8ed1af5ee5178f8e706 + canonicalized_theorem: d06970075b65456a138d9286fd3c445c928a55bf9819d98603b494c38563eae1 + type_inferenced_theorem: 41b1e49c972a34ed3d4629feabe3cb37f2078ba44fd1f3bee0a1888ca86f7ae4 diff --git a/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out b/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out index 790c702b7a..f190e32c0f 100644 --- a/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out +++ b/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out @@ -16,779 +16,6 @@ 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" + initial_theorem: cb893a674418ed59a6cb48487c45194d14fbd20bafed6c25069ec776dc8034cb + canonicalized_theorem: 81130092aaf4ba0f54d49bc07791bf17605571c6ce7d5e6f4ac657d5e10d6e42 + type_inferenced_theorem: 95cbaf465a8177d13e7b2a6d3f7b5da59880158ad02df2c475f9e4a574e90771 diff --git a/tests/expectations/compiler/compiler/array/registers.leo.out b/tests/expectations/compiler/compiler/array/registers.leo.out index 37137ca865..6bed41172a 100644 --- a/tests/expectations/compiler/compiler/array/registers.leo.out +++ b/tests/expectations/compiler/compiler/array/registers.leo.out @@ -22,540 +22,6 @@ 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}" + initial_theorem: 81dd2c459d5a1bff4963fb2cfdc67348183061934025b96739dc05c7b65a2a8b + canonicalized_theorem: 81dd2c459d5a1bff4963fb2cfdc67348183061934025b96739dc05c7b65a2a8b + type_inferenced_theorem: fcb8de69c92dff4a4adb8a160fc3b78042f394cd0dc627c5bf06820a095d7012 diff --git a/tests/expectations/compiler/compiler/array/slice.leo.out b/tests/expectations/compiler/compiler/array/slice.leo.out index d931582acd..26954f821d 100644 --- a/tests/expectations/compiler/compiler/array/slice.leo.out +++ b/tests/expectations/compiler/compiler/array/slice.leo.out @@ -16,416 +16,6 @@ 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" + initial_theorem: ca5fc7bf19d8e6ee1b1421f1a37ea84c42bc89e8ac90711488bc17e996e88a91 + canonicalized_theorem: ca5fc7bf19d8e6ee1b1421f1a37ea84c42bc89e8ac90711488bc17e996e88a91 + type_inferenced_theorem: 2823901914ffea0d4cfcf449b9e45b46f67255e0b50f7a946b0552b240bedc0d diff --git a/tests/expectations/compiler/compiler/array/slice_lower.leo.out b/tests/expectations/compiler/compiler/array/slice_lower.leo.out index 8dfa580c8d..dfbb49183e 100644 --- a/tests/expectations/compiler/compiler/array/slice_lower.leo.out +++ b/tests/expectations/compiler/compiler/array/slice_lower.leo.out @@ -16,894 +16,6 @@ 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" + initial_theorem: 9dad967730de4617fb8dad9001aac6a753f926236c99b39ea52d89fcff8c0750 + canonicalized_theorem: 9dad967730de4617fb8dad9001aac6a753f926236c99b39ea52d89fcff8c0750 + type_inferenced_theorem: fe9de3669f265236e4434434911e4672b7b61b7fa5f429de9cd8721424b07c35 diff --git a/tests/expectations/compiler/compiler/array/spread.leo.out b/tests/expectations/compiler/compiler/array/spread.leo.out index a0dd851fcf..ab8b502908 100644 --- a/tests/expectations/compiler/compiler/array/spread.leo.out +++ b/tests/expectations/compiler/compiler/array/spread.leo.out @@ -16,693 +16,6 @@ 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" + initial_theorem: 2506cc8885eaae80a2ff90d1d231440dcfafd10fd8eb53317112ff2d2240d65e + canonicalized_theorem: 2506cc8885eaae80a2ff90d1d231440dcfafd10fd8eb53317112ff2d2240d65e + type_inferenced_theorem: bc0e1e40fcb7ac04e1dec943be5b93a1e39d43bee68a26713716765775674577 diff --git a/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out b/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out index 0c346a1d42..cc6eb27b12 100644 --- a/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out +++ b/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out @@ -16,668 +16,6 @@ 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" + initial_theorem: e238db049bc888e9243b421a188edbe5ae160127164b6bb75e54125052455565 + canonicalized_theorem: e238db049bc888e9243b421a188edbe5ae160127164b6bb75e54125052455565 + type_inferenced_theorem: e498240b5cb8c4d46a0b1035f208025df8e5feeabf9dddaa859a0a695ae8c5f6 diff --git a/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out b/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out index 5217804eb1..1571180efe 100644 --- a/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out +++ b/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out @@ -16,769 +16,6 @@ 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" + initial_theorem: c650970b4c46e15ef7cac7663cef8cb18dc5c60e044d49741b727cd73b020b71 + canonicalized_theorem: bd31242d7d82f9037c93875ddbba73c4b9ce9842a7b3c06363519b2aa35f59ac + type_inferenced_theorem: cd1b8009d96efc19823875d3f19e626cc23c8c61e66729d51c0349d748834d93 diff --git a/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out index a59a15409d..2a52d2402b 100644 --- a/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out @@ -16,587 +16,6 @@ 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" + initial_theorem: 42d14deb7baaf81b59723a453b1aa09e68bfc8677ce2903596de69ad6b7677ab + canonicalized_theorem: 42d14deb7baaf81b59723a453b1aa09e68bfc8677ce2903596de69ad6b7677ab + type_inferenced_theorem: 1559a3a4db454285ab969d20276d9112fca0b24f6726f64d4b0371dccde32abf diff --git a/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out index ea3cf274cb..2fc5854372 100644 --- a/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out @@ -16,1579 +16,6 @@ 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]; 4]) -> 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]; 4]) -> 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]; 4]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: [[[u8; 2]; 3]; 4]) -> 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]],\\\"}\"}" - 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]]," - type_: ~ - value: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 15 - col_stop: 53 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\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: 3 - line_stop: 10 - col_start: 45 - col_stop: 2 - path: compiler-test - content: "function main(a: [[[u8; 2]; 3]; 4]) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 10 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: [[[u8; 2]; 3]; 4]) -> 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(a: [[[u8; 2]; 3]; 4]) -> 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]; 4]) -> 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]; 4]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: [[[u8; 2]; 3]; 4]) -> 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]],\\\"}\"}" - 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]]," - type_: ~ - value: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 15 - col_stop: 53 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\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: 3 - line_stop: 10 - col_start: 45 - col_stop: 2 - path: compiler-test - content: "function main(a: [[[u8; 2]; 3]; 4]) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 10 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: [[[u8; 2]; 3]; 4]) -> 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(a: [[[u8; 2]; 3]; 4]) -> 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]; 4]) -> 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]; 4]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: [[[u8; 2]; 3]; 4]) -> 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]],\\\"}\"}" - 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]]," - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - value: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 15 - col_stop: 53 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\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: 3 - line_stop: 10 - col_start: 45 - col_stop: 2 - path: compiler-test - content: "function main(a: [[[u8; 2]; 3]; 4]) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 10 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: [[[u8; 2]; 3]; 4]) -> bool {\n...\n}\n\n\n\n\n" + initial_theorem: c7cf923f9ca2a963279a8ff7ae9aa0a11eaddc8ba3e107d48f3aef1d1c55a50f + canonicalized_theorem: c7cf923f9ca2a963279a8ff7ae9aa0a11eaddc8ba3e107d48f3aef1d1c55a50f + type_inferenced_theorem: 58b19d80de0abea85877257b60305e1f7b9d2e67044f60d0159699131d4ba6ec diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out index eb3b4a3b75..09185c5d76 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out @@ -16,831 +16,6 @@ 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" + initial_theorem: dbc983cae35c2cd763e9bc4505a2d1e6c063fa62ccdc858a75644175512c1558 + canonicalized_theorem: dbc983cae35c2cd763e9bc4505a2d1e6c063fa62ccdc858a75644175512c1558 + type_inferenced_theorem: 42686f9d46c46c829259d4b68643d144d126e61a899e3c413ea09d0ed12d24d1 diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out index ccabf0320e..024be6dbfa 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out @@ -16,1805 +16,6 @@ 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]],\\\"}\"}" - 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]]," - type_: ~ - value: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 15 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - value: - ArrayInit: - element: - ArrayInit: - element: - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 37 - col_stop: 38 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "2" - span: - line_start: 9 - line_stop: 9 - col_start: 36 - col_stop: 42 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "3" - span: - line_start: 9 - line_stop: 9 - col_start: 35 - col_stop: 46 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "4" - span: - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 50 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 50 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 3 - line_stop: 12 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 12 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\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\":\"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]],\\\"}\"}" - 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]]," - type_: ~ - value: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 15 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - value: - ArrayInit: - element: - ArrayInit: - element: - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 37 - col_stop: 38 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "2" - span: - line_start: 9 - line_stop: 9 - col_start: 36 - col_stop: 42 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "3" - span: - line_start: 9 - line_stop: 9 - col_start: 35 - col_stop: 46 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "4" - span: - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 50 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 50 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 3 - line_stop: 12 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 12 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\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\":\"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]],\\\"}\"}" - 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]]," - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - value: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 15 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - value: - ArrayInit: - element: - ArrayInit: - element: - ArrayInit: - element: - Value: - Integer: - - U8 - - "0" - - line_start: 9 - line_stop: 9 - col_start: 37 - col_stop: 38 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "2" - span: - line_start: 9 - line_stop: 9 - col_start: 36 - col_stop: 42 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "3" - span: - line_start: 9 - line_stop: 9 - col_start: 35 - col_stop: 46 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "4" - span: - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 50 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 50 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 3 - line_stop: 12 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 12 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n\n" + initial_theorem: 47b31a2f572f1ae29311322f9125a2c59dc4438ab06366b93f285fa0d8b0b23b + canonicalized_theorem: 47b31a2f572f1ae29311322f9125a2c59dc4438ab06366b93f285fa0d8b0b23b + type_inferenced_theorem: c18d0320e45339073f4e7057fe5aa3f268dc7597dfe4aef10a07f120bbdb4863 diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out index d7e169baf1..19a7213bf3 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out @@ -16,770 +16,6 @@ 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" + initial_theorem: 9c0229a2b927c2bbbe66d555b1a9f40ce8a9a2a5ac5c2760f1f463be6674fe8b + canonicalized_theorem: eb2512a0873084cd830fab0a3cb008c7ca6e543d52b2ada5724379a9a56ef98a + type_inferenced_theorem: f114d26de89fc0b27bde7b06eca11c3faf77137fbdb5b56583ee7e9fba0db8f0 diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out index 21c3a6b263..c94b0a9fcb 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out @@ -16,1785 +16,6 @@ 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]],\\\"}\"}" - 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]]," - type_: ~ - value: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 15 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - value: - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 35 - col_stop: 36 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - dimensions: - - value: "4" - - value: "3" - - value: "2" - span: - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 48 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 48 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 3 - line_stop: 12 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 12 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\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\":\"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]],\\\"}\"}" - 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]]," - type_: ~ - value: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 15 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - value: - ArrayInit: - element: - ArrayInit: - element: - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 35 - col_stop: 36 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - dimensions: - - value: "2" - span: - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 48 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - dimensions: - - value: "3" - span: - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 48 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - dimensions: - - value: "4" - span: - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 48 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 48 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 3 - line_stop: 12 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 12 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\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\":\"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]],\\\"}\"}" - 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]]," - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - value: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 15 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - value: - ArrayInit: - element: - ArrayInit: - element: - ArrayInit: - element: - Value: - Integer: - - U8 - - "0" - - line_start: 9 - line_stop: 9 - col_start: 35 - col_stop: 36 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - dimensions: - - value: "2" - span: - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 48 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - dimensions: - - value: "3" - span: - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 48 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - dimensions: - - value: "4" - span: - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 48 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 48 - path: compiler-test - content: " const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 3 - line_stop: 12 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 12 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n\n" + initial_theorem: cc6ad9bf91f0055144e3267e0069b470f01e115d4e653f41059ba252a28f8208 + canonicalized_theorem: 5e01d6c09abedddaabb2de1ae9ded2763f31736688a6c7ce89c6b719845680cc + type_inferenced_theorem: 577811bb30fc1e5f9ce24e162e1d87fcdce5d86d37d693f7e0a940a000d1b901 diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out index 5600746e0d..d7b07cd325 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out @@ -16,779 +16,6 @@ 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" + initial_theorem: eb95146b4dcbaa16244c766c3a4ffc8b804b65ba20bc905cea8a464853603510 + canonicalized_theorem: edb4d22d5499b13f5e3bffe2e770ea3207858f8c21c4020b76e3568d2cc1d2d8 + type_inferenced_theorem: 3629aa30a841dd8f299c667a1c63443d5622712e9006b7f6bbfa9dd025cd798d diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out index 525a93ea9b..8b392058d7 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out @@ -16,1803 +16,6 @@ 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]],\\\"}\"}" - 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]]," - type_: ~ - value: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 15 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - type_: - Array: - - IntegerType: U8 - - - value: "4" - - value: "3" - - value: "2" - value: - ArrayInit: - element: - ArrayInit: - element: - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 35 - col_stop: 36 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "2" - span: - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 40 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "3" - span: - line_start: 9 - line_stop: 9 - col_start: 33 - col_stop: 44 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "4" - span: - line_start: 9 - line_stop: 9 - col_start: 32 - col_stop: 48 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 48 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 3 - line_stop: 12 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 12 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\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\":\"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]],\\\"}\"}" - 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]]," - type_: ~ - value: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 15 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - value: - ArrayInit: - element: - ArrayInit: - element: - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 35 - col_stop: 36 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "2" - span: - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 40 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "3" - span: - line_start: 9 - line_stop: 9 - col_start: 33 - col_stop: 44 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "4" - span: - line_start: 9 - line_stop: 9 - col_start: 32 - col_stop: 48 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 48 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 3 - line_stop: 12 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 12 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\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\":\"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]],\\\"}\"}" - 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]]," - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - value: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 15 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - value: - ArrayInit: - element: - ArrayInit: - element: - ArrayInit: - element: - Value: - Integer: - - U8 - - "0" - - line_start: 9 - line_stop: 9 - col_start: 35 - col_stop: 36 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "2" - span: - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 40 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "3" - span: - line_start: 9 - line_stop: 9 - col_start: 33 - col_stop: 44 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - dimensions: - - value: "4" - span: - line_start: 9 - line_stop: 9 - col_start: 32 - col_stop: 48 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 48 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 3 - line_stop: 12 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 12 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n\n" + initial_theorem: 15baea7cfadb05d32f5cf5375a25208c42e173e7832c00c5fb7f9007aca5dc48 + canonicalized_theorem: cd70c9c9f2d86b38d0e49d371fad697375cd6674206c9b3eb32e534a0367afe1 + type_inferenced_theorem: 1cbb9181a67580fd51535f5273a2b8168270c3213061bcc5c6604b3af203d7b5 diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out index 1e193e882b..6bcbf5fba6 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out @@ -16,769 +16,6 @@ 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" + initial_theorem: a29044947f267f770abe4b67c6477ed5971c4b04d17a34a043f24be31dd3535c + canonicalized_theorem: 3a4f6774136e7b9453a58bfaecb228595ff94e55630476acc9e7b6b93a0169a2 + type_inferenced_theorem: f8457618409d5f1508b82e155212a5d9321a11314b581f4f5062c220f99dcd11 diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out index ee168bb9b5..c33ad2f511 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out @@ -16,1783 +16,6 @@ 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]],\\\"}\"}" - 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]]," - type_: ~ - value: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 15 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - type_: - Array: - - IntegerType: U8 - - - value: "4" - - value: "3" - - value: "2" - value: - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 33 - col_stop: 34 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - dimensions: - - value: "4" - - value: "3" - - value: "2" - span: - line_start: 9 - line_stop: 9 - col_start: 32 - col_stop: 46 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 46 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 3 - line_stop: 12 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 12 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}\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\":\"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]],\\\"}\"}" - 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]]," - type_: ~ - value: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 15 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - value: - ArrayInit: - element: - ArrayInit: - element: - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 33 - col_stop: 34 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - dimensions: - - value: "2" - span: - line_start: 9 - line_stop: 9 - col_start: 32 - col_stop: 46 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - dimensions: - - value: "3" - span: - line_start: 9 - line_stop: 9 - col_start: 32 - col_stop: 46 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - dimensions: - - value: "4" - span: - line_start: 9 - line_stop: 9 - col_start: 32 - col_stop: 46 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 46 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 3 - line_stop: 12 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 12 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}\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\":\"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]],\\\"}\"}" - 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]]," - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - value: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]," - - Expression: - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 30 - col_stop: 33 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 35 - col_stop: 38 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 39 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 42 - col_stop: 45 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 41 - col_stop: 51 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 52 - path: compiler-test - content: " [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 15 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline" - span: - line_start: 4 - line_stop: 7 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]],\n...\n [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline\n" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - type_: - Array: - - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - - - value: "4" - value: - ArrayInit: - element: - ArrayInit: - element: - ArrayInit: - element: - Value: - Integer: - - U8 - - "0" - - line_start: 9 - line_stop: 9 - col_start: 33 - col_stop: 34 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - dimensions: - - value: "2" - span: - line_start: 9 - line_stop: 9 - col_start: 32 - col_stop: 46 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - dimensions: - - value: "3" - span: - line_start: 9 - line_stop: 9 - col_start: 32 - col_stop: 46 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - dimensions: - - value: "4" - span: - line_start: 9 - line_stop: 9 - col_start: 32 - col_stop: 46 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 46 - path: compiler-test - content: " const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == y;" - span: - line_start: 3 - line_stop: 12 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 12 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}\n\n\n\n\n\n\n" + initial_theorem: 611c6362e365456206304d7d28cc428bf49cf57d907fcfa5c106426f32e64515 + canonicalized_theorem: 216d2e239b59ea1aefac5e503233ec6c1d3d480b5cc316d02f4910ee3eafd087 + type_inferenced_theorem: 17de88a1fa4f500b91cdd10512bb892f88e8eb987fa5496f6a4d3441b9aef5b5 diff --git a/tests/expectations/compiler/compiler/boolean/and.leo.out b/tests/expectations/compiler/compiler/boolean/and.leo.out index 20bb201c18..e431b3e264 100644 --- a/tests/expectations/compiler/compiler/boolean/and.leo.out +++ b/tests/expectations/compiler/compiler/boolean/and.leo.out @@ -34,225 +34,6 @@ 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}" + initial_theorem: 457931d2a45a5872b3f523ee9ed3ae922635750e38048927ee39dcd2fdaf338d + canonicalized_theorem: 457931d2a45a5872b3f523ee9ed3ae922635750e38048927ee39dcd2fdaf338d + type_inferenced_theorem: 5268ad28b10aedcd44c0aafced11ed0351999fceb6a202ed5a1faf833da5c2c4 diff --git a/tests/expectations/compiler/compiler/boolean/conditional.leo.out b/tests/expectations/compiler/compiler/boolean/conditional.leo.out index 2ea372f38f..1ad2fd1423 100644 --- a/tests/expectations/compiler/compiler/boolean/conditional.leo.out +++ b/tests/expectations/compiler/compiler/boolean/conditional.leo.out @@ -34,252 +34,6 @@ 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}" + initial_theorem: 57ab6c27f0cc1f947f533b8758a8d7643358eb972fa52d8e97fd12403a3a14e0 + canonicalized_theorem: 57ab6c27f0cc1f947f533b8758a8d7643358eb972fa52d8e97fd12403a3a14e0 + type_inferenced_theorem: 55a49f89b8b70b430ca8919b6dbbb3b350a98a8a9e498377d878dd4336a050e6 diff --git a/tests/expectations/compiler/compiler/boolean/equal.leo.out b/tests/expectations/compiler/compiler/boolean/equal.leo.out index 9f268f6b92..30cb2c7d7c 100644 --- a/tests/expectations/compiler/compiler/boolean/equal.leo.out +++ b/tests/expectations/compiler/compiler/boolean/equal.leo.out @@ -34,225 +34,6 @@ 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}" + initial_theorem: dcd562246dac98c86986cd3c8519ef6bab0d6ad9eb910ef2b797e25eebf66160 + canonicalized_theorem: dcd562246dac98c86986cd3c8519ef6bab0d6ad9eb910ef2b797e25eebf66160 + type_inferenced_theorem: ac5fc2712e702bdd3735bdac2885d028ed66ced47e0f3c310f8c17191a6aa9fe diff --git a/tests/expectations/compiler/compiler/boolean/not_equal.leo.out b/tests/expectations/compiler/compiler/boolean/not_equal.leo.out index a97d5b6588..e044e5b308 100644 --- a/tests/expectations/compiler/compiler/boolean/not_equal.leo.out +++ b/tests/expectations/compiler/compiler/boolean/not_equal.leo.out @@ -34,225 +34,6 @@ 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}" + initial_theorem: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 + canonicalized_theorem: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 + type_inferenced_theorem: 730367497b7b56381f29321e18eade74d70107a6d8c657b47022215015f53801 diff --git a/tests/expectations/compiler/compiler/boolean/or.leo.out b/tests/expectations/compiler/compiler/boolean/or.leo.out index f6f25a7a35..5465eb6334 100644 --- a/tests/expectations/compiler/compiler/boolean/or.leo.out +++ b/tests/expectations/compiler/compiler/boolean/or.leo.out @@ -34,225 +34,6 @@ 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}" + initial_theorem: fe77500ebf653bfe8620287f2c9e52f0e985c915a09a285be3b659a308649a65 + canonicalized_theorem: fe77500ebf653bfe8620287f2c9e52f0e985c915a09a285be3b659a308649a65 + type_inferenced_theorem: 52112d0a4983f119ba82655780b8aead34d1cced758e5595ce62dbc717f95cae diff --git a/tests/expectations/compiler/compiler/char/circuit.leo.out b/tests/expectations/compiler/compiler/char/circuit.leo.out index 2d02be11ee..f25dcf89ea 100644 --- a/tests/expectations/compiler/compiler/char/circuit.leo.out +++ b/tests/expectations/compiler/compiler/char/circuit.leo.out @@ -100,532 +100,6 @@ 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" + initial_theorem: 680d480560e2a187669f5bf3c328cee1865021cbe4c19f3350db843d312b6406 + canonicalized_theorem: 680d480560e2a187669f5bf3c328cee1865021cbe4c19f3350db843d312b6406 + type_inferenced_theorem: 385365a7d46c458c2d5f94690acc53191bf234bcdb928a9efc454c33ba06718a diff --git a/tests/expectations/compiler/compiler/char/neq.leo.out b/tests/expectations/compiler/compiler/char/neq.leo.out index 39e7f5ef32..8d72cfd6f4 100644 --- a/tests/expectations/compiler/compiler/char/neq.leo.out +++ b/tests/expectations/compiler/compiler/char/neq.leo.out @@ -100,318 +100,6 @@ 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}" + initial_theorem: 66ea1340fc8ae77142ea3d254d8d3350a2775549ea7ba0ab550ec88b5c5721d4 + canonicalized_theorem: 66ea1340fc8ae77142ea3d254d8d3350a2775549ea7ba0ab550ec88b5c5721d4 + type_inferenced_theorem: 7b07de0d440a813b674c11dcc71fa4daee8224d5136844d66bc7fafa60f38725 diff --git a/tests/expectations/compiler/compiler/char/nonprinting.leo.out b/tests/expectations/compiler/compiler/char/nonprinting.leo.out index 70161164e5..ed25f4f285 100644 --- a/tests/expectations/compiler/compiler/char/nonprinting.leo.out +++ b/tests/expectations/compiler/compiler/char/nonprinting.leo.out @@ -19,1773 +19,6 @@ outputs: r1: type: bool value: "true" - 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(\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in1: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 3 - line_stop: 3 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in1: char," - - Variable: - identifier: "{\"name\":\"in2\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in2: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in2: char," - - Variable: - identifier: "{\"name\":\"in3\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in3: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in3: char," - - Variable: - identifier: "{\"name\":\"in4\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in4: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in4: char," - - Variable: - identifier: "{\"name\":\"in5\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in5: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in5: char," - - Variable: - identifier: "{\"name\":\"in6\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in6: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in6: char," - - Variable: - identifier: "{\"name\":\"in7\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in7: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in7: char," - - Variable: - identifier: "{\"name\":\"in8\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in8: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in8: char," - - Variable: - identifier: "{\"name\":\"in9\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in9: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in9: char," - - Variable: - identifier: "{\"name\":\"in10\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in10: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in10: char," - - Variable: - identifier: "{\"name\":\"in11\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in11: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in11: char," - - Variable: - identifier: "{\"name\":\"in12\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in12: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 14 - line_stop: 14 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in12: char," - - Variable: - identifier: "{\"name\":\"in13\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in13: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in13: char," - - Variable: - identifier: "{\"name\":\"in14\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in14: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in14: char," - - Variable: - identifier: "{\"name\":\"in15\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in15: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in15: char," - - Variable: - identifier: "{\"name\":\"in16\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in16: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in16: char," - - Variable: - identifier: "{\"name\":\"in17\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in17: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 19 - line_stop: 19 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in17: char," - - Variable: - identifier: "{\"name\":\"in18\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in18: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 20 - line_stop: 20 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in18: char," - - Variable: - identifier: "{\"name\":\"in19\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in19: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 21 - line_stop: 21 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in19: char," - - Variable: - identifier: "{\"name\":\"in20\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in20: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 22 - line_stop: 22 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in20: char," - - Variable: - identifier: "{\"name\":\"in21\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in21: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 23 - line_stop: 23 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in21: char," - - Variable: - identifier: "{\"name\":\"in22\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in22: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 24 - line_stop: 24 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in22: char," - - Variable: - identifier: "{\"name\":\"in23\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in23: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 25 - line_stop: 25 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in23: char," - - Variable: - identifier: "{\"name\":\"in24\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in24: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 26 - line_stop: 26 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in24: char," - - Variable: - identifier: "{\"name\":\"in25\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in25: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 27 - line_stop: 27 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in25: char," - - Variable: - identifier: "{\"name\":\"in26\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in26: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 28 - line_stop: 28 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in26: char," - - Variable: - identifier: "{\"name\":\"in27\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in27: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 29 - line_stop: 29 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in27: char," - - Variable: - identifier: "{\"name\":\"in28\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in28: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 30 - line_stop: 30 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in28: char," - - Variable: - identifier: "{\"name\":\"in29\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in29: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 31 - line_stop: 31 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in29: char," - - Variable: - identifier: "{\"name\":\"in30\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in30: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 32 - line_stop: 32 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in30: char," - - Variable: - identifier: "{\"name\":\"in31\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in31: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 33 - line_stop: 33 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in31: char," - - Variable: - identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 34 - line_stop: 34 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in32: char," - - Variable: - identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 35 - line_stop: 35 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in32: char," - output: - Tuple: - - Array: - - Char - - - value: "33" - - Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let str = [\\\"}\"}" - span: - line_start: 37 - line_stop: 37 - col_start: 9 - col_stop: 12 - path: compiler-test - content: " let str = [" - type_: ~ - value: - ArrayInline: - elements: - - Expression: - Identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in1,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in2\",\"span\":\"{\\\"line_start\\\":39,\\\"line_stop\\\":39,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in2,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in3\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in3,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in4\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in4,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in5\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in5,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in6\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in6,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in7\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in7,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in8\",\"span\":\"{\\\"line_start\\\":45,\\\"line_stop\\\":45,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in8,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in9\",\"span\":\"{\\\"line_start\\\":46,\\\"line_stop\\\":46,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in9,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in10\",\"span\":\"{\\\"line_start\\\":47,\\\"line_stop\\\":47,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in10,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in11\",\"span\":\"{\\\"line_start\\\":48,\\\"line_stop\\\":48,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in11,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in12\",\"span\":\"{\\\"line_start\\\":49,\\\"line_stop\\\":49,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in12,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in13\",\"span\":\"{\\\"line_start\\\":50,\\\"line_stop\\\":50,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in13,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in14\",\"span\":\"{\\\"line_start\\\":51,\\\"line_stop\\\":51,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in14,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in15\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in15,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in16\",\"span\":\"{\\\"line_start\\\":53,\\\"line_stop\\\":53,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in16,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in17\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in17,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in18\",\"span\":\"{\\\"line_start\\\":55,\\\"line_stop\\\":55,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in18,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in19\",\"span\":\"{\\\"line_start\\\":56,\\\"line_stop\\\":56,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in19,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in20\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in20,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in21\",\"span\":\"{\\\"line_start\\\":58,\\\"line_stop\\\":58,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in21,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in22\",\"span\":\"{\\\"line_start\\\":59,\\\"line_stop\\\":59,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in22,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in23\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in23,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in24\",\"span\":\"{\\\"line_start\\\":61,\\\"line_stop\\\":61,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in24,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in25\",\"span\":\"{\\\"line_start\\\":62,\\\"line_stop\\\":62,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in25,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in26\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in26,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in27\",\"span\":\"{\\\"line_start\\\":64,\\\"line_stop\\\":64,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in27,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in28\",\"span\":\"{\\\"line_start\\\":65,\\\"line_stop\\\":65,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in28,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in29\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in29,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in30\",\"span\":\"{\\\"line_start\\\":67,\\\"line_stop\\\":67,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in30,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in31\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in31,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":69,\\\"line_stop\\\":69,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":70,\\\"line_stop\\\":70,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32,\\\"}\"}" - span: - line_start: 37 - line_stop: 71 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " let str = [\n...\n ];" - span: - line_start: 37 - line_stop: 71 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " let str = [\n...\n ];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" - - Console: - function: - Log: - parts: - - Const: "" - - Container - parameters: - - Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":72,\\\"line_stop\\\":72,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", str);\\\"}\"}" - span: - line_start: 72 - line_stop: 72 - col_start: 17 - col_stop: 26 - path: compiler-test - content: " console.log(\"{}\", str);" - span: - line_start: 72 - line_stop: 72 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.log(\"{}\", str);" - - Return: - expression: - TupleInit: - elements: - - Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":73,\\\"line_stop\\\":73,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (str, in1 == '\\\\\\\\x00');\\\"}\"}" - - Binary: - left: - Identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":73,\\\"line_stop\\\":73,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (str, in1 == '\\\\\\\\x00');\\\"}\"}" - right: - Value: - Char: - character: - Scalar: 0 - span: - line_start: 73 - line_stop: 73 - col_start: 25 - col_stop: 31 - path: compiler-test - content: " return (str, in1 == '\\x00');" - op: Eq - span: - line_start: 73 - line_stop: 73 - col_start: 18 - col_stop: 31 - path: compiler-test - content: " return (str, in1 == '\\x00');" - span: - line_start: 73 - line_stop: 73 - col_start: 12 - col_stop: 32 - path: compiler-test - content: " return (str, in1 == '\\x00');" - span: - line_start: 73 - line_stop: 73 - col_start: 5 - col_stop: 32 - path: compiler-test - content: " return (str, in1 == '\\x00');" - span: - line_start: 36 - line_stop: 74 - col_start: 25 - col_stop: 2 - path: compiler-test - content: ") -> ([char; 33], bool) {\n...\n}" - span: - line_start: 2 - line_stop: 74 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(\n...\n) -> ([char; 33], bool) {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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(\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in1: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 3 - line_stop: 3 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in1: char," - - Variable: - identifier: "{\"name\":\"in2\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in2: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in2: char," - - Variable: - identifier: "{\"name\":\"in3\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in3: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in3: char," - - Variable: - identifier: "{\"name\":\"in4\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in4: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in4: char," - - Variable: - identifier: "{\"name\":\"in5\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in5: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in5: char," - - Variable: - identifier: "{\"name\":\"in6\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in6: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in6: char," - - Variable: - identifier: "{\"name\":\"in7\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in7: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in7: char," - - Variable: - identifier: "{\"name\":\"in8\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in8: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in8: char," - - Variable: - identifier: "{\"name\":\"in9\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in9: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in9: char," - - Variable: - identifier: "{\"name\":\"in10\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in10: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in10: char," - - Variable: - identifier: "{\"name\":\"in11\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in11: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in11: char," - - Variable: - identifier: "{\"name\":\"in12\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in12: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 14 - line_stop: 14 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in12: char," - - Variable: - identifier: "{\"name\":\"in13\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in13: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in13: char," - - Variable: - identifier: "{\"name\":\"in14\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in14: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in14: char," - - Variable: - identifier: "{\"name\":\"in15\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in15: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in15: char," - - Variable: - identifier: "{\"name\":\"in16\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in16: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in16: char," - - Variable: - identifier: "{\"name\":\"in17\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in17: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 19 - line_stop: 19 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in17: char," - - Variable: - identifier: "{\"name\":\"in18\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in18: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 20 - line_stop: 20 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in18: char," - - Variable: - identifier: "{\"name\":\"in19\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in19: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 21 - line_stop: 21 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in19: char," - - Variable: - identifier: "{\"name\":\"in20\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in20: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 22 - line_stop: 22 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in20: char," - - Variable: - identifier: "{\"name\":\"in21\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in21: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 23 - line_stop: 23 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in21: char," - - Variable: - identifier: "{\"name\":\"in22\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in22: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 24 - line_stop: 24 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in22: char," - - Variable: - identifier: "{\"name\":\"in23\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in23: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 25 - line_stop: 25 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in23: char," - - Variable: - identifier: "{\"name\":\"in24\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in24: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 26 - line_stop: 26 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in24: char," - - Variable: - identifier: "{\"name\":\"in25\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in25: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 27 - line_stop: 27 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in25: char," - - Variable: - identifier: "{\"name\":\"in26\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in26: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 28 - line_stop: 28 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in26: char," - - Variable: - identifier: "{\"name\":\"in27\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in27: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 29 - line_stop: 29 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in27: char," - - Variable: - identifier: "{\"name\":\"in28\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in28: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 30 - line_stop: 30 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in28: char," - - Variable: - identifier: "{\"name\":\"in29\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in29: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 31 - line_stop: 31 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in29: char," - - Variable: - identifier: "{\"name\":\"in30\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in30: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 32 - line_stop: 32 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in30: char," - - Variable: - identifier: "{\"name\":\"in31\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in31: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 33 - line_stop: 33 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in31: char," - - Variable: - identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 34 - line_stop: 34 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in32: char," - - Variable: - identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 35 - line_stop: 35 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in32: char," - output: - Tuple: - - Array: - - Char - - - value: "33" - - Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let str = [\\\"}\"}" - span: - line_start: 37 - line_stop: 37 - col_start: 9 - col_stop: 12 - path: compiler-test - content: " let str = [" - type_: ~ - value: - ArrayInline: - elements: - - Expression: - Identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in1,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in2\",\"span\":\"{\\\"line_start\\\":39,\\\"line_stop\\\":39,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in2,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in3\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in3,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in4\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in4,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in5\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in5,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in6\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in6,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in7\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in7,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in8\",\"span\":\"{\\\"line_start\\\":45,\\\"line_stop\\\":45,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in8,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in9\",\"span\":\"{\\\"line_start\\\":46,\\\"line_stop\\\":46,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in9,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in10\",\"span\":\"{\\\"line_start\\\":47,\\\"line_stop\\\":47,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in10,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in11\",\"span\":\"{\\\"line_start\\\":48,\\\"line_stop\\\":48,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in11,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in12\",\"span\":\"{\\\"line_start\\\":49,\\\"line_stop\\\":49,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in12,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in13\",\"span\":\"{\\\"line_start\\\":50,\\\"line_stop\\\":50,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in13,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in14\",\"span\":\"{\\\"line_start\\\":51,\\\"line_stop\\\":51,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in14,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in15\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in15,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in16\",\"span\":\"{\\\"line_start\\\":53,\\\"line_stop\\\":53,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in16,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in17\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in17,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in18\",\"span\":\"{\\\"line_start\\\":55,\\\"line_stop\\\":55,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in18,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in19\",\"span\":\"{\\\"line_start\\\":56,\\\"line_stop\\\":56,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in19,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in20\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in20,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in21\",\"span\":\"{\\\"line_start\\\":58,\\\"line_stop\\\":58,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in21,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in22\",\"span\":\"{\\\"line_start\\\":59,\\\"line_stop\\\":59,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in22,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in23\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in23,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in24\",\"span\":\"{\\\"line_start\\\":61,\\\"line_stop\\\":61,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in24,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in25\",\"span\":\"{\\\"line_start\\\":62,\\\"line_stop\\\":62,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in25,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in26\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in26,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in27\",\"span\":\"{\\\"line_start\\\":64,\\\"line_stop\\\":64,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in27,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in28\",\"span\":\"{\\\"line_start\\\":65,\\\"line_stop\\\":65,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in28,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in29\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in29,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in30\",\"span\":\"{\\\"line_start\\\":67,\\\"line_stop\\\":67,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in30,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in31\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in31,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":69,\\\"line_stop\\\":69,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":70,\\\"line_stop\\\":70,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32,\\\"}\"}" - span: - line_start: 37 - line_stop: 71 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " let str = [\n...\n ];" - span: - line_start: 37 - line_stop: 71 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " let str = [\n...\n ];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" - - Console: - function: - Log: - parts: - - Const: "" - - Container - parameters: - - Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":72,\\\"line_stop\\\":72,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", str);\\\"}\"}" - span: - line_start: 72 - line_stop: 72 - col_start: 17 - col_stop: 26 - path: compiler-test - content: " console.log(\"{}\", str);" - span: - line_start: 72 - line_stop: 72 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.log(\"{}\", str);" - - Return: - expression: - TupleInit: - elements: - - Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":73,\\\"line_stop\\\":73,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (str, in1 == '\\\\\\\\x00');\\\"}\"}" - - Binary: - left: - Identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":73,\\\"line_stop\\\":73,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (str, in1 == '\\\\\\\\x00');\\\"}\"}" - right: - Value: - Char: - character: - Scalar: 0 - span: - line_start: 73 - line_stop: 73 - col_start: 25 - col_stop: 31 - path: compiler-test - content: " return (str, in1 == '\\x00');" - op: Eq - span: - line_start: 73 - line_stop: 73 - col_start: 18 - col_stop: 31 - path: compiler-test - content: " return (str, in1 == '\\x00');" - span: - line_start: 73 - line_stop: 73 - col_start: 12 - col_stop: 32 - path: compiler-test - content: " return (str, in1 == '\\x00');" - span: - line_start: 73 - line_stop: 73 - col_start: 5 - col_stop: 32 - path: compiler-test - content: " return (str, in1 == '\\x00');" - span: - line_start: 36 - line_stop: 74 - col_start: 25 - col_stop: 2 - path: compiler-test - content: ") -> ([char; 33], bool) {\n...\n}" - span: - line_start: 2 - line_stop: 74 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(\n...\n) -> ([char; 33], bool) {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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(\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in1: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 3 - line_stop: 3 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in1: char," - - Variable: - identifier: "{\"name\":\"in2\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in2: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in2: char," - - Variable: - identifier: "{\"name\":\"in3\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in3: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in3: char," - - Variable: - identifier: "{\"name\":\"in4\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in4: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in4: char," - - Variable: - identifier: "{\"name\":\"in5\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in5: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in5: char," - - Variable: - identifier: "{\"name\":\"in6\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in6: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in6: char," - - Variable: - identifier: "{\"name\":\"in7\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in7: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in7: char," - - Variable: - identifier: "{\"name\":\"in8\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in8: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in8: char," - - Variable: - identifier: "{\"name\":\"in9\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in9: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " in9: char," - - Variable: - identifier: "{\"name\":\"in10\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in10: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in10: char," - - Variable: - identifier: "{\"name\":\"in11\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in11: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in11: char," - - Variable: - identifier: "{\"name\":\"in12\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in12: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 14 - line_stop: 14 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in12: char," - - Variable: - identifier: "{\"name\":\"in13\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in13: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in13: char," - - Variable: - identifier: "{\"name\":\"in14\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in14: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in14: char," - - Variable: - identifier: "{\"name\":\"in15\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in15: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in15: char," - - Variable: - identifier: "{\"name\":\"in16\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in16: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in16: char," - - Variable: - identifier: "{\"name\":\"in17\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in17: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 19 - line_stop: 19 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in17: char," - - Variable: - identifier: "{\"name\":\"in18\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in18: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 20 - line_stop: 20 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in18: char," - - Variable: - identifier: "{\"name\":\"in19\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in19: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 21 - line_stop: 21 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in19: char," - - Variable: - identifier: "{\"name\":\"in20\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in20: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 22 - line_stop: 22 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in20: char," - - Variable: - identifier: "{\"name\":\"in21\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in21: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 23 - line_stop: 23 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in21: char," - - Variable: - identifier: "{\"name\":\"in22\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in22: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 24 - line_stop: 24 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in22: char," - - Variable: - identifier: "{\"name\":\"in23\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in23: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 25 - line_stop: 25 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in23: char," - - Variable: - identifier: "{\"name\":\"in24\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in24: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 26 - line_stop: 26 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in24: char," - - Variable: - identifier: "{\"name\":\"in25\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in25: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 27 - line_stop: 27 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in25: char," - - Variable: - identifier: "{\"name\":\"in26\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in26: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 28 - line_stop: 28 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in26: char," - - Variable: - identifier: "{\"name\":\"in27\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in27: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 29 - line_stop: 29 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in27: char," - - Variable: - identifier: "{\"name\":\"in28\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in28: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 30 - line_stop: 30 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in28: char," - - Variable: - identifier: "{\"name\":\"in29\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in29: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 31 - line_stop: 31 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in29: char," - - Variable: - identifier: "{\"name\":\"in30\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in30: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 32 - line_stop: 32 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in30: char," - - Variable: - identifier: "{\"name\":\"in31\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in31: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 33 - line_stop: 33 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in31: char," - - Variable: - identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 34 - line_stop: 34 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in32: char," - - Variable: - identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32: char,\\\"}\"}" - const_: false - mutable: true - type_: Char - span: - line_start: 35 - line_stop: 35 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " in32: char," - output: - Tuple: - - Array: - - Char - - - value: "33" - - Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let str = [\\\"}\"}" - span: - line_start: 37 - line_stop: 37 - col_start: 9 - col_stop: 12 - path: compiler-test - content: " let str = [" - type_: - Array: - - Char - - - value: "33" - value: - ArrayInline: - elements: - - Expression: - Identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in1,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in2\",\"span\":\"{\\\"line_start\\\":39,\\\"line_stop\\\":39,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in2,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in3\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in3,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in4\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in4,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in5\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in5,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in6\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in6,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in7\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in7,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in8\",\"span\":\"{\\\"line_start\\\":45,\\\"line_stop\\\":45,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in8,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in9\",\"span\":\"{\\\"line_start\\\":46,\\\"line_stop\\\":46,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in9,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in10\",\"span\":\"{\\\"line_start\\\":47,\\\"line_stop\\\":47,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in10,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in11\",\"span\":\"{\\\"line_start\\\":48,\\\"line_stop\\\":48,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in11,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in12\",\"span\":\"{\\\"line_start\\\":49,\\\"line_stop\\\":49,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in12,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in13\",\"span\":\"{\\\"line_start\\\":50,\\\"line_stop\\\":50,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in13,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in14\",\"span\":\"{\\\"line_start\\\":51,\\\"line_stop\\\":51,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in14,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in15\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in15,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in16\",\"span\":\"{\\\"line_start\\\":53,\\\"line_stop\\\":53,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in16,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in17\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in17,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in18\",\"span\":\"{\\\"line_start\\\":55,\\\"line_stop\\\":55,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in18,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in19\",\"span\":\"{\\\"line_start\\\":56,\\\"line_stop\\\":56,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in19,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in20\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in20,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in21\",\"span\":\"{\\\"line_start\\\":58,\\\"line_stop\\\":58,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in21,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in22\",\"span\":\"{\\\"line_start\\\":59,\\\"line_stop\\\":59,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in22,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in23\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in23,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in24\",\"span\":\"{\\\"line_start\\\":61,\\\"line_stop\\\":61,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in24,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in25\",\"span\":\"{\\\"line_start\\\":62,\\\"line_stop\\\":62,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in25,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in26\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in26,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in27\",\"span\":\"{\\\"line_start\\\":64,\\\"line_stop\\\":64,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in27,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in28\",\"span\":\"{\\\"line_start\\\":65,\\\"line_stop\\\":65,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in28,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in29\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in29,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in30\",\"span\":\"{\\\"line_start\\\":67,\\\"line_stop\\\":67,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in30,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in31\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in31,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":69,\\\"line_stop\\\":69,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32,\\\"}\"}" - - Expression: - Identifier: "{\"name\":\"in32\",\"span\":\"{\\\"line_start\\\":70,\\\"line_stop\\\":70,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" in32,\\\"}\"}" - span: - line_start: 37 - line_stop: 71 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " let str = [\n...\n ];" - span: - line_start: 37 - line_stop: 71 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " let str = [\n...\n ];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" - - Console: - function: - Log: - parts: - - Const: "" - - Container - parameters: - - Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":72,\\\"line_stop\\\":72,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", str);\\\"}\"}" - span: - line_start: 72 - line_stop: 72 - col_start: 17 - col_stop: 26 - path: compiler-test - content: " console.log(\"{}\", str);" - span: - line_start: 72 - line_stop: 72 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.log(\"{}\", str);" - - Return: - expression: - TupleInit: - elements: - - Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":73,\\\"line_stop\\\":73,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (str, in1 == '\\\\\\\\x00');\\\"}\"}" - - Binary: - left: - Identifier: "{\"name\":\"in1\",\"span\":\"{\\\"line_start\\\":73,\\\"line_stop\\\":73,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (str, in1 == '\\\\\\\\x00');\\\"}\"}" - right: - Value: - Char: - character: - Scalar: 0 - span: - line_start: 73 - line_stop: 73 - col_start: 25 - col_stop: 31 - path: compiler-test - content: " return (str, in1 == '\\x00');" - op: Eq - span: - line_start: 73 - line_stop: 73 - col_start: 18 - col_stop: 31 - path: compiler-test - content: " return (str, in1 == '\\x00');" - span: - line_start: 73 - line_stop: 73 - col_start: 12 - col_stop: 32 - path: compiler-test - content: " return (str, in1 == '\\x00');" - span: - line_start: 73 - line_stop: 73 - col_start: 5 - col_stop: 32 - path: compiler-test - content: " return (str, in1 == '\\x00');" - span: - line_start: 36 - line_stop: 74 - col_start: 25 - col_stop: 2 - path: compiler-test - content: ") -> ([char; 33], bool) {\n...\n}" - span: - line_start: 2 - line_stop: 74 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(\n...\n) -> ([char; 33], bool) {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + initial_theorem: 737b6db278359fac5760302a43f0f27b06e38d9dd6affce2b61946545cb475ac + canonicalized_theorem: 737b6db278359fac5760302a43f0f27b06e38d9dd6affce2b61946545cb475ac + type_inferenced_theorem: 07d7f6418670dca3233f14b5a7dbde73787168b2cb210f6a66860a0d9a0e9ea7 diff --git a/tests/expectations/compiler/compiler/char/out.leo.out b/tests/expectations/compiler/compiler/char/out.leo.out index 78567e6b92..96a6496c46 100644 --- a/tests/expectations/compiler/compiler/char/out.leo.out +++ b/tests/expectations/compiler/compiler/char/out.leo.out @@ -100,354 +100,6 @@ 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" + initial_theorem: af450dbf8c804894b41a738de1832af3092cae4d2823b5839da8b7dd6a8679de + canonicalized_theorem: af450dbf8c804894b41a738de1832af3092cae4d2823b5839da8b7dd6a8679de + type_inferenced_theorem: ec94a20aaab8811399eb3cbd6b30345083f956510e3b5cf6ffb55d3087e83cc8 diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out index ec1112efcd..f8a56ddd8a 100644 --- a/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out @@ -16,674 +16,6 @@ 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" + initial_theorem: 69d5d1d8e5f05bad8d61b1c14fe6089e661c13e91160f7e4be416dca1a86e9db + canonicalized_theorem: 69d5d1d8e5f05bad8d61b1c14fe6089e661c13e91160f7e4be416dca1a86e9db + type_inferenced_theorem: c0295d3b69631f79838a642c667a7da8698eda4e20d287a5bf2693a0717a4978 diff --git a/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out b/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out index 785a81e0d2..ec46dc0d16 100644 --- a/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out @@ -16,617 +16,6 @@ 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" + initial_theorem: 583cb3219a67fcbb30d241dec9e2860d99db27b109c8d095c10838ea342efd3c + canonicalized_theorem: 583cb3219a67fcbb30d241dec9e2860d99db27b109c8d095c10838ea342efd3c + type_inferenced_theorem: bbb33dca916b1310a58492ecd4bc74ed03ef3ab87870391839fc8b627f31e941 diff --git a/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out b/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out index 88271720fb..65fa775533 100644 --- a/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out +++ b/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out @@ -16,810 +16,6 @@ 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" + initial_theorem: e96236da6f97f8472930c05f30db95afa0c914060fe3ee908af57dbc1644f6b8 + canonicalized_theorem: e96236da6f97f8472930c05f30db95afa0c914060fe3ee908af57dbc1644f6b8 + type_inferenced_theorem: 933e32a944dbeba01b9c1600ccdec94370927087a3a2b5511bdf4767b5fecd7b diff --git a/tests/expectations/compiler/compiler/circuits/inline.leo.out b/tests/expectations/compiler/compiler/circuits/inline.leo.out index 2fd7ea2888..fee16228ff 100644 --- a/tests/expectations/compiler/compiler/circuits/inline.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline.leo.out @@ -16,310 +16,6 @@ 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" + initial_theorem: 7a6b3abb44b3770f98b45c1f961539ae538e1b5fb2b62ae7bffeaf2209739bc3 + canonicalized_theorem: 7a6b3abb44b3770f98b45c1f961539ae538e1b5fb2b62ae7bffeaf2209739bc3 + type_inferenced_theorem: 88703ec6b9780a1e7629b14afd0e3da35ff4d68f968db2926242f745d6f61b4d diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out index 6d5a1a9960..5577c1f694 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out @@ -16,739 +16,6 @@ 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" + initial_theorem: 76c7ce0af826afd3568deb3fb910dfbee9dc3b1db1f4a1ba6641e49f6d621a41 + canonicalized_theorem: 9c79521d3198b8ed197251626ed0e20b483026151ca99b3fb349472c63a56cc5 + type_inferenced_theorem: 1c97a2ba48df4c16b137bf9712981bad253c9585cd6e4fcae5635e0cd6d8d301 diff --git a/tests/expectations/compiler/compiler/circuits/member_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_function.leo.out index c6599e4d95..a76bd6c641 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function.leo.out @@ -16,613 +16,6 @@ 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" + initial_theorem: 3709cdd3aeb7a84061aaafa3513872a4259583bcfcaa87b2b735610d54814fdf + canonicalized_theorem: 3709cdd3aeb7a84061aaafa3513872a4259583bcfcaa87b2b735610d54814fdf + type_inferenced_theorem: 0995eb0322eeddd4a46eadb17414ce9d79507948279f6a5cc570035c6cdc34ef diff --git a/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out index 7254d088e3..75f413a8f1 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out @@ -16,933 +16,6 @@ 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" + initial_theorem: f4796f1f9215d0c6d42478aae63b1495dfad36eaaec4a981dddac9def85ffef0 + canonicalized_theorem: f4796f1f9215d0c6d42478aae63b1495dfad36eaaec4a981dddac9def85ffef0 + type_inferenced_theorem: f808f56c8af9d6677bf54e7f777b3023f82144462df704dc4f3e39830be4c109 diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out index 6fb70d5fc6..cd60af8547 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out @@ -16,553 +16,6 @@ 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" + initial_theorem: b6df670bda418b0aa854ad50b4fef19b44de312f56894c5a1148f9b0a2d9afee + canonicalized_theorem: b6df670bda418b0aa854ad50b4fef19b44de312f56894c5a1148f9b0a2d9afee + type_inferenced_theorem: fcc852041018d4e7bde56fa9e0cd5c75642153a708f37aec9ce392d1a89c8a15 diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out index c54c745db0..a58b046fd3 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out @@ -16,687 +16,6 @@ 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" + initial_theorem: 4c74b65863cddde8ce523495358ab619ec48645dcb8409658a3fb3d7a3821d6d + canonicalized_theorem: b5697d5884139da5a68861213ff3c7660f694e682078e1bd350856206e0289b8 + type_inferenced_theorem: ff4b8f91f014277d6bb2d8d82c31361e5a5c5a46ed87a1e61f0c2e2e8d5fd254 diff --git a/tests/expectations/compiler/compiler/circuits/member_variable.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out index e35d378d39..8e7c272833 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out @@ -16,430 +16,6 @@ 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" + initial_theorem: 35f870f8ad050ad60461320ac83f5890b05a371e175ac567205ea82848f7b843 + canonicalized_theorem: 35f870f8ad050ad60461320ac83f5890b05a371e175ac567205ea82848f7b843 + type_inferenced_theorem: 4834243c03feb9cfedec039a852cdd27a9a78c1d77e402977056ab5e9a939ab3 diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out index 36642ae2d2..d9adc8f0e5 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out @@ -16,714 +16,6 @@ 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" + initial_theorem: deb8019cf05028fb78c7b991b9c34b3f57a3a451291fdcdeff3d309046146a01 + canonicalized_theorem: deb8019cf05028fb78c7b991b9c34b3f57a3a451291fdcdeff3d309046146a01 + type_inferenced_theorem: a6e408cad754cdd3adc08ca8506f63dd733e300bc821819fb417fa7060c8d044 diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out index 17c02bf1fd..c39a35b994 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out @@ -16,843 +16,6 @@ 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" + initial_theorem: 8edf6af581db0a59ea7ef541bf7a69cbe2123d03e8b2b126f0d97f863e380a13 + canonicalized_theorem: cfd575b43758d9e6fd65452f955f940a80b519bfec68f5d2f89a897d3bb93981 + type_inferenced_theorem: 9fcbf7898afbf3d3c453387620845717512ed909d934470386975e5a11140b42 diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out index 5fe0b729e8..e6d2a15141 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out @@ -16,1287 +16,6 @@ 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, condition: bool, 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, condition: bool, new: u8) {\\\"}\"}" - - Variable: - identifier: "{\"name\":\"condition\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":30,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, condition: bool, new: u8) {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 39 - path: compiler-test - content: " function set_a(mut self, condition: bool, new: u8) {" - - Variable: - identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":47,\\\"col_stop\\\":50,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, condition: bool, new: u8) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " function set_a(mut self, condition: bool, new: u8) {" - output: ~ - block: - statements: - - Conditional: - condition: - Identifier: "{\"name\":\"condition\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if condition {\\\"}\"}" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" - accesses: - - Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " self.a = new;" - value: - Identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 25 - path: compiler-test - content: " self.a = new;" - span: - line_start: 7 - line_stop: 9 - col_start: 22 - col_stop: 10 - path: compiler-test - content: " if condition {\n...\n }" - next: ~ - span: - line_start: 7 - line_stop: 9 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " if condition {\n...\n }" - span: - line_start: 6 - line_stop: 10 - col_start: 56 - col_stop: 6 - path: compiler-test - content: " function set_a(mut self, condition: bool, new: u8) {\n...\n }" - span: - line_start: 6 - line_stop: 10 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function set_a(mut self, condition: bool, new: u8) {\n...\n }\n\n" - global_consts: {} - functions: - "{\"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: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" - span: - line_start: 14 - line_stop: 14 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let f = Foo { a: 0u8 };" - type_: ~ - value: - CircuitInit: - name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" - members: - - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" - expression: - Value: - Integer: - - U8 - - "0" - - line_start: 14 - line_stop: 14 - col_start: 22 - col_stop: 25 - path: compiler-test - content: " let f = Foo { a: 0u8 };" - span: - line_start: 14 - line_stop: 14 - col_start: 13 - col_stop: 27 - path: compiler-test - content: " let f = Foo { a: 0u8 };" - span: - line_start: 14 - line_stop: 14 - 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\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 1u8);\\\"}\"}" - name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 1u8);\\\"}\"}" - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " f.set_a(false, 1u8);" - arguments: - - Value: - Boolean: - - "false" - - line_start: 16 - line_stop: 16 - col_start: 13 - col_stop: 18 - path: compiler-test - content: " f.set_a(false, 1u8);" - - Value: - Integer: - - U8 - - "1" - - line_start: 16 - line_stop: 16 - col_start: 20 - col_stop: 23 - path: compiler-test - content: " f.set_a(false, 1u8);" - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " f.set_a(false, 1u8);" - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " f.set_a(false, 1u8);" - - Expression: - expression: - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 1u8);\\\"}\"}" - name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 1u8);\\\"}\"}" - span: - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " f.set_a(true, 1u8);" - arguments: - - Value: - Boolean: - - "true" - - line_start: 17 - line_stop: 17 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " f.set_a(true, 1u8);" - - Value: - Integer: - - U8 - - "1" - - line_start: 17 - line_stop: 17 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " f.set_a(true, 1u8);" - span: - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " f.set_a(true, 1u8);" - span: - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " f.set_a(true, 1u8);" - - Expression: - expression: - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 2u8);\\\"}\"}" - name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 2u8);\\\"}\"}" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " f.set_a(false, 2u8);" - arguments: - - Value: - Boolean: - - "false" - - line_start: 18 - line_stop: 18 - col_start: 13 - col_stop: 18 - path: compiler-test - content: " f.set_a(false, 2u8);" - - Value: - Integer: - - U8 - - "2" - - line_start: 18 - line_stop: 18 - col_start: 20 - col_stop: 23 - path: compiler-test - content: " f.set_a(false, 2u8);" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " f.set_a(false, 2u8);" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " f.set_a(false, 2u8);" - - Expression: - expression: - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 2u8);\\\"}\"}" - name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 2u8);\\\"}\"}" - span: - line_start: 19 - line_stop: 19 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " f.set_a(true, 2u8);" - arguments: - - Value: - Boolean: - - "true" - - line_start: 19 - line_stop: 19 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " f.set_a(true, 2u8);" - - Value: - Integer: - - U8 - - "2" - - line_start: 19 - line_stop: 19 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " f.set_a(true, 2u8);" - span: - line_start: 19 - line_stop: 19 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " f.set_a(true, 2u8);" - span: - line_start: 19 - line_stop: 19 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " f.set_a(true, 2u8);" - - Return: - expression: - Binary: - left: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" - name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" - span: - line_start: 21 - line_stop: 21 - col_start: 12 - col_stop: 15 - path: compiler-test - content: " return f.a == 2u8 == y;" - right: - Value: - Integer: - - U8 - - "2" - - line_start: 21 - line_stop: 21 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " return f.a == 2u8 == y;" - op: Eq - span: - line_start: 21 - line_stop: 21 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return f.a == 2u8 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" - op: Eq - span: - line_start: 21 - line_stop: 21 - col_start: 12 - col_stop: 27 - path: compiler-test - content: " return f.a == 2u8 == y;" - span: - line_start: 21 - line_stop: 21 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " return f.a == 2u8 == y;" - span: - line_start: 13 - line_stop: 22 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 13 - line_stop: 22 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\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, condition: bool, 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, condition: bool, new: u8) {\\\"}\"}" - - Variable: - identifier: "{\"name\":\"condition\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":30,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, condition: bool, new: u8) {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 39 - path: compiler-test - content: " function set_a(mut self, condition: bool, new: u8) {" - - Variable: - identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":47,\\\"col_stop\\\":50,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, condition: bool, new: u8) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " function set_a(mut self, condition: bool, new: u8) {" - output: - Tuple: [] - block: - statements: - - Conditional: - condition: - Identifier: "{\"name\":\"condition\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if condition {\\\"}\"}" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" - accesses: - - Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " self.a = new;" - value: - Identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 25 - path: compiler-test - content: " self.a = new;" - span: - line_start: 7 - line_stop: 9 - col_start: 22 - col_stop: 10 - path: compiler-test - content: " if condition {\n...\n }" - next: ~ - span: - line_start: 7 - line_stop: 9 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " if condition {\n...\n }" - span: - line_start: 6 - line_stop: 10 - col_start: 56 - col_stop: 6 - path: compiler-test - content: " function set_a(mut self, condition: bool, new: u8) {\n...\n }" - span: - line_start: 6 - line_stop: 10 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function set_a(mut self, condition: bool, new: u8) {\n...\n }\n\n" - global_consts: {} - functions: - "{\"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: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" - span: - line_start: 14 - line_stop: 14 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let f = Foo { a: 0u8 };" - type_: ~ - value: - CircuitInit: - name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" - members: - - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" - expression: - Value: - Integer: - - U8 - - "0" - - line_start: 14 - line_stop: 14 - col_start: 22 - col_stop: 25 - path: compiler-test - content: " let f = Foo { a: 0u8 };" - span: - line_start: 14 - line_stop: 14 - col_start: 13 - col_stop: 27 - path: compiler-test - content: " let f = Foo { a: 0u8 };" - span: - line_start: 14 - line_stop: 14 - 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\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 1u8);\\\"}\"}" - name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 1u8);\\\"}\"}" - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " f.set_a(false, 1u8);" - arguments: - - Value: - Boolean: - - "false" - - line_start: 16 - line_stop: 16 - col_start: 13 - col_stop: 18 - path: compiler-test - content: " f.set_a(false, 1u8);" - - Value: - Integer: - - U8 - - "1" - - line_start: 16 - line_stop: 16 - col_start: 20 - col_stop: 23 - path: compiler-test - content: " f.set_a(false, 1u8);" - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " f.set_a(false, 1u8);" - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " f.set_a(false, 1u8);" - - Expression: - expression: - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 1u8);\\\"}\"}" - name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 1u8);\\\"}\"}" - span: - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " f.set_a(true, 1u8);" - arguments: - - Value: - Boolean: - - "true" - - line_start: 17 - line_stop: 17 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " f.set_a(true, 1u8);" - - Value: - Integer: - - U8 - - "1" - - line_start: 17 - line_stop: 17 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " f.set_a(true, 1u8);" - span: - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " f.set_a(true, 1u8);" - span: - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " f.set_a(true, 1u8);" - - Expression: - expression: - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 2u8);\\\"}\"}" - name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 2u8);\\\"}\"}" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " f.set_a(false, 2u8);" - arguments: - - Value: - Boolean: - - "false" - - line_start: 18 - line_stop: 18 - col_start: 13 - col_stop: 18 - path: compiler-test - content: " f.set_a(false, 2u8);" - - Value: - Integer: - - U8 - - "2" - - line_start: 18 - line_stop: 18 - col_start: 20 - col_stop: 23 - path: compiler-test - content: " f.set_a(false, 2u8);" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " f.set_a(false, 2u8);" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " f.set_a(false, 2u8);" - - Expression: - expression: - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 2u8);\\\"}\"}" - name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 2u8);\\\"}\"}" - span: - line_start: 19 - line_stop: 19 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " f.set_a(true, 2u8);" - arguments: - - Value: - Boolean: - - "true" - - line_start: 19 - line_stop: 19 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " f.set_a(true, 2u8);" - - Value: - Integer: - - U8 - - "2" - - line_start: 19 - line_stop: 19 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " f.set_a(true, 2u8);" - span: - line_start: 19 - line_stop: 19 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " f.set_a(true, 2u8);" - span: - line_start: 19 - line_stop: 19 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " f.set_a(true, 2u8);" - - Return: - expression: - Binary: - left: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" - name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" - span: - line_start: 21 - line_stop: 21 - col_start: 12 - col_stop: 15 - path: compiler-test - content: " return f.a == 2u8 == y;" - right: - Value: - Integer: - - U8 - - "2" - - line_start: 21 - line_stop: 21 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " return f.a == 2u8 == y;" - op: Eq - span: - line_start: 21 - line_stop: 21 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return f.a == 2u8 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" - op: Eq - span: - line_start: 21 - line_stop: 21 - col_start: 12 - col_stop: 27 - path: compiler-test - content: " return f.a == 2u8 == y;" - span: - line_start: 21 - line_stop: 21 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " return f.a == 2u8 == y;" - span: - line_start: 13 - line_stop: 22 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 13 - line_stop: 22 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\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, condition: bool, 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, condition: bool, new: u8) {\\\"}\"}" - - Variable: - identifier: "{\"name\":\"condition\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":30,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, condition: bool, new: u8) {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 6 - line_stop: 6 - col_start: 30 - col_stop: 39 - path: compiler-test - content: " function set_a(mut self, condition: bool, new: u8) {" - - Variable: - identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":47,\\\"col_stop\\\":50,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, condition: bool, new: u8) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 6 - line_stop: 6 - col_start: 47 - col_stop: 50 - path: compiler-test - content: " function set_a(mut self, condition: bool, new: u8) {" - output: - Tuple: [] - block: - statements: - - Conditional: - condition: - Identifier: "{\"name\":\"condition\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if condition {\\\"}\"}" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" - accesses: - - Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " self.a = new;" - value: - Identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 25 - path: compiler-test - content: " self.a = new;" - span: - line_start: 7 - line_stop: 9 - col_start: 22 - col_stop: 10 - path: compiler-test - content: " if condition {\n...\n }" - next: ~ - span: - line_start: 7 - line_stop: 9 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " if condition {\n...\n }" - span: - line_start: 6 - line_stop: 10 - col_start: 56 - col_stop: 6 - path: compiler-test - content: " function set_a(mut self, condition: bool, new: u8) {\n...\n }" - span: - line_start: 6 - line_stop: 10 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function set_a(mut self, condition: bool, new: u8) {\n...\n }\n\n" - global_consts: {} - functions: - "{\"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: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" - span: - line_start: 14 - line_stop: 14 - 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\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" - members: - - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}" - expression: - Value: - Integer: - - U8 - - "0" - - line_start: 14 - line_stop: 14 - col_start: 22 - col_stop: 25 - path: compiler-test - content: " let f = Foo { a: 0u8 };" - span: - line_start: 14 - line_stop: 14 - col_start: 13 - col_stop: 27 - path: compiler-test - content: " let f = Foo { a: 0u8 };" - span: - line_start: 14 - line_stop: 14 - 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\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 1u8);\\\"}\"}" - name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 1u8);\\\"}\"}" - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " f.set_a(false, 1u8);" - arguments: - - Value: - Boolean: - - "false" - - line_start: 16 - line_stop: 16 - col_start: 13 - col_stop: 18 - path: compiler-test - content: " f.set_a(false, 1u8);" - - Value: - Integer: - - U8 - - "1" - - line_start: 16 - line_stop: 16 - col_start: 20 - col_stop: 23 - path: compiler-test - content: " f.set_a(false, 1u8);" - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " f.set_a(false, 1u8);" - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " f.set_a(false, 1u8);" - - Expression: - expression: - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 1u8);\\\"}\"}" - name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 1u8);\\\"}\"}" - span: - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " f.set_a(true, 1u8);" - arguments: - - Value: - Boolean: - - "true" - - line_start: 17 - line_stop: 17 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " f.set_a(true, 1u8);" - - Value: - Integer: - - U8 - - "1" - - line_start: 17 - line_stop: 17 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " f.set_a(true, 1u8);" - span: - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " f.set_a(true, 1u8);" - span: - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " f.set_a(true, 1u8);" - - Expression: - expression: - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 2u8);\\\"}\"}" - name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(false, 2u8);\\\"}\"}" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " f.set_a(false, 2u8);" - arguments: - - Value: - Boolean: - - "false" - - line_start: 18 - line_stop: 18 - col_start: 13 - col_stop: 18 - path: compiler-test - content: " f.set_a(false, 2u8);" - - Value: - Integer: - - U8 - - "2" - - line_start: 18 - line_stop: 18 - col_start: 20 - col_stop: 23 - path: compiler-test - content: " f.set_a(false, 2u8);" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " f.set_a(false, 2u8);" - span: - line_start: 18 - line_stop: 18 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " f.set_a(false, 2u8);" - - Expression: - expression: - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 2u8);\\\"}\"}" - name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(true, 2u8);\\\"}\"}" - span: - line_start: 19 - line_stop: 19 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " f.set_a(true, 2u8);" - arguments: - - Value: - Boolean: - - "true" - - line_start: 19 - line_stop: 19 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " f.set_a(true, 2u8);" - - Value: - Integer: - - U8 - - "2" - - line_start: 19 - line_stop: 19 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " f.set_a(true, 2u8);" - span: - line_start: 19 - line_stop: 19 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " f.set_a(true, 2u8);" - span: - line_start: 19 - line_stop: 19 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " f.set_a(true, 2u8);" - - Return: - expression: - Binary: - left: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" - name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" - span: - line_start: 21 - line_stop: 21 - col_start: 12 - col_stop: 15 - path: compiler-test - content: " return f.a == 2u8 == y;" - right: - Value: - Integer: - - U8 - - "2" - - line_start: 21 - line_stop: 21 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " return f.a == 2u8 == y;" - op: Eq - span: - line_start: 21 - line_stop: 21 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return f.a == 2u8 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}" - op: Eq - span: - line_start: 21 - line_stop: 21 - col_start: 12 - col_stop: 27 - path: compiler-test - content: " return f.a == 2u8 == y;" - span: - line_start: 21 - line_stop: 21 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " return f.a == 2u8 == y;" - span: - line_start: 13 - line_stop: 22 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 13 - line_stop: 22 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n\n" + initial_theorem: f61ad518c877d851b60248bd2868e80e44feeef578aaef2e6cfa30a6ac1dd325 + canonicalized_theorem: c95d6c670a0843f7c11efb4bec4784890b8504bd3f9dc1d5cf950d0683e8538a + type_inferenced_theorem: 5db7661ac71e6ee9096571c88d1f36855db0d21f3b1757f5e07c3c85c6b2c8ea diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out index 6b2a403d8b..fd6a30ce25 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out @@ -16,696 +16,6 @@ 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" + initial_theorem: 46fccf2a1d04ff7bbfb9a88eeceb6cfd39adcf7ce2e2323d4fb83f4ae3dba273 + canonicalized_theorem: 222568f9f7b61876690514fdd2dd12419b2e889269a2b7aabd7223d291167da5 + type_inferenced_theorem: f1a5656978bd48409401788332b1a1d90c969178e65af06b54d5b4445be84375 diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out index 319cfb938e..8ed7bc747a 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out @@ -16,640 +16,6 @@ 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" + initial_theorem: 6e01b3fd6a8b93c71386db6034a1b989a06cee469df2a634dddca7a8151fc8be + canonicalized_theorem: 6e01b3fd6a8b93c71386db6034a1b989a06cee469df2a634dddca7a8151fc8be + type_inferenced_theorem: b868fba47889acf8369e00b96440fe81ebfdba5dd042dc4bddd89f0bb945ac02 diff --git a/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out index 82c7db6f1c..aa63fe5992 100644 --- a/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out @@ -16,1385 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}": - circuit_name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}" - 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\":\"test_me\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function test_me(mut self) -> u8 {\\\"}\"}" - input: - - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":22,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function test_me(mut self) -> u8 {\\\"}\"}" - output: - IntegerType: U8 - block: - statements: - - Assign: - operation: Add - assignee: - identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" - accesses: - - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " self.x += 1;" - value: - Value: - Implicit: - - "1" - - line_start: 7 - line_stop: 7 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " self.x += 1;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 20 - path: compiler-test - content: " self.x += 1;" - - Return: - expression: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 16 - col_stop: 22 - path: compiler-test - content: " return self.x;" - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 22 - path: compiler-test - content: " return self.x;" - span: - line_start: 6 - line_stop: 9 - col_start: 38 - col_stop: 6 - path: compiler-test - content: " function test_me(mut self) -> u8 {\n...\n }" - span: - line_start: 6 - line_stop: 9 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function test_me(mut self) -> u8 {\n...\n }\n" - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new() -> Self {\\\"}\"}" - input: [] - output: SelfType - block: - statements: - - Return: - expression: - CircuitInit: - name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { x: 1u8 };\\\"}\"}" - members: - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { x: 1u8 };\\\"}\"}" - expression: - Value: - Integer: - - U8 - - "1" - - line_start: 12 - line_stop: 12 - col_start: 26 - col_stop: 29 - path: compiler-test - content: " return Self { x: 1u8 };" - span: - line_start: 12 - line_stop: 12 - col_start: 16 - col_stop: 31 - path: compiler-test - content: " return Self { x: 1u8 };" - span: - line_start: 12 - line_stop: 12 - col_start: 9 - col_stop: 31 - path: compiler-test - content: " return Self { x: 1u8 };" - span: - line_start: 11 - line_stop: 13 - col_start: 28 - col_stop: 6 - path: compiler-test - content: " function new() -> Self {\n...\n }" - span: - line_start: 11 - line_stop: 13 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function new() -> Self {\n...\n }" - global_consts: {} - functions: - "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}" - input: [] - output: - Circuit: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":21,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}" - block: - statements: - - Return: - expression: - CircuitInit: - name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":10,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return TestMe { x: 0u8 };\\\"}\"}" - members: - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return TestMe { x: 0u8 };\\\"}\"}" - expression: - Value: - Integer: - - U8 - - "0" - - line_start: 17 - line_stop: 17 - col_start: 22 - col_stop: 25 - path: compiler-test - content: " return TestMe { x: 0u8 };" - span: - line_start: 17 - line_stop: 17 - col_start: 10 - col_stop: 27 - path: compiler-test - content: " return TestMe { x: 0u8 };" - span: - line_start: 17 - line_stop: 17 - col_start: 3 - col_stop: 27 - path: compiler-test - content: " return TestMe { x: 0u8 };" - span: - line_start: 16 - line_stop: 18 - col_start: 28 - col_stop: 2 - path: compiler-test - content: "function my_fn() -> TestMe {\n...\n}" - span: - line_start: 16 - line_stop: 18 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function my_fn() -> TestMe {\n...\n}" - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 20 - line_stop: 20 - 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\":\"t\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" - span: - line_start: 21 - line_stop: 21 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - type_: ~ - value: - Call: - function: - CircuitMemberAccess: - circuit: - CircuitInit: - name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" - members: - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" - expression: - Value: - Integer: - - U8 - - "6" - - line_start: 21 - line_stop: 21 - col_start: 26 - col_stop: 29 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - span: - line_start: 21 - line_stop: 21 - col_start: 15 - col_stop: 30 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":31,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" - span: - line_start: 21 - line_stop: 21 - col_start: 15 - col_stop: 38 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - arguments: [] - span: - line_start: 21 - line_stop: 21 - col_start: 15 - col_stop: 40 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - span: - line_start: 21 - line_stop: 21 - col_start: 5 - col_stop: 40 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"u\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" - span: - line_start: 22 - line_stop: 22 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const u = my_fn().test_me();" - type_: ~ - value: - Call: - function: - CircuitMemberAccess: - circuit: - Call: - function: - Identifier: "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":15,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" - arguments: [] - span: - line_start: 22 - line_stop: 22 - col_start: 15 - col_stop: 22 - path: compiler-test - content: " const u = my_fn().test_me();" - name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":23,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" - span: - line_start: 22 - line_stop: 22 - col_start: 15 - col_stop: 30 - path: compiler-test - content: " const u = my_fn().test_me();" - arguments: [] - span: - line_start: 22 - line_stop: 22 - col_start: 15 - col_stop: 32 - path: compiler-test - content: " const u = my_fn().test_me();" - span: - line_start: 22 - line_stop: 22 - col_start: 5 - col_stop: 32 - path: compiler-test - content: " const u = my_fn().test_me();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"v\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const v = TestMe::new().test_me();" - type_: ~ - value: - Call: - function: - CircuitMemberAccess: - circuit: - Call: - function: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" - name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 15 - col_stop: 26 - path: compiler-test - content: " const v = TestMe::new().test_me();" - arguments: [] - span: - line_start: 23 - line_stop: 23 - col_start: 15 - col_stop: 28 - path: compiler-test - content: " const v = TestMe::new().test_me();" - name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":29,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 15 - col_stop: 36 - path: compiler-test - content: " const v = TestMe::new().test_me();" - arguments: [] - span: - line_start: 23 - line_stop: 23 - col_start: 15 - col_stop: 38 - path: compiler-test - content: " const v = TestMe::new().test_me();" - span: - line_start: 23 - line_stop: 23 - col_start: 5 - col_stop: 38 - path: compiler-test - content: " const v = TestMe::new().test_me();" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"v\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return v == 2u8 == y;\\\"}\"}" - right: - Value: - Integer: - - U8 - - "2" - - line_start: 24 - line_stop: 24 - col_start: 17 - col_stop: 20 - path: compiler-test - content: " return v == 2u8 == y;" - op: Eq - span: - line_start: 24 - line_stop: 24 - col_start: 12 - col_stop: 20 - path: compiler-test - content: " return v == 2u8 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return v == 2u8 == y;\\\"}\"}" - op: Eq - span: - line_start: 24 - line_stop: 24 - col_start: 12 - col_stop: 25 - path: compiler-test - content: " return v == 2u8 == y;" - span: - line_start: 24 - line_stop: 24 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " return v == 2u8 == y;" - span: - line_start: 20 - line_stop: 25 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 20 - line_stop: 25 - 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\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}": - circuit_name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}" - 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\":\"test_me\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function test_me(mut self) -> u8 {\\\"}\"}" - input: - - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":22,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function test_me(mut self) -> u8 {\\\"}\"}" - output: - IntegerType: U8 - 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.x += 1;\\\"}\"}" - accesses: - - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " self.x += 1;" - value: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 20 - path: compiler-test - content: " self.x += 1;" - right: - Value: - Implicit: - - "1" - - line_start: 7 - line_stop: 7 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " self.x += 1;" - op: Add - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 20 - path: compiler-test - content: " self.x += 1;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 20 - path: compiler-test - content: " self.x += 1;" - - Return: - expression: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 16 - col_stop: 22 - path: compiler-test - content: " return self.x;" - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 22 - path: compiler-test - content: " return self.x;" - span: - line_start: 6 - line_stop: 9 - col_start: 38 - col_stop: 6 - path: compiler-test - content: " function test_me(mut self) -> u8 {\n...\n }" - span: - line_start: 6 - line_stop: 9 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function test_me(mut self) -> u8 {\n...\n }\n" - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new() -> Self {\\\"}\"}" - input: [] - output: - Circuit: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}" - block: - statements: - - Return: - expression: - CircuitInit: - name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}" - members: - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { x: 1u8 };\\\"}\"}" - expression: - Value: - Integer: - - U8 - - "1" - - line_start: 12 - line_stop: 12 - col_start: 26 - col_stop: 29 - path: compiler-test - content: " return Self { x: 1u8 };" - span: - line_start: 12 - line_stop: 12 - col_start: 16 - col_stop: 31 - path: compiler-test - content: " return Self { x: 1u8 };" - span: - line_start: 12 - line_stop: 12 - col_start: 9 - col_stop: 31 - path: compiler-test - content: " return Self { x: 1u8 };" - span: - line_start: 11 - line_stop: 13 - col_start: 28 - col_stop: 6 - path: compiler-test - content: " function new() -> Self {\n...\n }" - span: - line_start: 11 - line_stop: 13 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function new() -> Self {\n...\n }" - global_consts: {} - functions: - "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}" - input: [] - output: - Circuit: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":21,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}" - block: - statements: - - Return: - expression: - CircuitInit: - name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":10,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return TestMe { x: 0u8 };\\\"}\"}" - members: - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return TestMe { x: 0u8 };\\\"}\"}" - expression: - Value: - Integer: - - U8 - - "0" - - line_start: 17 - line_stop: 17 - col_start: 22 - col_stop: 25 - path: compiler-test - content: " return TestMe { x: 0u8 };" - span: - line_start: 17 - line_stop: 17 - col_start: 10 - col_stop: 27 - path: compiler-test - content: " return TestMe { x: 0u8 };" - span: - line_start: 17 - line_stop: 17 - col_start: 3 - col_stop: 27 - path: compiler-test - content: " return TestMe { x: 0u8 };" - span: - line_start: 16 - line_stop: 18 - col_start: 28 - col_stop: 2 - path: compiler-test - content: "function my_fn() -> TestMe {\n...\n}" - span: - line_start: 16 - line_stop: 18 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function my_fn() -> TestMe {\n...\n}" - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 20 - line_stop: 20 - 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\":\"t\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" - span: - line_start: 21 - line_stop: 21 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - type_: ~ - value: - Call: - function: - CircuitMemberAccess: - circuit: - CircuitInit: - name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" - members: - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" - expression: - Value: - Integer: - - U8 - - "6" - - line_start: 21 - line_stop: 21 - col_start: 26 - col_stop: 29 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - span: - line_start: 21 - line_stop: 21 - col_start: 15 - col_stop: 30 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":31,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" - span: - line_start: 21 - line_stop: 21 - col_start: 15 - col_stop: 38 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - arguments: [] - span: - line_start: 21 - line_stop: 21 - col_start: 15 - col_stop: 40 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - span: - line_start: 21 - line_stop: 21 - col_start: 5 - col_stop: 40 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"u\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" - span: - line_start: 22 - line_stop: 22 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const u = my_fn().test_me();" - type_: ~ - value: - Call: - function: - CircuitMemberAccess: - circuit: - Call: - function: - Identifier: "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":15,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" - arguments: [] - span: - line_start: 22 - line_stop: 22 - col_start: 15 - col_stop: 22 - path: compiler-test - content: " const u = my_fn().test_me();" - name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":23,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" - span: - line_start: 22 - line_stop: 22 - col_start: 15 - col_stop: 30 - path: compiler-test - content: " const u = my_fn().test_me();" - arguments: [] - span: - line_start: 22 - line_stop: 22 - col_start: 15 - col_stop: 32 - path: compiler-test - content: " const u = my_fn().test_me();" - span: - line_start: 22 - line_stop: 22 - col_start: 5 - col_stop: 32 - path: compiler-test - content: " const u = my_fn().test_me();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"v\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const v = TestMe::new().test_me();" - type_: ~ - value: - Call: - function: - CircuitMemberAccess: - circuit: - Call: - function: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" - name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 15 - col_stop: 26 - path: compiler-test - content: " const v = TestMe::new().test_me();" - arguments: [] - span: - line_start: 23 - line_stop: 23 - col_start: 15 - col_stop: 28 - path: compiler-test - content: " const v = TestMe::new().test_me();" - name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":29,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 15 - col_stop: 36 - path: compiler-test - content: " const v = TestMe::new().test_me();" - arguments: [] - span: - line_start: 23 - line_stop: 23 - col_start: 15 - col_stop: 38 - path: compiler-test - content: " const v = TestMe::new().test_me();" - span: - line_start: 23 - line_stop: 23 - col_start: 5 - col_stop: 38 - path: compiler-test - content: " const v = TestMe::new().test_me();" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"v\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return v == 2u8 == y;\\\"}\"}" - right: - Value: - Integer: - - U8 - - "2" - - line_start: 24 - line_stop: 24 - col_start: 17 - col_stop: 20 - path: compiler-test - content: " return v == 2u8 == y;" - op: Eq - span: - line_start: 24 - line_stop: 24 - col_start: 12 - col_stop: 20 - path: compiler-test - content: " return v == 2u8 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return v == 2u8 == y;\\\"}\"}" - op: Eq - span: - line_start: 24 - line_stop: 24 - col_start: 12 - col_stop: 25 - path: compiler-test - content: " return v == 2u8 == y;" - span: - line_start: 24 - line_stop: 24 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " return v == 2u8 == y;" - span: - line_start: 20 - line_stop: 25 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 20 - line_stop: 25 - 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\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}": - circuit_name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}" - 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\":\"test_me\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function test_me(mut self) -> u8 {\\\"}\"}" - input: - - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":22,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function test_me(mut self) -> u8 {\\\"}\"}" - output: - IntegerType: U8 - 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.x += 1;\\\"}\"}" - accesses: - - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " self.x += 1;" - value: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x += 1;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 20 - path: compiler-test - content: " self.x += 1;" - right: - Value: - Integer: - - U8 - - "1" - - line_start: 7 - line_stop: 7 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " self.x += 1;" - op: Add - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 20 - path: compiler-test - content: " self.x += 1;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 20 - path: compiler-test - content: " self.x += 1;" - - Return: - expression: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 16 - col_stop: 22 - path: compiler-test - content: " return self.x;" - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 22 - path: compiler-test - content: " return self.x;" - span: - line_start: 6 - line_stop: 9 - col_start: 38 - col_stop: 6 - path: compiler-test - content: " function test_me(mut self) -> u8 {\n...\n }" - span: - line_start: 6 - line_stop: 9 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function test_me(mut self) -> u8 {\n...\n }\n" - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new() -> Self {\\\"}\"}" - input: [] - output: - Circuit: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}" - block: - statements: - - Return: - expression: - CircuitInit: - name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit TestMe {\\\"}\"}" - members: - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { x: 1u8 };\\\"}\"}" - expression: - Value: - Integer: - - U8 - - "1" - - line_start: 12 - line_stop: 12 - col_start: 26 - col_stop: 29 - path: compiler-test - content: " return Self { x: 1u8 };" - span: - line_start: 12 - line_stop: 12 - col_start: 16 - col_stop: 31 - path: compiler-test - content: " return Self { x: 1u8 };" - span: - line_start: 12 - line_stop: 12 - col_start: 9 - col_stop: 31 - path: compiler-test - content: " return Self { x: 1u8 };" - span: - line_start: 11 - line_stop: 13 - col_start: 28 - col_stop: 6 - path: compiler-test - content: " function new() -> Self {\n...\n }" - span: - line_start: 11 - line_stop: 13 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function new() -> Self {\n...\n }" - global_consts: {} - functions: - "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}" - input: [] - output: - Circuit: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":21,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function my_fn() -> TestMe {\\\"}\"}" - block: - statements: - - Return: - expression: - CircuitInit: - name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":10,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return TestMe { x: 0u8 };\\\"}\"}" - members: - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return TestMe { x: 0u8 };\\\"}\"}" - expression: - Value: - Integer: - - U8 - - "0" - - line_start: 17 - line_stop: 17 - col_start: 22 - col_stop: 25 - path: compiler-test - content: " return TestMe { x: 0u8 };" - span: - line_start: 17 - line_stop: 17 - col_start: 10 - col_stop: 27 - path: compiler-test - content: " return TestMe { x: 0u8 };" - span: - line_start: 17 - line_stop: 17 - col_start: 3 - col_stop: 27 - path: compiler-test - content: " return TestMe { x: 0u8 };" - span: - line_start: 16 - line_stop: 18 - col_start: 28 - col_stop: 2 - path: compiler-test - content: "function my_fn() -> TestMe {\n...\n}" - span: - line_start: 16 - line_stop: 18 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function my_fn() -> TestMe {\n...\n}" - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 20 - line_stop: 20 - 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\":\"t\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" - span: - line_start: 21 - line_stop: 21 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - type_: - IntegerType: U8 - value: - Call: - function: - CircuitMemberAccess: - circuit: - CircuitInit: - name: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" - members: - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" - expression: - Value: - Integer: - - U8 - - "6" - - line_start: 21 - line_stop: 21 - col_start: 26 - col_stop: 29 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - span: - line_start: 21 - line_stop: 21 - col_start: 15 - col_stop: 30 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":31,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const t = TestMe {x: 6u8}.test_me();\\\"}\"}" - span: - line_start: 21 - line_stop: 21 - col_start: 15 - col_stop: 38 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - arguments: [] - span: - line_start: 21 - line_stop: 21 - col_start: 15 - col_stop: 40 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - span: - line_start: 21 - line_stop: 21 - col_start: 5 - col_stop: 40 - path: compiler-test - content: " const t = TestMe {x: 6u8}.test_me();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"u\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" - span: - line_start: 22 - line_stop: 22 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const u = my_fn().test_me();" - type_: - IntegerType: U8 - value: - Call: - function: - CircuitMemberAccess: - circuit: - Call: - function: - Identifier: "{\"name\":\"my_fn\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":15,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" - arguments: [] - span: - line_start: 22 - line_stop: 22 - col_start: 15 - col_stop: 22 - path: compiler-test - content: " const u = my_fn().test_me();" - name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":23,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const u = my_fn().test_me();\\\"}\"}" - span: - line_start: 22 - line_stop: 22 - col_start: 15 - col_stop: 30 - path: compiler-test - content: " const u = my_fn().test_me();" - arguments: [] - span: - line_start: 22 - line_stop: 22 - col_start: 15 - col_stop: 32 - path: compiler-test - content: " const u = my_fn().test_me();" - span: - line_start: 22 - line_stop: 22 - col_start: 5 - col_stop: 32 - path: compiler-test - content: " const u = my_fn().test_me();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"v\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const v = TestMe::new().test_me();" - type_: - IntegerType: U8 - value: - Call: - function: - CircuitMemberAccess: - circuit: - Call: - function: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"TestMe\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" - name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 15 - col_stop: 26 - path: compiler-test - content: " const v = TestMe::new().test_me();" - arguments: [] - span: - line_start: 23 - line_stop: 23 - col_start: 15 - col_stop: 28 - path: compiler-test - content: " const v = TestMe::new().test_me();" - name: "{\"name\":\"test_me\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":29,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const v = TestMe::new().test_me();\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 15 - col_stop: 36 - path: compiler-test - content: " const v = TestMe::new().test_me();" - arguments: [] - span: - line_start: 23 - line_stop: 23 - col_start: 15 - col_stop: 38 - path: compiler-test - content: " const v = TestMe::new().test_me();" - span: - line_start: 23 - line_stop: 23 - col_start: 5 - col_stop: 38 - path: compiler-test - content: " const v = TestMe::new().test_me();" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"v\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return v == 2u8 == y;\\\"}\"}" - right: - Value: - Integer: - - U8 - - "2" - - line_start: 24 - line_stop: 24 - col_start: 17 - col_stop: 20 - path: compiler-test - content: " return v == 2u8 == y;" - op: Eq - span: - line_start: 24 - line_stop: 24 - col_start: 12 - col_stop: 20 - path: compiler-test - content: " return v == 2u8 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return v == 2u8 == y;\\\"}\"}" - op: Eq - span: - line_start: 24 - line_stop: 24 - col_start: 12 - col_stop: 25 - path: compiler-test - content: " return v == 2u8 == y;" - span: - line_start: 24 - line_stop: 24 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " return v == 2u8 == y;" - span: - line_start: 20 - line_stop: 25 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 20 - line_stop: 25 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\n\n\n" + initial_theorem: fb0bd30fe7fb8ec624c04628dc9bc3cfd384515ef0dfe0cfdfd36084f1b592ff + canonicalized_theorem: 9e5badf3fb1cd8940665b9ed9eb0a1e56d89dd0be61fca0436d0a30eb7e4c50c + type_inferenced_theorem: b08b23ad6859b39c79015dc41bfaa7ea5527db980706d1e6fc5e74c634a8b4c1 diff --git a/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out b/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out index 2aea77d43b..a05241d046 100644 --- a/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out +++ b/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out @@ -16,1484 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}": - circuit_name: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" - members: - - CircuitVariable: - - "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" parameters: [u32; 512];\\\"}\"}" - - Array: - - IntegerType: U32 - - - value: "512" - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(parameters: [u32; 512]) -> Self {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(parameters: [u32; 512]) -> Self {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: U32 - - - value: "512" - span: - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 28 - path: compiler-test - content: " function new(parameters: [u32; 512]) -> 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 { parameters: parameters };\\\"}\"}" - members: - - identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":23,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}" - expression: - Identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":35,\\\"col_stop\\\":45,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 47 - path: compiler-test - content: " return Self { parameters: parameters };" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 47 - path: compiler-test - content: " return Self { parameters: parameters };" - span: - line_start: 6 - line_stop: 8 - col_start: 50 - col_stop: 6 - path: compiler-test - content: " function new(parameters: [u32; 512]) -> Self {\n...\n }" - span: - line_start: 6 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function new(parameters: [u32; 512]) -> Self {\n...\n }" - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" - input: - - ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":19,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" - - Variable: - identifier: "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":31,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Boolean - - - value: "512" - span: - line_start: 10 - line_stop: 10 - col_start: 31 - col_stop: 35 - path: compiler-test - content: " function hash(const self, bits: [bool; 512]) -> u32 {" - output: - IntegerType: U32 - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let digest: u32 = 0;\\\"}\"}" - span: - line_start: 11 - line_stop: 11 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " let digest: u32 = 0;" - type_: - IntegerType: U32 - value: - Value: - Implicit: - - "0" - - line_start: 11 - line_stop: 11 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " let digest: u32 = 0;" - span: - line_start: 11 - line_stop: 11 - col_start: 9 - col_stop: 28 - path: compiler-test - content: " let digest: u32 = 0;" - - Iteration: - variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..512 {\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 12 - line_stop: 12 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " for i in 0..512 {" - stop: - Value: - Implicit: - - "512" - - line_start: 12 - line_stop: 12 - col_start: 21 - col_stop: 24 - path: compiler-test - content: " for i in 0..512 {" - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"base\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - type_: ~ - value: - Ternary: - condition: - ArrayAccess: - array: - Identifier: "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - index: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 24 - col_stop: 31 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - if_true: - ArrayAccess: - array: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":34,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - name: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":39,\\\"col_stop\\\":49,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 34 - col_stop: 49 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - index: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":50,\\\"col_stop\\\":51,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 34 - col_stop: 52 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - if_false: - Value: - Integer: - - U32 - - "0" - - line_start: 13 - line_stop: 13 - col_start: 55 - col_stop: 59 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - span: - line_start: 13 - line_stop: 13 - col_start: 24 - col_stop: 59 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - span: - line_start: 13 - line_stop: 13 - col_start: 13 - col_stop: 59 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - - Assign: - operation: Add - assignee: - identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" - accesses: [] - span: - line_start: 14 - line_stop: 14 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " digest += base;" - value: - Identifier: "{\"name\":\"base\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":23,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" - span: - line_start: 14 - line_stop: 14 - col_start: 13 - col_stop: 27 - path: compiler-test - content: " digest += base;" - span: - line_start: 12 - line_stop: 15 - col_start: 25 - col_stop: 10 - path: compiler-test - content: " for i in 0..512 {\n...\n }" - span: - line_start: 12 - line_stop: 15 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " for i in 0..512 {\n...\n }\n" - - Return: - expression: - Identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":16,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return digest;\\\"}\"}" - span: - line_start: 16 - line_stop: 16 - col_start: 9 - col_stop: 22 - path: compiler-test - content: " return digest;" - span: - line_start: 10 - line_stop: 17 - col_start: 57 - col_stop: 6 - path: compiler-test - content: " function hash(const self, bits: [bool; 512]) -> u32 {\n...\n }" - span: - line_start: 10 - line_stop: 17 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function hash(const self, bits: [bool; 512]) -> u32 {\n...\n }\n\n\n\n\n" - global_consts: {} - functions: - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":15,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Boolean - - - value: "512" - span: - line_start: 21 - line_stop: 21 - col_start: 15 - col_stop: 25 - path: compiler-test - content: "function main(hash_input: [bool; 512]) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":11,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const parameters = [0u32; 512];\\\"}\"}" - span: - line_start: 22 - line_stop: 22 - col_start: 11 - col_stop: 21 - path: compiler-test - content: " const parameters = [0u32; 512];" - type_: ~ - value: - ArrayInit: - element: - Value: - Integer: - - U32 - - "0" - - line_start: 22 - line_stop: 22 - col_start: 25 - col_stop: 29 - path: compiler-test - content: " const parameters = [0u32; 512];" - dimensions: - - value: "512" - span: - line_start: 22 - line_stop: 22 - col_start: 24 - col_stop: 35 - path: compiler-test - content: " const parameters = [0u32; 512];" - span: - line_start: 22 - line_stop: 22 - col_start: 5 - col_stop: 35 - path: compiler-test - content: " const parameters = [0u32; 512];" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 11 - col_stop: 19 - path: compiler-test - content: " const pedersen = PedersenHash::new(parameters);" - type_: ~ - value: - Call: - function: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":22,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" - name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":36,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 22 - col_stop: 39 - path: compiler-test - content: " const pedersen = PedersenHash::new(parameters);" - arguments: - - Identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":40,\\\"col_stop\\\":50,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 22 - col_stop: 51 - path: compiler-test - content: " const pedersen = PedersenHash::new(parameters);" - span: - line_start: 23 - line_stop: 23 - col_start: 5 - col_stop: 51 - path: compiler-test - content: " const pedersen = PedersenHash::new(parameters);" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"res\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" - span: - line_start: 24 - line_stop: 24 - col_start: 9 - col_stop: 12 - path: compiler-test - content: " let res = pedersen.hash(hash_input);" - type_: ~ - value: - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":15,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" - name: "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" - span: - line_start: 24 - line_stop: 24 - col_start: 15 - col_stop: 28 - path: compiler-test - content: " let res = pedersen.hash(hash_input);" - arguments: - - Identifier: "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":29,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" - span: - line_start: 24 - line_stop: 24 - col_start: 15 - col_stop: 40 - path: compiler-test - content: " let res = pedersen.hash(hash_input);" - span: - line_start: 24 - line_stop: 24 - col_start: 5 - col_stop: 40 - path: compiler-test - content: " let res = pedersen.hash(hash_input);" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"res\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return res == 0u32;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "0" - - line_start: 26 - line_stop: 26 - col_start: 19 - col_stop: 23 - path: compiler-test - content: " return res == 0u32;" - op: Eq - span: - line_start: 26 - line_stop: 26 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return res == 0u32;" - span: - line_start: 26 - line_stop: 26 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return res == 0u32;" - span: - line_start: 21 - line_stop: 27 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(hash_input: [bool; 512]) -> bool {\n...\n}" - span: - line_start: 21 - line_stop: 27 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(hash_input: [bool; 512]) -> bool {\n...\n}\n\n\n\n" - canonicalized_theorem: - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}": - circuit_name: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" - members: - - CircuitVariable: - - "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" parameters: [u32; 512];\\\"}\"}" - - Array: - - IntegerType: U32 - - - value: "512" - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(parameters: [u32; 512]) -> Self {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(parameters: [u32; 512]) -> Self {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: U32 - - - value: "512" - span: - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 28 - path: compiler-test - content: " function new(parameters: [u32; 512]) -> Self {" - output: - Circuit: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" - block: - statements: - - Return: - expression: - CircuitInit: - name: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" - members: - - identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":23,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}" - expression: - Identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":35,\\\"col_stop\\\":45,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 47 - path: compiler-test - content: " return Self { parameters: parameters };" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 47 - path: compiler-test - content: " return Self { parameters: parameters };" - span: - line_start: 6 - line_stop: 8 - col_start: 50 - col_stop: 6 - path: compiler-test - content: " function new(parameters: [u32; 512]) -> Self {\n...\n }" - span: - line_start: 6 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function new(parameters: [u32; 512]) -> Self {\n...\n }" - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" - input: - - ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":19,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" - - Variable: - identifier: "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":31,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Boolean - - - value: "512" - span: - line_start: 10 - line_stop: 10 - col_start: 31 - col_stop: 35 - path: compiler-test - content: " function hash(const self, bits: [bool; 512]) -> u32 {" - output: - IntegerType: U32 - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let digest: u32 = 0;\\\"}\"}" - span: - line_start: 11 - line_stop: 11 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " let digest: u32 = 0;" - type_: - IntegerType: U32 - value: - Value: - Implicit: - - "0" - - line_start: 11 - line_stop: 11 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " let digest: u32 = 0;" - span: - line_start: 11 - line_stop: 11 - col_start: 9 - col_stop: 28 - path: compiler-test - content: " let digest: u32 = 0;" - - Iteration: - variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..512 {\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 12 - line_stop: 12 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " for i in 0..512 {" - stop: - Value: - Implicit: - - "512" - - line_start: 12 - line_stop: 12 - col_start: 21 - col_stop: 24 - path: compiler-test - content: " for i in 0..512 {" - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"base\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - type_: ~ - value: - Ternary: - condition: - ArrayAccess: - array: - Identifier: "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - index: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 24 - col_stop: 31 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - if_true: - ArrayAccess: - array: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":34,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - name: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":39,\\\"col_stop\\\":49,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 34 - col_stop: 49 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - index: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":50,\\\"col_stop\\\":51,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 34 - col_stop: 52 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - if_false: - Value: - Integer: - - U32 - - "0" - - line_start: 13 - line_stop: 13 - col_start: 55 - col_stop: 59 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - span: - line_start: 13 - line_stop: 13 - col_start: 24 - col_stop: 59 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - span: - line_start: 13 - line_stop: 13 - col_start: 13 - col_stop: 59 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" - accesses: [] - span: - line_start: 14 - line_stop: 14 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " digest += base;" - value: - Binary: - left: - Identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" - right: - Identifier: "{\"name\":\"base\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":23,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" - op: Add - span: - line_start: 14 - line_stop: 14 - col_start: 13 - col_stop: 27 - path: compiler-test - content: " digest += base;" - span: - line_start: 14 - line_stop: 14 - col_start: 13 - col_stop: 27 - path: compiler-test - content: " digest += base;" - span: - line_start: 12 - line_stop: 15 - col_start: 25 - col_stop: 10 - path: compiler-test - content: " for i in 0..512 {\n...\n }" - span: - line_start: 12 - line_stop: 15 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " for i in 0..512 {\n...\n }\n" - - Return: - expression: - Identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":16,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return digest;\\\"}\"}" - span: - line_start: 16 - line_stop: 16 - col_start: 9 - col_stop: 22 - path: compiler-test - content: " return digest;" - span: - line_start: 10 - line_stop: 17 - col_start: 57 - col_stop: 6 - path: compiler-test - content: " function hash(const self, bits: [bool; 512]) -> u32 {\n...\n }" - span: - line_start: 10 - line_stop: 17 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function hash(const self, bits: [bool; 512]) -> u32 {\n...\n }\n\n\n\n\n" - global_consts: {} - functions: - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":15,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Boolean - - - value: "512" - span: - line_start: 21 - line_stop: 21 - col_start: 15 - col_stop: 25 - path: compiler-test - content: "function main(hash_input: [bool; 512]) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":11,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const parameters = [0u32; 512];\\\"}\"}" - span: - line_start: 22 - line_stop: 22 - col_start: 11 - col_stop: 21 - path: compiler-test - content: " const parameters = [0u32; 512];" - type_: ~ - value: - ArrayInit: - element: - Value: - Integer: - - U32 - - "0" - - line_start: 22 - line_stop: 22 - col_start: 25 - col_stop: 29 - path: compiler-test - content: " const parameters = [0u32; 512];" - dimensions: - - value: "512" - span: - line_start: 22 - line_stop: 22 - col_start: 24 - col_stop: 35 - path: compiler-test - content: " const parameters = [0u32; 512];" - span: - line_start: 22 - line_stop: 22 - col_start: 5 - col_stop: 35 - path: compiler-test - content: " const parameters = [0u32; 512];" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 11 - col_stop: 19 - path: compiler-test - content: " const pedersen = PedersenHash::new(parameters);" - type_: ~ - value: - Call: - function: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":22,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" - name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":36,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 22 - col_stop: 39 - path: compiler-test - content: " const pedersen = PedersenHash::new(parameters);" - arguments: - - Identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":40,\\\"col_stop\\\":50,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 22 - col_stop: 51 - path: compiler-test - content: " const pedersen = PedersenHash::new(parameters);" - span: - line_start: 23 - line_stop: 23 - col_start: 5 - col_stop: 51 - path: compiler-test - content: " const pedersen = PedersenHash::new(parameters);" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"res\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" - span: - line_start: 24 - line_stop: 24 - col_start: 9 - col_stop: 12 - path: compiler-test - content: " let res = pedersen.hash(hash_input);" - type_: ~ - value: - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":15,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" - name: "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" - span: - line_start: 24 - line_stop: 24 - col_start: 15 - col_stop: 28 - path: compiler-test - content: " let res = pedersen.hash(hash_input);" - arguments: - - Identifier: "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":29,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" - span: - line_start: 24 - line_stop: 24 - col_start: 15 - col_stop: 40 - path: compiler-test - content: " let res = pedersen.hash(hash_input);" - span: - line_start: 24 - line_stop: 24 - col_start: 5 - col_stop: 40 - path: compiler-test - content: " let res = pedersen.hash(hash_input);" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"res\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return res == 0u32;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "0" - - line_start: 26 - line_stop: 26 - col_start: 19 - col_stop: 23 - path: compiler-test - content: " return res == 0u32;" - op: Eq - span: - line_start: 26 - line_stop: 26 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return res == 0u32;" - span: - line_start: 26 - line_stop: 26 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return res == 0u32;" - span: - line_start: 21 - line_stop: 27 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(hash_input: [bool; 512]) -> bool {\n...\n}" - span: - line_start: 21 - line_stop: 27 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(hash_input: [bool; 512]) -> bool {\n...\n}\n\n\n\n" - type_inferenced_theorem: - name: test - expected_input: [] - imports: [] - circuits: - "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}": - circuit_name: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" - members: - - CircuitVariable: - - "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" parameters: [u32; 512];\\\"}\"}" - - Array: - - IntegerType: U32 - - - value: "512" - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(parameters: [u32; 512]) -> Self {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(parameters: [u32; 512]) -> Self {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: U32 - - - value: "512" - span: - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 28 - path: compiler-test - content: " function new(parameters: [u32; 512]) -> Self {" - output: - Circuit: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" - block: - statements: - - Return: - expression: - CircuitInit: - name: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" - members: - - identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":23,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}" - expression: - Identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":35,\\\"col_stop\\\":45,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 47 - path: compiler-test - content: " return Self { parameters: parameters };" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 47 - path: compiler-test - content: " return Self { parameters: parameters };" - span: - line_start: 6 - line_stop: 8 - col_start: 50 - col_stop: 6 - path: compiler-test - content: " function new(parameters: [u32; 512]) -> Self {\n...\n }" - span: - line_start: 6 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function new(parameters: [u32; 512]) -> Self {\n...\n }" - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" - input: - - ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":19,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" - - Variable: - identifier: "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":31,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function hash(const self, bits: [bool; 512]) -> u32 {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Boolean - - - value: "512" - span: - line_start: 10 - line_stop: 10 - col_start: 31 - col_stop: 35 - path: compiler-test - content: " function hash(const self, bits: [bool; 512]) -> u32 {" - output: - IntegerType: U32 - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let digest: u32 = 0;\\\"}\"}" - span: - line_start: 11 - line_stop: 11 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " let digest: u32 = 0;" - type_: - IntegerType: U32 - value: - Value: - Integer: - - U32 - - "0" - - line_start: 11 - line_stop: 11 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " let digest: u32 = 0;" - span: - line_start: 11 - line_stop: 11 - col_start: 9 - col_stop: 28 - path: compiler-test - content: " let digest: u32 = 0;" - - Iteration: - variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..512 {\\\"}\"}" - start: - Value: - Integer: - - U32 - - "0" - - line_start: 12 - line_stop: 12 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " for i in 0..512 {" - stop: - Value: - Integer: - - U32 - - "512" - - line_start: 12 - line_stop: 12 - col_start: 21 - col_stop: 24 - path: compiler-test - content: " for i in 0..512 {" - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"base\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - type_: - IntegerType: U32 - value: - Ternary: - condition: - ArrayAccess: - array: - Identifier: "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - index: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 24 - col_stop: 31 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - if_true: - ArrayAccess: - array: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":34,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - name: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":39,\\\"col_stop\\\":49,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 34 - col_stop: 49 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - index: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":50,\\\"col_stop\\\":51,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let base = bits[i] ? self.parameters[i] : 0u32;\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 34 - col_stop: 52 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - if_false: - Value: - Integer: - - U32 - - "0" - - line_start: 13 - line_stop: 13 - col_start: 55 - col_stop: 59 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - span: - line_start: 13 - line_stop: 13 - col_start: 24 - col_stop: 59 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - span: - line_start: 13 - line_stop: 13 - col_start: 13 - col_stop: 59 - path: compiler-test - content: " let base = bits[i] ? self.parameters[i] : 0u32;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" - accesses: [] - span: - line_start: 14 - line_stop: 14 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " digest += base;" - value: - Binary: - left: - Identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" - right: - Identifier: "{\"name\":\"base\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":23,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" digest += base;\\\"}\"}" - op: Add - span: - line_start: 14 - line_stop: 14 - col_start: 13 - col_stop: 27 - path: compiler-test - content: " digest += base;" - span: - line_start: 14 - line_stop: 14 - col_start: 13 - col_stop: 27 - path: compiler-test - content: " digest += base;" - span: - line_start: 12 - line_stop: 15 - col_start: 25 - col_stop: 10 - path: compiler-test - content: " for i in 0..512 {\n...\n }" - span: - line_start: 12 - line_stop: 15 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " for i in 0..512 {\n...\n }\n" - - Return: - expression: - Identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":16,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return digest;\\\"}\"}" - span: - line_start: 16 - line_stop: 16 - col_start: 9 - col_stop: 22 - path: compiler-test - content: " return digest;" - span: - line_start: 10 - line_stop: 17 - col_start: 57 - col_stop: 6 - path: compiler-test - content: " function hash(const self, bits: [bool; 512]) -> u32 {\n...\n }" - span: - line_start: 10 - line_stop: 17 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function hash(const self, bits: [bool; 512]) -> u32 {\n...\n }\n\n\n\n\n" - global_consts: {} - functions: - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":15,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 512]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Boolean - - - value: "512" - span: - line_start: 21 - line_stop: 21 - col_start: 15 - col_stop: 25 - path: compiler-test - content: "function main(hash_input: [bool; 512]) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":11,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const parameters = [0u32; 512];\\\"}\"}" - span: - line_start: 22 - line_stop: 22 - col_start: 11 - col_stop: 21 - path: compiler-test - content: " const parameters = [0u32; 512];" - type_: - Array: - - IntegerType: U32 - - - value: "512" - value: - ArrayInit: - element: - Value: - Integer: - - U32 - - "0" - - line_start: 22 - line_stop: 22 - col_start: 25 - col_stop: 29 - path: compiler-test - content: " const parameters = [0u32; 512];" - dimensions: - - value: "512" - span: - line_start: 22 - line_stop: 22 - col_start: 24 - col_stop: 35 - path: compiler-test - content: " const parameters = [0u32; 512];" - span: - line_start: 22 - line_stop: 22 - col_start: 5 - col_stop: 35 - path: compiler-test - content: " const parameters = [0u32; 512];" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 11 - col_stop: 19 - path: compiler-test - content: " const pedersen = PedersenHash::new(parameters);" - type_: - Circuit: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}" - value: - Call: - function: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":22,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" - name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":36,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 22 - col_stop: 39 - path: compiler-test - content: " const pedersen = PedersenHash::new(parameters);" - arguments: - - Identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":40,\\\"col_stop\\\":50,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" - span: - line_start: 23 - line_stop: 23 - col_start: 22 - col_stop: 51 - path: compiler-test - content: " const pedersen = PedersenHash::new(parameters);" - span: - line_start: 23 - line_stop: 23 - col_start: 5 - col_stop: 51 - path: compiler-test - content: " const pedersen = PedersenHash::new(parameters);" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"res\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" - span: - line_start: 24 - line_stop: 24 - col_start: 9 - col_stop: 12 - path: compiler-test - content: " let res = pedersen.hash(hash_input);" - type_: - IntegerType: U32 - value: - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":15,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" - name: "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" - span: - line_start: 24 - line_stop: 24 - col_start: 15 - col_stop: 28 - path: compiler-test - content: " let res = pedersen.hash(hash_input);" - arguments: - - Identifier: "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":29,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let res = pedersen.hash(hash_input);\\\"}\"}" - span: - line_start: 24 - line_stop: 24 - col_start: 15 - col_stop: 40 - path: compiler-test - content: " let res = pedersen.hash(hash_input);" - span: - line_start: 24 - line_stop: 24 - col_start: 5 - col_stop: 40 - path: compiler-test - content: " let res = pedersen.hash(hash_input);" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"res\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return res == 0u32;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "0" - - line_start: 26 - line_stop: 26 - col_start: 19 - col_stop: 23 - path: compiler-test - content: " return res == 0u32;" - op: Eq - span: - line_start: 26 - line_stop: 26 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return res == 0u32;" - span: - line_start: 26 - line_stop: 26 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return res == 0u32;" - span: - line_start: 21 - line_stop: 27 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(hash_input: [bool; 512]) -> bool {\n...\n}" - span: - line_start: 21 - line_stop: 27 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(hash_input: [bool; 512]) -> bool {\n...\n}\n\n\n\n" + initial_theorem: e04195ede456babe4121950806163d2cc8c1e4b0180a37969099749ae3dfc3b9 + canonicalized_theorem: a8673bb8b05eb0289435b8b2335402f022df9ff46db523707cc61eca1b9679ad + type_inferenced_theorem: afeabed72941728dc8a8cc0ed27d1e8170f7dd477275be29e794b6c28142f2a7 diff --git a/tests/expectations/compiler/compiler/circuits/self_member.leo.out b/tests/expectations/compiler/compiler/circuits/self_member.leo.out index 6362b2de99..51a0e0b655 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member.leo.out @@ -16,656 +16,6 @@ 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" + initial_theorem: 8865aeec0e88fe9923a55ba568c6615db5dcec6c2cfc127ecd2920b11e3455f7 + canonicalized_theorem: 8865aeec0e88fe9923a55ba568c6615db5dcec6c2cfc127ecd2920b11e3455f7 + type_inferenced_theorem: 3b24858f79ee4f4f795107ccf916d64b957cb0c81cfa4573c2cb5645b0541ef7 diff --git a/tests/expectations/compiler/compiler/console/assert.leo.out b/tests/expectations/compiler/compiler/console/assert.leo.out index dfce25db88..71b1b333e0 100644 --- a/tests/expectations/compiler/compiler/console/assert.leo.out +++ b/tests/expectations/compiler/compiler/console/assert.leo.out @@ -16,306 +16,6 @@ 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" + initial_theorem: 70bf9e6efa84336b4d023dd5484ad15897678c9d4851b5d7cfdb8cb6b79facaa + canonicalized_theorem: 70bf9e6efa84336b4d023dd5484ad15897678c9d4851b5d7cfdb8cb6b79facaa + type_inferenced_theorem: b410b94ea2070cbfe393229700288a461896a65bb84feed3c0a006aae04566f8 diff --git a/tests/expectations/compiler/compiler/console/conditional_assert.leo.out b/tests/expectations/compiler/compiler/console/conditional_assert.leo.out index c32c1f786a..b56a436129 100644 --- a/tests/expectations/compiler/compiler/console/conditional_assert.leo.out +++ b/tests/expectations/compiler/compiler/console/conditional_assert.leo.out @@ -16,398 +16,6 @@ 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" + initial_theorem: d6aad3c859ad1b7f4d3d258c9489cd5a4c26b3a36b10b40dd823c976fb3e1000 + canonicalized_theorem: 0291e08f42b60c0ef76f666e610bc7ef850f22e3cb849088f516e2feb312cf6e + type_inferenced_theorem: f414dd49f054e54d564501fa52bb266dd152d8c32a84dd54b61f782380d02dbe diff --git a/tests/expectations/compiler/compiler/console/debug.leo.out b/tests/expectations/compiler/compiler/console/debug.leo.out index b5d85a9473..91b471cf04 100644 --- a/tests/expectations/compiler/compiler/console/debug.leo.out +++ b/tests/expectations/compiler/compiler/console/debug.leo.out @@ -16,273 +16,6 @@ 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" + initial_theorem: 40014c8e30c3aa703f4f0362a16df094a45d5f0df5a94dc26e96d87170784df7 + canonicalized_theorem: 40014c8e30c3aa703f4f0362a16df094a45d5f0df5a94dc26e96d87170784df7 + type_inferenced_theorem: fb64ba6e32355ee6df3bd9942ca209f35714ce61511a9b8b867a1587518647a8 diff --git a/tests/expectations/compiler/compiler/console/error.leo.out b/tests/expectations/compiler/compiler/console/error.leo.out index 7b9e61dadc..4c0c7a8654 100644 --- a/tests/expectations/compiler/compiler/console/error.leo.out +++ b/tests/expectations/compiler/compiler/console/error.leo.out @@ -16,273 +16,6 @@ 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" + initial_theorem: 2c41e0c55e5a64fd04160a56adf627d90cdbf665ebf1a0fec4a2b9049234652a + canonicalized_theorem: 2c41e0c55e5a64fd04160a56adf627d90cdbf665ebf1a0fec4a2b9049234652a + type_inferenced_theorem: fa6ccd4112e58ba2e97f3e600dd5d4858c45bb39a858bdd1b1867f494758cbca diff --git a/tests/expectations/compiler/compiler/console/log.leo.out b/tests/expectations/compiler/compiler/console/log.leo.out index f63951cffd..258d7ac353 100644 --- a/tests/expectations/compiler/compiler/console/log.leo.out +++ b/tests/expectations/compiler/compiler/console/log.leo.out @@ -16,273 +16,6 @@ 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" + initial_theorem: e239286adc6d00ad3d4328d5911a60d5cf05612610f994faf05208420aa1ca6a + canonicalized_theorem: e239286adc6d00ad3d4328d5911a60d5cf05612610f994faf05208420aa1ca6a + type_inferenced_theorem: 8d10cefa3e8eb8f7d5668cb153ebc4574ca591905ab22f9ff7c81cb1be0fb110 diff --git a/tests/expectations/compiler/compiler/console/log_conditional.leo.out b/tests/expectations/compiler/compiler/console/log_conditional.leo.out index c5c3326d29..5b93468952 100644 --- a/tests/expectations/compiler/compiler/console/log_conditional.leo.out +++ b/tests/expectations/compiler/compiler/console/log_conditional.leo.out @@ -22,402 +22,6 @@ 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" + initial_theorem: d81597e32ce19fd62ae7043b42bbd3fd71980c74b913081cb7ed65a249efea67 + canonicalized_theorem: d81597e32ce19fd62ae7043b42bbd3fd71980c74b913081cb7ed65a249efea67 + type_inferenced_theorem: 5e163645d00884a3abf845af25115c2479d13517733d42f2a11c092d040d83e8 diff --git a/tests/expectations/compiler/compiler/console/log_input.leo.out b/tests/expectations/compiler/compiler/console/log_input.leo.out index 89ba5907a8..31042dc35f 100644 --- a/tests/expectations/compiler/compiler/console/log_input.leo.out +++ b/tests/expectations/compiler/compiler/console/log_input.leo.out @@ -16,279 +16,6 @@ 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" + initial_theorem: f2a4b944ccecd2be35bab0a4922fb96595b75007db6c35f4be3a1aac08426f9e + canonicalized_theorem: f2a4b944ccecd2be35bab0a4922fb96595b75007db6c35f4be3a1aac08426f9e + type_inferenced_theorem: bb0b9193a4d3b6d9a91a56820f902c17f0b64705cd6d85cb942479952ec95fab diff --git a/tests/expectations/compiler/compiler/console/log_parameter.leo.out b/tests/expectations/compiler/compiler/console/log_parameter.leo.out index f0fae22697..63eb87c919 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter.leo.out @@ -16,306 +16,6 @@ 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" + initial_theorem: 057e2a8b0841e05d95c13c39d259a26fc12091362ef60f7291329a1a82f0af5e + canonicalized_theorem: 057e2a8b0841e05d95c13c39d259a26fc12091362ef60f7291329a1a82f0af5e + type_inferenced_theorem: 054b00815c79679a877ab34a89a5dbd27771f5896984c684bcc43a74c5792b32 diff --git a/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out index 1df965e2f3..b93e007400 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out @@ -16,339 +16,6 @@ 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" + initial_theorem: ca762bf3526c963a715e0b3ba8f439fde8cfc3466c92e8a76fd3fd78f3dcdcdb + canonicalized_theorem: ca762bf3526c963a715e0b3ba8f439fde8cfc3466c92e8a76fd3fd78f3dcdcdb + type_inferenced_theorem: 9d00a752fd798ce8b44834df8ed766eb9acd737fade0ed6af938f668c3560a25 diff --git a/tests/expectations/compiler/compiler/definition/out_of_order.leo.out b/tests/expectations/compiler/compiler/definition/out_of_order.leo.out index 0afe69e606..f943ffea6f 100644 --- a/tests/expectations/compiler/compiler/definition/out_of_order.leo.out +++ b/tests/expectations/compiler/compiler/definition/out_of_order.leo.out @@ -16,314 +16,6 @@ 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}" + initial_theorem: a60a2c808f9c8b475e8d4917307e483db1742b5baade6e826e56d848520f24a4 + canonicalized_theorem: 9845ae56693cf58d9c1283d2bf2d1d5e8f2be7c2d018cbb689a6fb09ba952451 + type_inferenced_theorem: aae7a9954e18cf849f41af233cedd6a472cdd59c6dfdfe25a2433f0a6eaf43c8 diff --git a/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out b/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out index 5da5abd884..2733fc95a8 100644 --- a/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out +++ b/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out @@ -16,458 +16,6 @@ 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}" + initial_theorem: a62620cae9946643df9ed0991a0f5134e786fac8d561fb15a33d710cf546799c + canonicalized_theorem: 1dc02f76c11beb5dfadc9b3d1f5423ad2bce40502600a42de066a88f97188ed4 + type_inferenced_theorem: 41e32609589c1bcb33e9dcaea9864e8868b5d2028b65924a3145b3aae7c6166a diff --git a/tests/expectations/compiler/compiler/field/add.leo.out b/tests/expectations/compiler/compiler/field/add.leo.out index c38310a3c5..9a8e03fb72 100644 --- a/tests/expectations/compiler/compiler/field/add.leo.out +++ b/tests/expectations/compiler/compiler/field/add.leo.out @@ -16,297 +16,6 @@ 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}" + initial_theorem: 59a25bf44613617124a4aa8ea169751c096fb50c5e3797bfe33705febc4fe10d + canonicalized_theorem: 59a25bf44613617124a4aa8ea169751c096fb50c5e3797bfe33705febc4fe10d + type_inferenced_theorem: f8e5c1c95937d6f7bd04e009d65f2345281dd68e1669b2ecf740f4b071b106f6 diff --git a/tests/expectations/compiler/compiler/field/div.leo.out b/tests/expectations/compiler/compiler/field/div.leo.out index 7fbd756b76..d9d293e59a 100644 --- a/tests/expectations/compiler/compiler/field/div.leo.out +++ b/tests/expectations/compiler/compiler/field/div.leo.out @@ -16,297 +16,6 @@ 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}" + initial_theorem: 6fe0af537868b537a8e6b410439b669012cd211fdb988d8457ce6d893d579bfe + canonicalized_theorem: 6fe0af537868b537a8e6b410439b669012cd211fdb988d8457ce6d893d579bfe + type_inferenced_theorem: 8020277aecd403a5edbd722c320f25cdbd5ba5f930ea4e427929ab7373db8894 diff --git a/tests/expectations/compiler/compiler/field/eq.leo.out b/tests/expectations/compiler/compiler/field/eq.leo.out index f1e4bf7630..46005f0560 100644 --- a/tests/expectations/compiler/compiler/field/eq.leo.out +++ b/tests/expectations/compiler/compiler/field/eq.leo.out @@ -16,225 +16,6 @@ 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}" + initial_theorem: ed504c4658bfd6d096a4f17fb16bdc8a587b6c91fc669ade95179d8792b1f4ea + canonicalized_theorem: ed504c4658bfd6d096a4f17fb16bdc8a587b6c91fc669ade95179d8792b1f4ea + type_inferenced_theorem: 920bb42e0ece95f8cd9f343296389f13255b1c3de14f5e13dfd17ff6d82b7137 diff --git a/tests/expectations/compiler/compiler/field/field.leo.out b/tests/expectations/compiler/compiler/field/field.leo.out index 8ed520a566..87a6bce7c1 100644 --- a/tests/expectations/compiler/compiler/field/field.leo.out +++ b/tests/expectations/compiler/compiler/field/field.leo.out @@ -16,369 +16,6 @@ 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" + initial_theorem: 54be6c6fb3a49c107d7933f6d0db4e7f54f7db4afc0a77d1bc052cc1b542c96a + canonicalized_theorem: 54be6c6fb3a49c107d7933f6d0db4e7f54f7db4afc0a77d1bc052cc1b542c96a + type_inferenced_theorem: 849caf4c6446fd4a2360d48bcaf00af8ae24844e9e1aca30c34e77c0e5470d19 diff --git a/tests/expectations/compiler/compiler/field/mul.leo.out b/tests/expectations/compiler/compiler/field/mul.leo.out index dd8098121f..80963f2f6f 100644 --- a/tests/expectations/compiler/compiler/field/mul.leo.out +++ b/tests/expectations/compiler/compiler/field/mul.leo.out @@ -16,297 +16,6 @@ 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}" + initial_theorem: d17e4bd13c8e5f3f01cdf41bddde1d8aec876f28b1756b74a78b525d0e97ea09 + canonicalized_theorem: d17e4bd13c8e5f3f01cdf41bddde1d8aec876f28b1756b74a78b525d0e97ea09 + type_inferenced_theorem: d8db1d4d4fb8b6de4e25a458bfe2cc29d100cf959b294a76086d4cbcb209e4c6 diff --git a/tests/expectations/compiler/compiler/field/negate.leo.out b/tests/expectations/compiler/compiler/field/negate.leo.out index e6d6f78c8e..917d8c1348 100644 --- a/tests/expectations/compiler/compiler/field/negate.leo.out +++ b/tests/expectations/compiler/compiler/field/negate.leo.out @@ -16,285 +16,6 @@ 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}" + initial_theorem: 25f48855e80d5d6e0a6fe71d388d7eafd0559bd9b4c320ccb6a2c8af874352fa + canonicalized_theorem: 25f48855e80d5d6e0a6fe71d388d7eafd0559bd9b4c320ccb6a2c8af874352fa + type_inferenced_theorem: c43f0ac3e0fcb4580dac447b16530ac89d166c95a7a9497a274020c6d4ec75fb diff --git a/tests/expectations/compiler/compiler/function/array_input.leo.out b/tests/expectations/compiler/compiler/function/array_input.leo.out index 434e041669..45120a3dad 100644 --- a/tests/expectations/compiler/compiler/function/array_input.leo.out +++ b/tests/expectations/compiler/compiler/function/array_input.leo.out @@ -16,519 +16,6 @@ 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" + initial_theorem: cbf1d3fe0106bda529af2912783d2ea0505b9d3780f5ca6954c1caaf3381543a + canonicalized_theorem: 711c249e5b0c1ac7f8e9dd96e13bdf1c7449f2f0afa994b9c6430f91b40072a9 + type_inferenced_theorem: a96aab38c2fa75d08da2a17ed91efd8128067f9f8ad96e151d0c27a2a55355c3 diff --git a/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out b/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out index 7df5aee17d..7df42da091 100644 --- a/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out +++ b/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out @@ -16,738 +16,6 @@ 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" + initial_theorem: 16b635b136d26f8f9b71d9637bd85aa8449d6a93a558669bb44235f969703cba + canonicalized_theorem: f46853ed6440686de4f7ed91623575fe2a040e0672580aa06dd2d6fd54dd51b1 + type_inferenced_theorem: b36955c7ea4a3894d5857df754e20b6ee2767d84adab7509d50a645cb78af437 diff --git a/tests/expectations/compiler/compiler/function/conditional_return.leo.out b/tests/expectations/compiler/compiler/function/conditional_return.leo.out index 8f987b3ccd..75a180eb0d 100644 --- a/tests/expectations/compiler/compiler/function/conditional_return.leo.out +++ b/tests/expectations/compiler/compiler/function/conditional_return.leo.out @@ -16,393 +16,6 @@ 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" + initial_theorem: 0f75f5cb48d7ef68bc14fad54adc07e94d3ffbe2f3ea9e4c7b3a0720bf51dec6 + canonicalized_theorem: 0f75f5cb48d7ef68bc14fad54adc07e94d3ffbe2f3ea9e4c7b3a0720bf51dec6 + type_inferenced_theorem: 09c9b20ba2ff94cfca66a5e2e9eda0ce0e5970ca6ebbd111968445f028294cb7 diff --git a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out index 3b1bf075b9..aaffccc60a 100644 --- a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:8:1\n |\n 8 | function main() {\n 9 | ...\n 10 | }\n | ^\n |\n = a function named \"main\" already exists in this scope" + - "- Circuit has no constraints, use inputs and registers in program to produce them" diff --git a/tests/expectations/compiler/compiler/function/empty.leo.out b/tests/expectations/compiler/compiler/function/empty.leo.out index 715075a1f9..d7543927f3 100644 --- a/tests/expectations/compiler/compiler/function/empty.leo.out +++ b/tests/expectations/compiler/compiler/function/empty.leo.out @@ -16,338 +16,6 @@ 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" + initial_theorem: 2e31236a963bb214beb942fbb0269ec2c08ddf704fd47ce5d0864b1f1fbb2a7a + canonicalized_theorem: 186d0d826a29f428034b8782b79d8e3a0cf810f9dde88b5f1062508322c5d7d5 + type_inferenced_theorem: 740b33fa80b8d50c88523daf299d79846430a291dd8b034dd5a01a106270610b diff --git a/tests/expectations/compiler/compiler/function/iteration.leo.out b/tests/expectations/compiler/compiler/function/iteration.leo.out index 6e01c13ac6..6165714f9e 100644 --- a/tests/expectations/compiler/compiler/function/iteration.leo.out +++ b/tests/expectations/compiler/compiler/function/iteration.leo.out @@ -16,702 +16,6 @@ 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" + initial_theorem: c24a0829d16b41b78aafcb92ee24c69d4f067400d3ff3f3138a139c5f420f09e + canonicalized_theorem: c91cb43f9f56224a96a22e7605d9c598b99487c18ad027eb711c0bb8a36feb86 + type_inferenced_theorem: f2df9bbf635e2e254c76ebba82716ff1bde20dfa09a3f15222ea821f29c4b253 diff --git a/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out index 4028add681..ada50b04a6 100644 --- a/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out +++ b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out @@ -16,831 +16,6 @@ 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" + initial_theorem: 7f2118d52fd9440ac9e4bde368b63a4db25b47d368e5324f570129c9bcc586c4 + canonicalized_theorem: 29be9082e8e52d8241a43c35583d5374a79d209a2b3c170d46c5ec3d32eb9d5d + type_inferenced_theorem: 91116dd4ffe34d65d318088464378fd7daeb6ba9812dba94a558f9c48939703c diff --git a/tests/expectations/compiler/compiler/function/multiple_returns.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns.leo.out index 241d6d0380..8f44f377e0 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns.leo.out @@ -16,711 +16,6 @@ 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" + initial_theorem: 4c1138877fd90e6a2728592a085a567f3ba63d4225abedaf517251b8ddce7a6a + canonicalized_theorem: 4c1138877fd90e6a2728592a085a567f3ba63d4225abedaf517251b8ddce7a6a + type_inferenced_theorem: 7cf351cd0c0dbe9bb2a87397c2273f09482994ca60be8f8044a4e2d074fc7dd4 diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out index 436a12404b..4987f7e225 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out @@ -19,276 +19,6 @@ 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}" + initial_theorem: 5a3189a6167d84e140e6e8d2dbfcbb35de5b02927733de0c1143ede46f2fbcf2 + canonicalized_theorem: 5a3189a6167d84e140e6e8d2dbfcbb35de5b02927733de0c1143ede46f2fbcf2 + type_inferenced_theorem: 7bc19e1d45f6cd7d88edb80aa02c5d92021d0cfc6473d9404f513bda95b30b6b diff --git a/tests/expectations/compiler/compiler/function/newlines.leo.out b/tests/expectations/compiler/compiler/function/newlines.leo.out index 79728f6a37..eb8c15f767 100644 --- a/tests/expectations/compiler/compiler/function/newlines.leo.out +++ b/tests/expectations/compiler/compiler/function/newlines.leo.out @@ -19,234 +19,6 @@ 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}" + initial_theorem: 1e4cdf32e452509a2da4d4ef7a49fd51ba4773eb9582693e47f4838a506aa404 + canonicalized_theorem: 1e4cdf32e452509a2da4d4ef7a49fd51ba4773eb9582693e47f4838a506aa404 + type_inferenced_theorem: 8a61717cc7c59824571deaeb55dfcc499d26ef21617c9e8ef4814752374518eb diff --git a/tests/expectations/compiler/compiler/function/repeated.leo.out b/tests/expectations/compiler/compiler/function/repeated.leo.out index 0688f6ddbd..c8806fdb19 100644 --- a/tests/expectations/compiler/compiler/function/repeated.leo.out +++ b/tests/expectations/compiler/compiler/function/repeated.leo.out @@ -16,528 +16,6 @@ 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" + initial_theorem: d0dcfefbc7063c4d87e1406fe2a81c2301796a3c5d8b863959fd671193eec340 + canonicalized_theorem: d0dcfefbc7063c4d87e1406fe2a81c2301796a3c5d8b863959fd671193eec340 + type_inferenced_theorem: d289e818127b99fc2c84e0d0bc8c3d826d1b24c9e898a0f7b0e9b3587d98cb13 diff --git a/tests/expectations/compiler/compiler/function/return.leo.out b/tests/expectations/compiler/compiler/function/return.leo.out index ae30fe9263..246612a646 100644 --- a/tests/expectations/compiler/compiler/function/return.leo.out +++ b/tests/expectations/compiler/compiler/function/return.leo.out @@ -16,405 +16,6 @@ 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}" + initial_theorem: c7d71942ff60eb269209f3a6cc5f5285e2bcc246e851774c2dc262e86863eaa5 + canonicalized_theorem: c7d71942ff60eb269209f3a6cc5f5285e2bcc246e851774c2dc262e86863eaa5 + type_inferenced_theorem: 3d03b6325d894d1326d3b34d9bdb3c033b4d3466762f2e10476216b506637e7d diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out index 1c73cf4025..2cfbf56465 100644 --- a/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out @@ -16,807 +16,6 @@ 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" + initial_theorem: b310827701505fb4e4457a1c55557f1754437cd4a49a02a421f15e9fca038ccb + canonicalized_theorem: a33daa0e9d07ce990b2c3ea8b71c7f6a700415012b8d6fe04f9245f8d3308b59 + type_inferenced_theorem: 896b72d52b23f48531c18035033b48d7b96539592de086d8ada0cd18a6a56eb4 diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out index 161228d942..7e46ba749e 100644 --- a/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out @@ -16,805 +16,6 @@ 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" + initial_theorem: b9f2f146319a861d734a70b88cafd0c7a5ea8fde1e9e22687b70400c7457c52a + canonicalized_theorem: 1453df7ea8e2245ac6103ac84ac47d2d2dd77a64c74503a1e6b91d5434937c2d + type_inferenced_theorem: 08f9c08fcac9ef9da68d227a04f49b9be38b6ce72ffc11ea82acea2cf8fe6b5e diff --git a/tests/expectations/compiler/compiler/function/return_tuple.leo.out b/tests/expectations/compiler/compiler/function/return_tuple.leo.out index 575c7d5980..ad1664423a 100644 --- a/tests/expectations/compiler/compiler/function/return_tuple.leo.out +++ b/tests/expectations/compiler/compiler/function/return_tuple.leo.out @@ -19,752 +19,6 @@ 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" + initial_theorem: d4b008869f1527290e9cd0862e3df4204b32683a96d909dbb6c91fc9489ad0e2 + canonicalized_theorem: d4b008869f1527290e9cd0862e3df4204b32683a96d909dbb6c91fc9489ad0e2 + type_inferenced_theorem: b8ac5ab2d9383543da885cb474f1e9a237c883a8e9facf60692161d439788f90 diff --git a/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out b/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out index ab04a65819..6d62dc3cff 100644 --- a/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out +++ b/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out @@ -19,835 +19,6 @@ 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" + initial_theorem: c429458b4d201fa548eea62e4a2ff8d581f788b7401a03b5f189ae210c3fe132 + canonicalized_theorem: c429458b4d201fa548eea62e4a2ff8d581f788b7401a03b5f189ae210c3fe132 + type_inferenced_theorem: 1453a4e5252dc0989544abafe9ff5477021ef0f3e8874276e4a989ad23ffaa5a diff --git a/tests/expectations/compiler/compiler/function/value_unchanged.leo.out b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out index 6ab00e5a1e..cd1751efe0 100644 --- a/tests/expectations/compiler/compiler/function/value_unchanged.leo.out +++ b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out @@ -16,601 +16,6 @@ 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" + initial_theorem: 971f88ef638a1ab839c743bdab5de81278f1d02819a1cc37bc40ca4f11898345 + canonicalized_theorem: eedf8caa4a34b266f354efe0723ab7af3a41a748b0f36b8daca8726130e149e1 + type_inferenced_theorem: 53817d02b96405f9ecfbccd9fa024eaab279a0d1be04265a7362377257e97b46 diff --git a/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out b/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out index 10f9dea199..460bcdae61 100644 --- a/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out +++ b/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out @@ -16,4551 +16,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}": - circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" - members: - - CircuitVariable: - - "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" width: u32,\\\"}\"}" - - IntegerType: U32 - - CircuitVariable: - - "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" height: u32,\\\"}\"}" - - IntegerType: U32 - global_consts: - basic: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const basic: u32 = 8;\\\"}\"}" - span: - line_start: 3 - line_stop: 3 - col_start: 7 - col_stop: 12 - path: compiler-test - content: "const basic: u32 = 8;" - type_: - IntegerType: U32 - value: - Value: - Implicit: - - "8" - - line_start: 3 - line_stop: 3 - col_start: 20 - col_stop: 21 - path: compiler-test - content: "const basic: u32 = 8;" - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 21 - path: compiler-test - content: "const basic: u32 = 8;" - array: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const array: [u8; (3, 2)] = [[0u8; 2]; 3];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 7 - col_stop: 12 - path: compiler-test - content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" - type_: - Array: - - IntegerType: U8 - - - value: "3" - - value: "2" - value: - ArrayInit: - element: - ArrayInit: - element: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 31 - col_stop: 34 - path: compiler-test - content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" - dimensions: - - value: "2" - span: - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 38 - path: compiler-test - content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" - dimensions: - - value: "3" - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 42 - path: compiler-test - content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" - span: - line_start: 4 - line_stop: 4 - col_start: 1 - col_stop: 42 - path: compiler-test - content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" - tuple: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"tuple\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const tuple = (1u32, 2u32);\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 12 - path: compiler-test - content: "const tuple = (1u32, 2u32);" - type_: ~ - value: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "1" - - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 20 - path: compiler-test - content: "const tuple = (1u32, 2u32);" - - Value: - Integer: - - U32 - - "2" - - line_start: 5 - line_stop: 5 - col_start: 22 - col_stop: 26 - path: compiler-test - content: "const tuple = (1u32, 2u32);" - span: - line_start: 5 - line_stop: 5 - col_start: 15 - col_stop: 27 - path: compiler-test - content: "const tuple = (1u32, 2u32);" - span: - line_start: 5 - line_stop: 5 - col_start: 1 - col_stop: 27 - path: compiler-test - content: "const tuple = (1u32, 2u32);" - "a,b": - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const (a, b) = (1u32, 2u32);\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 9 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - - mutable: false - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const (a, b) = (1u32, 2u32);\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 11 - col_stop: 12 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - type_: ~ - value: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "1" - - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 21 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - - Value: - Integer: - - U32 - - "2" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 27 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 28 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - span: - line_start: 6 - line_stop: 6 - col_start: 1 - col_stop: 28 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - simple_group: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"simple_group\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const simple_group: group = 1group;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 7 - col_stop: 19 - path: compiler-test - content: "const simple_group: group = 1group;" - type_: Group - value: - Value: - Group: - Single: - - "1" - - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 35 - path: compiler-test - content: "const simple_group: group = 1group;" - span: - line_start: 7 - line_stop: 7 - col_start: 1 - col_stop: 35 - path: compiler-test - content: "const simple_group: group = 1group;" - complex_group: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"complex_group\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":7,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const complex_group = (_, 1)group;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 7 - col_stop: 20 - path: compiler-test - content: "const complex_group = (_, 1)group;" - type_: ~ - value: - Value: - Group: - Tuple: - x: Inferred - y: - Number: - - "1" - - line_start: 8 - line_stop: 8 - col_start: 27 - col_stop: 28 - path: compiler-test - content: "const complex_group = (_, 1)group;" - span: - line_start: 8 - line_stop: 8 - col_start: 24 - col_stop: 34 - path: compiler-test - content: "const complex_group = (_, 1)group;" - span: - line_start: 8 - line_stop: 8 - col_start: 1 - col_stop: 34 - path: compiler-test - content: "const complex_group = (_, 1)group;" - field_test: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"field_test\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":7,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const field_test: field = 2;\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 7 - col_stop: 17 - path: compiler-test - content: "const field_test: field = 2;" - type_: Field - value: - Value: - Implicit: - - "2" - - line_start: 9 - line_stop: 9 - col_start: 27 - col_stop: 28 - path: compiler-test - content: "const field_test: field = 2;" - span: - line_start: 9 - line_stop: 9 - col_start: 1 - col_stop: 28 - path: compiler-test - content: "const field_test: field = 2;" - use_another_const: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"use_another_const\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":7,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const use_another_const = basic + 1;\\\"}\"}" - span: - line_start: 10 - line_stop: 10 - col_start: 7 - col_stop: 24 - path: compiler-test - content: const use_another_const = basic + 1; - type_: ~ - value: - Binary: - left: - Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":27,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const use_another_const = basic + 1;\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 10 - line_stop: 10 - col_start: 35 - col_stop: 36 - path: compiler-test - content: const use_another_const = basic + 1; - op: Add - span: - line_start: 10 - line_stop: 10 - col_start: 27 - col_stop: 36 - path: compiler-test - content: const use_another_const = basic + 1; - span: - line_start: 10 - line_stop: 10 - col_start: 1 - col_stop: 36 - path: compiler-test - content: const use_another_const = basic + 1; - foo: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" - span: - line_start: 11 - line_stop: 11 - col_start: 7 - col_stop: 10 - path: compiler-test - content: "const foo = Foo { width: 10, height: 20 };" - type_: ~ - value: - CircuitInit: - name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" - members: - - identifier: "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":19,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" - expression: - Value: - Implicit: - - "10" - - line_start: 11 - line_stop: 11 - col_start: 26 - col_stop: 28 - path: compiler-test - content: "const foo = Foo { width: 10, height: 20 };" - - identifier: "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":30,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" - expression: - Value: - Implicit: - - "20" - - line_start: 11 - line_stop: 11 - col_start: 38 - col_stop: 40 - path: compiler-test - content: "const foo = Foo { width: 10, height: 20 };" - span: - line_start: 11 - line_stop: 11 - col_start: 13 - col_stop: 42 - path: compiler-test - content: "const foo = Foo { width: 10, height: 20 };" - span: - line_start: 11 - line_stop: 11 - col_start: 1 - col_stop: 42 - path: compiler-test - content: "const foo = Foo { width: 10, height: 20 };" - uno: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const uno = uno();\\\"}\"}" - span: - line_start: 12 - line_stop: 12 - col_start: 7 - col_stop: 10 - path: compiler-test - content: const uno = uno(); - type_: ~ - value: - Call: - function: - Identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const uno = uno();\\\"}\"}" - arguments: [] - span: - line_start: 12 - line_stop: 12 - col_start: 13 - col_stop: 18 - path: compiler-test - content: const uno = uno(); - span: - line_start: 12 - line_stop: 12 - col_start: 1 - col_stop: 18 - path: compiler-test - content: const uno = uno(); - character: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":7,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const character = 'a';\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 7 - col_stop: 16 - path: compiler-test - content: "const character = 'a';" - type_: ~ - value: - Value: - Char: - character: - Scalar: 97 - span: - line_start: 13 - line_stop: 13 - col_start: 19 - col_stop: 22 - path: compiler-test - content: "const character = 'a';" - span: - line_start: 13 - line_stop: 13 - col_start: 1 - col_stop: 22 - path: compiler-test - content: "const character = 'a';" - hello: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const hello = \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" - span: - line_start: 14 - line_stop: 14 - col_start: 7 - col_stop: 12 - path: compiler-test - content: "const hello = \"Hello, World!\";" - type_: ~ - value: - Value: - String: - - - Scalar: 72 - - Scalar: 101 - - Scalar: 108 - - Scalar: 108 - - Scalar: 111 - - Scalar: 44 - - Scalar: 32 - - Scalar: 87 - - Scalar: 111 - - Scalar: 114 - - Scalar: 108 - - Scalar: 100 - - Scalar: 33 - - line_start: 14 - line_stop: 14 - col_start: 15 - col_stop: 30 - path: compiler-test - content: "const hello = \"Hello, World!\";" - span: - line_start: 14 - line_stop: 14 - col_start: 1 - col_stop: 30 - path: compiler-test - content: "const hello = \"Hello, World!\";" - functions: - "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function uno() -> u32 {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function uno() -> u32 {\\\"}\"}" - input: [] - output: - IntegerType: U32 - block: - statements: - - Return: - expression: - Value: - Integer: - - U32 - - "1" - - line_start: 22 - line_stop: 22 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return 1u32;" - span: - line_start: 22 - line_stop: 22 - col_start: 5 - col_stop: 16 - path: compiler-test - content: " return 1u32;" - span: - line_start: 21 - line_stop: 23 - col_start: 23 - col_stop: 2 - path: compiler-test - content: "function uno() -> u32 {\n...\n}" - span: - line_start: 21 - line_stop: 23 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function uno() -> u32 {\n...\n}" - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"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: 25 - line_stop: 25 - 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\":\"x\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (x, y) = (1u32, 2u32);\\\"}\"}" - span: - line_start: 26 - line_stop: 26 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (x, y) = (1u32, 2u32);\\\"}\"}" - span: - line_start: 26 - line_stop: 26 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - type_: ~ - value: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "1" - - line_start: 26 - line_stop: 26 - col_start: 19 - col_stop: 23 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - - Value: - Integer: - - U32 - - "2" - - line_start: 26 - line_stop: 26 - col_start: 25 - col_stop: 29 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - span: - line_start: 26 - line_stop: 26 - col_start: 18 - col_stop: 30 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - span: - line_start: 26 - line_stop: 26 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - - Return: - expression: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == basic\\\"}\"}" - right: - Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == basic\\\"}\"}" - op: Eq - span: - line_start: 28 - line_stop: 28 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return a == basic" - right: - Binary: - left: - Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && basic == 8u32\\\"}\"}" - right: - Value: - Integer: - - U32 - - "8" - - line_start: 29 - line_stop: 29 - col_start: 21 - col_stop: 25 - path: compiler-test - content: " && basic == 8u32" - op: Eq - span: - line_start: 29 - line_stop: 29 - col_start: 12 - col_stop: 25 - path: compiler-test - content: " && basic == 8u32" - op: And - span: - line_start: 28 - line_stop: 29 - col_start: 12 - col_stop: 25 - path: compiler-test - content: " return a == basic\n && basic == 8u32" - right: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && array[0][0] == 0 // arrays\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 30 - line_stop: 30 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - span: - line_start: 30 - line_stop: 30 - col_start: 12 - col_stop: 20 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - index: - Value: - Implicit: - - "0" - - line_start: 30 - line_stop: 30 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - span: - line_start: 30 - line_stop: 30 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - right: - Value: - Implicit: - - "0" - - line_start: 30 - line_stop: 30 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - op: Eq - span: - line_start: 30 - line_stop: 30 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - op: And - span: - line_start: 28 - line_stop: 30 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays" - right: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && array[2][1] == 0\\\"}\"}" - index: - Value: - Implicit: - - "2" - - line_start: 31 - line_stop: 31 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " && array[2][1] == 0" - span: - line_start: 31 - line_stop: 31 - col_start: 12 - col_stop: 20 - path: compiler-test - content: " && array[2][1] == 0" - index: - Value: - Implicit: - - "1" - - line_start: 31 - line_stop: 31 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " && array[2][1] == 0" - span: - line_start: 31 - line_stop: 31 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " && array[2][1] == 0" - right: - Value: - Implicit: - - "0" - - line_start: 31 - line_stop: 31 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " && array[2][1] == 0" - op: Eq - span: - line_start: 31 - line_stop: 31 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " && array[2][1] == 0" - op: And - span: - line_start: 28 - line_stop: 31 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0" - right: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && x == 1u32 // tuple test\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 32 - line_stop: 32 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && x == 1u32 // tuple test" - op: Eq - span: - line_start: 32 - line_stop: 32 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && x == 1u32 // tuple test" - op: And - span: - line_start: 28 - line_stop: 32 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test" - right: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == 2u32 \\\"}\"}" - right: - Value: - Integer: - - U32 - - "2" - - line_start: 33 - line_stop: 33 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && y == 2u32 " - op: Eq - span: - line_start: 33 - line_stop: 33 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && y == 2u32 " - op: And - span: - line_start: 28 - line_stop: 33 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 " - right: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a == 1u32 // tuple extraction test\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 34 - line_stop: 34 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && a == 1u32 // tuple extraction test" - op: Eq - span: - line_start: 34 - line_stop: 34 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && a == 1u32 // tuple extraction test" - op: And - span: - line_start: 28 - line_stop: 34 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test" - right: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && b == 2u32\\\"}\"}" - right: - Value: - Integer: - - U32 - - "2" - - line_start: 35 - line_stop: 35 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && b == 2u32" - op: Eq - span: - line_start: 35 - line_stop: 35 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && b == 2u32" - op: And - span: - line_start: 28 - line_stop: 35 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32" - right: - Binary: - left: - Identifier: "{\"name\":\"simple_group\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":12,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && simple_group == 1group // group test\\\"}\"}" - right: - Value: - Group: - Single: - - "1" - - line_start: 36 - line_stop: 36 - col_start: 28 - col_stop: 34 - path: compiler-test - content: " && simple_group == 1group // group test" - op: Eq - span: - line_start: 36 - line_stop: 36 - col_start: 12 - col_stop: 34 - path: compiler-test - content: " && simple_group == 1group // group test" - op: And - span: - line_start: 28 - line_stop: 36 - col_start: 12 - col_stop: 34 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test" - right: - Binary: - left: - Identifier: "{\"name\":\"complex_group\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":12,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && complex_group == (_, 1)group\\\"}\"}" - right: - Value: - Group: - Tuple: - x: Inferred - y: - Number: - - "1" - - line_start: 37 - line_stop: 37 - col_start: 33 - col_stop: 34 - path: compiler-test - content: " && complex_group == (_, 1)group" - span: - line_start: 37 - line_stop: 37 - col_start: 30 - col_stop: 40 - path: compiler-test - content: " && complex_group == (_, 1)group" - op: Eq - span: - line_start: 37 - line_stop: 37 - col_start: 12 - col_stop: 40 - path: compiler-test - content: " && complex_group == (_, 1)group" - op: And - span: - line_start: 28 - line_stop: 37 - col_start: 12 - col_stop: 40 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group" - right: - Binary: - left: - Identifier: "{\"name\":\"field_test\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":12,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && field_test == 2field // field test\\\"}\"}" - right: - Value: - Field: - - "2" - - line_start: 38 - line_stop: 38 - col_start: 26 - col_stop: 32 - path: compiler-test - content: " && field_test == 2field // field test" - op: Eq - span: - line_start: 38 - line_stop: 38 - col_start: 12 - col_stop: 32 - path: compiler-test - content: " && field_test == 2field // field test" - op: And - span: - line_start: 28 - line_stop: 38 - col_start: 12 - col_stop: 32 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test" - right: - Binary: - left: - Identifier: "{\"name\":\"use_another_const\",\"span\":\"{\\\"line_start\\\":39,\\\"line_stop\\\":39,\\\"col_start\\\":12,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && use_another_const == 9u32 // use another const test\\\"}\"}" - right: - Value: - Integer: - - U32 - - "9" - - line_start: 39 - line_stop: 39 - col_start: 33 - col_stop: 37 - path: compiler-test - content: " && use_another_const == 9u32 // use another const test" - op: Eq - span: - line_start: 39 - line_stop: 39 - col_start: 12 - col_stop: 37 - path: compiler-test - content: " && use_another_const == 9u32 // use another const test" - op: And - span: - line_start: 28 - line_stop: 39 - col_start: 12 - col_stop: 37 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test" - right: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.width == 10u32 // circuit test\\\"}\"}" - name: "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":16,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.width == 10u32 // circuit test\\\"}\"}" - span: - line_start: 40 - line_stop: 40 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && foo.width == 10u32 // circuit test" - right: - Value: - Integer: - - U32 - - "10" - - line_start: 40 - line_stop: 40 - col_start: 25 - col_stop: 30 - path: compiler-test - content: " && foo.width == 10u32 // circuit test" - op: Eq - span: - line_start: 40 - line_stop: 40 - col_start: 12 - col_stop: 30 - path: compiler-test - content: " && foo.width == 10u32 // circuit test" - op: And - span: - line_start: 28 - line_stop: 40 - col_start: 12 - col_stop: 30 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test" - right: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.height == 20u32\\\"}\"}" - name: "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":16,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.height == 20u32\\\"}\"}" - span: - line_start: 41 - line_stop: 41 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " && foo.height == 20u32" - right: - Value: - Integer: - - U32 - - "20" - - line_start: 41 - line_stop: 41 - col_start: 26 - col_stop: 31 - path: compiler-test - content: " && foo.height == 20u32" - op: Eq - span: - line_start: 41 - line_stop: 41 - col_start: 12 - col_stop: 31 - path: compiler-test - content: " && foo.height == 20u32" - op: And - span: - line_start: 28 - line_stop: 41 - col_start: 12 - col_stop: 31 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32" - right: - Binary: - left: - Identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && uno == 1u32 // function test\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 42 - line_stop: 42 - col_start: 19 - col_stop: 23 - path: compiler-test - content: " && uno == 1u32 // function test" - op: Eq - span: - line_start: 42 - line_stop: 42 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " && uno == 1u32 // function test" - op: And - span: - line_start: 28 - line_stop: 42 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test" - right: - Binary: - left: - Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && character == 'a' // char test\\\"}\"}" - right: - Value: - Char: - character: - Scalar: 97 - span: - line_start: 43 - line_stop: 43 - col_start: 25 - col_stop: 28 - path: compiler-test - content: " && character == 'a' // char test" - op: Eq - span: - line_start: 43 - line_stop: 43 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " && character == 'a' // char test" - op: And - span: - line_start: 28 - line_stop: 43 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test" - right: - Binary: - left: - Identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && hello == \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" - right: - Value: - String: - - - Scalar: 72 - - Scalar: 101 - - Scalar: 108 - - Scalar: 108 - - Scalar: 111 - - Scalar: 44 - - Scalar: 32 - - Scalar: 87 - - Scalar: 111 - - Scalar: 114 - - Scalar: 108 - - Scalar: 100 - - Scalar: 33 - - line_start: 44 - line_stop: 44 - col_start: 21 - col_stop: 36 - path: compiler-test - content: " && hello == \"Hello, World!\";" - op: Eq - span: - line_start: 44 - line_stop: 44 - col_start: 12 - col_stop: 36 - path: compiler-test - content: " && hello == \"Hello, World!\";" - op: And - span: - line_start: 28 - line_stop: 44 - col_start: 12 - col_stop: 36 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test\n && hello == \"Hello, World!\";" - span: - line_start: 28 - line_stop: 44 - col_start: 5 - col_stop: 36 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test\n && hello == \"Hello, World!\";" - span: - line_start: 25 - line_stop: 45 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(a: u32) -> bool {\n...\n}" - span: - line_start: 25 - line_stop: 45 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" - canonicalized_theorem: - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}": - circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" - members: - - CircuitVariable: - - "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" width: u32,\\\"}\"}" - - IntegerType: U32 - - CircuitVariable: - - "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" height: u32,\\\"}\"}" - - IntegerType: U32 - global_consts: - basic: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const basic: u32 = 8;\\\"}\"}" - span: - line_start: 3 - line_stop: 3 - col_start: 7 - col_stop: 12 - path: compiler-test - content: "const basic: u32 = 8;" - type_: - IntegerType: U32 - value: - Value: - Implicit: - - "8" - - line_start: 3 - line_stop: 3 - col_start: 20 - col_stop: 21 - path: compiler-test - content: "const basic: u32 = 8;" - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 21 - path: compiler-test - content: "const basic: u32 = 8;" - array: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const array: [u8; (3, 2)] = [[0u8; 2]; 3];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 7 - col_stop: 12 - path: compiler-test - content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" - type_: - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - value: - ArrayInit: - element: - ArrayInit: - element: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 31 - col_stop: 34 - path: compiler-test - content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" - dimensions: - - value: "2" - span: - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 38 - path: compiler-test - content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" - dimensions: - - value: "3" - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 42 - path: compiler-test - content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" - span: - line_start: 4 - line_stop: 4 - col_start: 1 - col_stop: 42 - path: compiler-test - content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" - tuple: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"tuple\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const tuple = (1u32, 2u32);\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 12 - path: compiler-test - content: "const tuple = (1u32, 2u32);" - type_: ~ - value: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "1" - - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 20 - path: compiler-test - content: "const tuple = (1u32, 2u32);" - - Value: - Integer: - - U32 - - "2" - - line_start: 5 - line_stop: 5 - col_start: 22 - col_stop: 26 - path: compiler-test - content: "const tuple = (1u32, 2u32);" - span: - line_start: 5 - line_stop: 5 - col_start: 15 - col_stop: 27 - path: compiler-test - content: "const tuple = (1u32, 2u32);" - span: - line_start: 5 - line_stop: 5 - col_start: 1 - col_stop: 27 - path: compiler-test - content: "const tuple = (1u32, 2u32);" - "a,b": - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const (a, b) = (1u32, 2u32);\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 9 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - - mutable: false - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const (a, b) = (1u32, 2u32);\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 11 - col_stop: 12 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - type_: ~ - value: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "1" - - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 21 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - - Value: - Integer: - - U32 - - "2" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 27 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 28 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - span: - line_start: 6 - line_stop: 6 - col_start: 1 - col_stop: 28 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - simple_group: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"simple_group\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const simple_group: group = 1group;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 7 - col_stop: 19 - path: compiler-test - content: "const simple_group: group = 1group;" - type_: Group - value: - Value: - Group: - Single: - - "1" - - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 35 - path: compiler-test - content: "const simple_group: group = 1group;" - span: - line_start: 7 - line_stop: 7 - col_start: 1 - col_stop: 35 - path: compiler-test - content: "const simple_group: group = 1group;" - complex_group: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"complex_group\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":7,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const complex_group = (_, 1)group;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 7 - col_stop: 20 - path: compiler-test - content: "const complex_group = (_, 1)group;" - type_: ~ - value: - Value: - Group: - Tuple: - x: Inferred - y: - Number: - - "1" - - line_start: 8 - line_stop: 8 - col_start: 27 - col_stop: 28 - path: compiler-test - content: "const complex_group = (_, 1)group;" - span: - line_start: 8 - line_stop: 8 - col_start: 24 - col_stop: 34 - path: compiler-test - content: "const complex_group = (_, 1)group;" - span: - line_start: 8 - line_stop: 8 - col_start: 1 - col_stop: 34 - path: compiler-test - content: "const complex_group = (_, 1)group;" - field_test: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"field_test\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":7,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const field_test: field = 2;\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 7 - col_stop: 17 - path: compiler-test - content: "const field_test: field = 2;" - type_: Field - value: - Value: - Implicit: - - "2" - - line_start: 9 - line_stop: 9 - col_start: 27 - col_stop: 28 - path: compiler-test - content: "const field_test: field = 2;" - span: - line_start: 9 - line_stop: 9 - col_start: 1 - col_stop: 28 - path: compiler-test - content: "const field_test: field = 2;" - use_another_const: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"use_another_const\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":7,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const use_another_const = basic + 1;\\\"}\"}" - span: - line_start: 10 - line_stop: 10 - col_start: 7 - col_stop: 24 - path: compiler-test - content: const use_another_const = basic + 1; - type_: ~ - value: - Binary: - left: - Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":27,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const use_another_const = basic + 1;\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 10 - line_stop: 10 - col_start: 35 - col_stop: 36 - path: compiler-test - content: const use_another_const = basic + 1; - op: Add - span: - line_start: 10 - line_stop: 10 - col_start: 27 - col_stop: 36 - path: compiler-test - content: const use_another_const = basic + 1; - span: - line_start: 10 - line_stop: 10 - col_start: 1 - col_stop: 36 - path: compiler-test - content: const use_another_const = basic + 1; - foo: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" - span: - line_start: 11 - line_stop: 11 - col_start: 7 - col_stop: 10 - path: compiler-test - content: "const foo = Foo { width: 10, height: 20 };" - type_: ~ - value: - CircuitInit: - name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" - members: - - identifier: "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":19,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" - expression: - Value: - Implicit: - - "10" - - line_start: 11 - line_stop: 11 - col_start: 26 - col_stop: 28 - path: compiler-test - content: "const foo = Foo { width: 10, height: 20 };" - - identifier: "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":30,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" - expression: - Value: - Implicit: - - "20" - - line_start: 11 - line_stop: 11 - col_start: 38 - col_stop: 40 - path: compiler-test - content: "const foo = Foo { width: 10, height: 20 };" - span: - line_start: 11 - line_stop: 11 - col_start: 13 - col_stop: 42 - path: compiler-test - content: "const foo = Foo { width: 10, height: 20 };" - span: - line_start: 11 - line_stop: 11 - col_start: 1 - col_stop: 42 - path: compiler-test - content: "const foo = Foo { width: 10, height: 20 };" - uno: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const uno = uno();\\\"}\"}" - span: - line_start: 12 - line_stop: 12 - col_start: 7 - col_stop: 10 - path: compiler-test - content: const uno = uno(); - type_: ~ - value: - Call: - function: - Identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const uno = uno();\\\"}\"}" - arguments: [] - span: - line_start: 12 - line_stop: 12 - col_start: 13 - col_stop: 18 - path: compiler-test - content: const uno = uno(); - span: - line_start: 12 - line_stop: 12 - col_start: 1 - col_stop: 18 - path: compiler-test - content: const uno = uno(); - character: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":7,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const character = 'a';\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 7 - col_stop: 16 - path: compiler-test - content: "const character = 'a';" - type_: ~ - value: - Value: - Char: - character: - Scalar: 97 - span: - line_start: 13 - line_stop: 13 - col_start: 19 - col_stop: 22 - path: compiler-test - content: "const character = 'a';" - span: - line_start: 13 - line_stop: 13 - col_start: 1 - col_stop: 22 - path: compiler-test - content: "const character = 'a';" - hello: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const hello = \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" - span: - line_start: 14 - line_stop: 14 - col_start: 7 - col_stop: 12 - path: compiler-test - content: "const hello = \"Hello, World!\";" - type_: ~ - value: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 72 - span: - line_start: 14 - line_stop: 14 - col_start: 16 - col_stop: 17 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 14 - line_stop: 14 - col_start: 17 - col_stop: 18 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 14 - line_stop: 14 - col_start: 18 - col_stop: 19 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 14 - line_stop: 14 - col_start: 19 - col_stop: 20 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 14 - line_stop: 14 - col_start: 20 - col_stop: 21 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 44 - span: - line_start: 14 - line_stop: 14 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 14 - line_stop: 14 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 87 - span: - line_start: 14 - line_stop: 14 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 14 - line_stop: 14 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 114 - span: - line_start: 14 - line_stop: 14 - col_start: 25 - col_stop: 26 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 14 - line_stop: 14 - col_start: 26 - col_stop: 27 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 14 - line_stop: 14 - col_start: 27 - col_stop: 28 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 14 - line_stop: 14 - col_start: 28 - col_stop: 29 - path: compiler-test - content: "const hello = \"Hello, World!\";" - span: - line_start: 14 - line_stop: 14 - col_start: 15 - col_stop: 30 - path: compiler-test - content: "const hello = \"Hello, World!\";" - span: - line_start: 14 - line_stop: 14 - col_start: 1 - col_stop: 30 - path: compiler-test - content: "const hello = \"Hello, World!\";" - functions: - "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function uno() -> u32 {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function uno() -> u32 {\\\"}\"}" - input: [] - output: - IntegerType: U32 - block: - statements: - - Return: - expression: - Value: - Integer: - - U32 - - "1" - - line_start: 22 - line_stop: 22 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return 1u32;" - span: - line_start: 22 - line_stop: 22 - col_start: 5 - col_stop: 16 - path: compiler-test - content: " return 1u32;" - span: - line_start: 21 - line_stop: 23 - col_start: 23 - col_stop: 2 - path: compiler-test - content: "function uno() -> u32 {\n...\n}" - span: - line_start: 21 - line_stop: 23 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function uno() -> u32 {\n...\n}" - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"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: 25 - line_stop: 25 - 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\":\"x\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (x, y) = (1u32, 2u32);\\\"}\"}" - span: - line_start: 26 - line_stop: 26 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (x, y) = (1u32, 2u32);\\\"}\"}" - span: - line_start: 26 - line_stop: 26 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - type_: ~ - value: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "1" - - line_start: 26 - line_stop: 26 - col_start: 19 - col_stop: 23 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - - Value: - Integer: - - U32 - - "2" - - line_start: 26 - line_stop: 26 - col_start: 25 - col_stop: 29 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - span: - line_start: 26 - line_stop: 26 - col_start: 18 - col_stop: 30 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - span: - line_start: 26 - line_stop: 26 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - - Return: - expression: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == basic\\\"}\"}" - right: - Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == basic\\\"}\"}" - op: Eq - span: - line_start: 28 - line_stop: 28 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return a == basic" - right: - Binary: - left: - Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && basic == 8u32\\\"}\"}" - right: - Value: - Integer: - - U32 - - "8" - - line_start: 29 - line_stop: 29 - col_start: 21 - col_stop: 25 - path: compiler-test - content: " && basic == 8u32" - op: Eq - span: - line_start: 29 - line_stop: 29 - col_start: 12 - col_stop: 25 - path: compiler-test - content: " && basic == 8u32" - op: And - span: - line_start: 28 - line_stop: 29 - col_start: 12 - col_stop: 25 - path: compiler-test - content: " return a == basic\n && basic == 8u32" - right: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && array[0][0] == 0 // arrays\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 30 - line_stop: 30 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - span: - line_start: 30 - line_stop: 30 - col_start: 12 - col_stop: 20 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - index: - Value: - Implicit: - - "0" - - line_start: 30 - line_stop: 30 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - span: - line_start: 30 - line_stop: 30 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - right: - Value: - Implicit: - - "0" - - line_start: 30 - line_stop: 30 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - op: Eq - span: - line_start: 30 - line_stop: 30 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - op: And - span: - line_start: 28 - line_stop: 30 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays" - right: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && array[2][1] == 0\\\"}\"}" - index: - Value: - Implicit: - - "2" - - line_start: 31 - line_stop: 31 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " && array[2][1] == 0" - span: - line_start: 31 - line_stop: 31 - col_start: 12 - col_stop: 20 - path: compiler-test - content: " && array[2][1] == 0" - index: - Value: - Implicit: - - "1" - - line_start: 31 - line_stop: 31 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " && array[2][1] == 0" - span: - line_start: 31 - line_stop: 31 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " && array[2][1] == 0" - right: - Value: - Implicit: - - "0" - - line_start: 31 - line_stop: 31 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " && array[2][1] == 0" - op: Eq - span: - line_start: 31 - line_stop: 31 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " && array[2][1] == 0" - op: And - span: - line_start: 28 - line_stop: 31 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0" - right: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && x == 1u32 // tuple test\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 32 - line_stop: 32 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && x == 1u32 // tuple test" - op: Eq - span: - line_start: 32 - line_stop: 32 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && x == 1u32 // tuple test" - op: And - span: - line_start: 28 - line_stop: 32 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test" - right: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == 2u32 \\\"}\"}" - right: - Value: - Integer: - - U32 - - "2" - - line_start: 33 - line_stop: 33 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && y == 2u32 " - op: Eq - span: - line_start: 33 - line_stop: 33 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && y == 2u32 " - op: And - span: - line_start: 28 - line_stop: 33 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 " - right: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a == 1u32 // tuple extraction test\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 34 - line_stop: 34 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && a == 1u32 // tuple extraction test" - op: Eq - span: - line_start: 34 - line_stop: 34 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && a == 1u32 // tuple extraction test" - op: And - span: - line_start: 28 - line_stop: 34 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test" - right: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && b == 2u32\\\"}\"}" - right: - Value: - Integer: - - U32 - - "2" - - line_start: 35 - line_stop: 35 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && b == 2u32" - op: Eq - span: - line_start: 35 - line_stop: 35 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && b == 2u32" - op: And - span: - line_start: 28 - line_stop: 35 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32" - right: - Binary: - left: - Identifier: "{\"name\":\"simple_group\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":12,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && simple_group == 1group // group test\\\"}\"}" - right: - Value: - Group: - Single: - - "1" - - line_start: 36 - line_stop: 36 - col_start: 28 - col_stop: 34 - path: compiler-test - content: " && simple_group == 1group // group test" - op: Eq - span: - line_start: 36 - line_stop: 36 - col_start: 12 - col_stop: 34 - path: compiler-test - content: " && simple_group == 1group // group test" - op: And - span: - line_start: 28 - line_stop: 36 - col_start: 12 - col_stop: 34 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test" - right: - Binary: - left: - Identifier: "{\"name\":\"complex_group\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":12,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && complex_group == (_, 1)group\\\"}\"}" - right: - Value: - Group: - Tuple: - x: Inferred - y: - Number: - - "1" - - line_start: 37 - line_stop: 37 - col_start: 33 - col_stop: 34 - path: compiler-test - content: " && complex_group == (_, 1)group" - span: - line_start: 37 - line_stop: 37 - col_start: 30 - col_stop: 40 - path: compiler-test - content: " && complex_group == (_, 1)group" - op: Eq - span: - line_start: 37 - line_stop: 37 - col_start: 12 - col_stop: 40 - path: compiler-test - content: " && complex_group == (_, 1)group" - op: And - span: - line_start: 28 - line_stop: 37 - col_start: 12 - col_stop: 40 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group" - right: - Binary: - left: - Identifier: "{\"name\":\"field_test\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":12,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && field_test == 2field // field test\\\"}\"}" - right: - Value: - Field: - - "2" - - line_start: 38 - line_stop: 38 - col_start: 26 - col_stop: 32 - path: compiler-test - content: " && field_test == 2field // field test" - op: Eq - span: - line_start: 38 - line_stop: 38 - col_start: 12 - col_stop: 32 - path: compiler-test - content: " && field_test == 2field // field test" - op: And - span: - line_start: 28 - line_stop: 38 - col_start: 12 - col_stop: 32 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test" - right: - Binary: - left: - Identifier: "{\"name\":\"use_another_const\",\"span\":\"{\\\"line_start\\\":39,\\\"line_stop\\\":39,\\\"col_start\\\":12,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && use_another_const == 9u32 // use another const test\\\"}\"}" - right: - Value: - Integer: - - U32 - - "9" - - line_start: 39 - line_stop: 39 - col_start: 33 - col_stop: 37 - path: compiler-test - content: " && use_another_const == 9u32 // use another const test" - op: Eq - span: - line_start: 39 - line_stop: 39 - col_start: 12 - col_stop: 37 - path: compiler-test - content: " && use_another_const == 9u32 // use another const test" - op: And - span: - line_start: 28 - line_stop: 39 - col_start: 12 - col_stop: 37 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test" - right: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.width == 10u32 // circuit test\\\"}\"}" - name: "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":16,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.width == 10u32 // circuit test\\\"}\"}" - span: - line_start: 40 - line_stop: 40 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && foo.width == 10u32 // circuit test" - right: - Value: - Integer: - - U32 - - "10" - - line_start: 40 - line_stop: 40 - col_start: 25 - col_stop: 30 - path: compiler-test - content: " && foo.width == 10u32 // circuit test" - op: Eq - span: - line_start: 40 - line_stop: 40 - col_start: 12 - col_stop: 30 - path: compiler-test - content: " && foo.width == 10u32 // circuit test" - op: And - span: - line_start: 28 - line_stop: 40 - col_start: 12 - col_stop: 30 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test" - right: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.height == 20u32\\\"}\"}" - name: "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":16,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.height == 20u32\\\"}\"}" - span: - line_start: 41 - line_stop: 41 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " && foo.height == 20u32" - right: - Value: - Integer: - - U32 - - "20" - - line_start: 41 - line_stop: 41 - col_start: 26 - col_stop: 31 - path: compiler-test - content: " && foo.height == 20u32" - op: Eq - span: - line_start: 41 - line_stop: 41 - col_start: 12 - col_stop: 31 - path: compiler-test - content: " && foo.height == 20u32" - op: And - span: - line_start: 28 - line_stop: 41 - col_start: 12 - col_stop: 31 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32" - right: - Binary: - left: - Identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && uno == 1u32 // function test\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 42 - line_stop: 42 - col_start: 19 - col_stop: 23 - path: compiler-test - content: " && uno == 1u32 // function test" - op: Eq - span: - line_start: 42 - line_stop: 42 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " && uno == 1u32 // function test" - op: And - span: - line_start: 28 - line_stop: 42 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test" - right: - Binary: - left: - Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && character == 'a' // char test\\\"}\"}" - right: - Value: - Char: - character: - Scalar: 97 - span: - line_start: 43 - line_stop: 43 - col_start: 25 - col_stop: 28 - path: compiler-test - content: " && character == 'a' // char test" - op: Eq - span: - line_start: 43 - line_stop: 43 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " && character == 'a' // char test" - op: And - span: - line_start: 28 - line_stop: 43 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test" - right: - Binary: - left: - Identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && hello == \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 72 - span: - line_start: 44 - line_stop: 44 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 44 - line_stop: 44 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 44 - line_stop: 44 - col_start: 24 - col_stop: 25 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 44 - line_stop: 44 - col_start: 25 - col_stop: 26 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 44 - line_stop: 44 - col_start: 26 - col_stop: 27 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 44 - span: - line_start: 44 - line_stop: 44 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 44 - line_stop: 44 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 87 - span: - line_start: 44 - line_stop: 44 - col_start: 29 - col_stop: 30 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 44 - line_stop: 44 - col_start: 30 - col_stop: 31 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 114 - span: - line_start: 44 - line_stop: 44 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 44 - line_stop: 44 - col_start: 32 - col_stop: 33 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 44 - line_stop: 44 - col_start: 33 - col_stop: 34 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 44 - line_stop: 44 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " && hello == \"Hello, World!\";" - span: - line_start: 44 - line_stop: 44 - col_start: 21 - col_stop: 36 - path: compiler-test - content: " && hello == \"Hello, World!\";" - op: Eq - span: - line_start: 44 - line_stop: 44 - col_start: 12 - col_stop: 36 - path: compiler-test - content: " && hello == \"Hello, World!\";" - op: And - span: - line_start: 28 - line_stop: 44 - col_start: 12 - col_stop: 36 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test\n && hello == \"Hello, World!\";" - span: - line_start: 28 - line_stop: 44 - col_start: 5 - col_stop: 36 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test\n && hello == \"Hello, World!\";" - span: - line_start: 25 - line_stop: 45 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(a: u32) -> bool {\n...\n}" - span: - line_start: 25 - line_stop: 45 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" - type_inferenced_theorem: - name: test - expected_input: [] - imports: [] - circuits: - "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}": - circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" - members: - - CircuitVariable: - - "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":5,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" width: u32,\\\"}\"}" - - IntegerType: U32 - - CircuitVariable: - - "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" height: u32,\\\"}\"}" - - IntegerType: U32 - global_consts: - basic: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const basic: u32 = 8;\\\"}\"}" - span: - line_start: 3 - line_stop: 3 - col_start: 7 - col_stop: 12 - path: compiler-test - content: "const basic: u32 = 8;" - type_: - IntegerType: U32 - value: - Value: - Integer: - - U32 - - "8" - - line_start: 3 - line_stop: 3 - col_start: 20 - col_stop: 21 - path: compiler-test - content: "const basic: u32 = 8;" - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 21 - path: compiler-test - content: "const basic: u32 = 8;" - array: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const array: [u8; (3, 2)] = [[0u8; 2]; 3];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 7 - col_stop: 12 - path: compiler-test - content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" - type_: - Array: - - Array: - - IntegerType: U8 - - - value: "2" - - - value: "3" - value: - ArrayInit: - element: - ArrayInit: - element: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 31 - col_stop: 34 - path: compiler-test - content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" - dimensions: - - value: "2" - span: - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 38 - path: compiler-test - content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" - dimensions: - - value: "3" - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 42 - path: compiler-test - content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" - span: - line_start: 4 - line_stop: 4 - col_start: 1 - col_stop: 42 - path: compiler-test - content: "const array: [u8; (3, 2)] = [[0u8; 2]; 3];" - tuple: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"tuple\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const tuple = (1u32, 2u32);\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 12 - path: compiler-test - content: "const tuple = (1u32, 2u32);" - type_: - Tuple: - - IntegerType: U32 - - IntegerType: U32 - value: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "1" - - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 20 - path: compiler-test - content: "const tuple = (1u32, 2u32);" - - Value: - Integer: - - U32 - - "2" - - line_start: 5 - line_stop: 5 - col_start: 22 - col_stop: 26 - path: compiler-test - content: "const tuple = (1u32, 2u32);" - span: - line_start: 5 - line_stop: 5 - col_start: 15 - col_stop: 27 - path: compiler-test - content: "const tuple = (1u32, 2u32);" - span: - line_start: 5 - line_stop: 5 - col_start: 1 - col_stop: 27 - path: compiler-test - content: "const tuple = (1u32, 2u32);" - "a,b": - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const (a, b) = (1u32, 2u32);\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 9 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - - mutable: false - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const (a, b) = (1u32, 2u32);\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 11 - col_stop: 12 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - type_: - Tuple: - - IntegerType: U32 - - IntegerType: U32 - value: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "1" - - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 21 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - - Value: - Integer: - - U32 - - "2" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 27 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 28 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - span: - line_start: 6 - line_stop: 6 - col_start: 1 - col_stop: 28 - path: compiler-test - content: "const (a, b) = (1u32, 2u32);" - simple_group: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"simple_group\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const simple_group: group = 1group;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 7 - col_stop: 19 - path: compiler-test - content: "const simple_group: group = 1group;" - type_: Group - value: - Value: - Group: - Single: - - "1" - - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 35 - path: compiler-test - content: "const simple_group: group = 1group;" - span: - line_start: 7 - line_stop: 7 - col_start: 1 - col_stop: 35 - path: compiler-test - content: "const simple_group: group = 1group;" - complex_group: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"complex_group\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":7,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const complex_group = (_, 1)group;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 7 - col_stop: 20 - path: compiler-test - content: "const complex_group = (_, 1)group;" - type_: Group - value: - Value: - Group: - Tuple: - x: Inferred - y: - Number: - - "1" - - line_start: 8 - line_stop: 8 - col_start: 27 - col_stop: 28 - path: compiler-test - content: "const complex_group = (_, 1)group;" - span: - line_start: 8 - line_stop: 8 - col_start: 24 - col_stop: 34 - path: compiler-test - content: "const complex_group = (_, 1)group;" - span: - line_start: 8 - line_stop: 8 - col_start: 1 - col_stop: 34 - path: compiler-test - content: "const complex_group = (_, 1)group;" - field_test: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"field_test\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":7,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const field_test: field = 2;\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 7 - col_stop: 17 - path: compiler-test - content: "const field_test: field = 2;" - type_: Field - value: - Value: - Field: - - "2" - - line_start: 9 - line_stop: 9 - col_start: 27 - col_stop: 28 - path: compiler-test - content: "const field_test: field = 2;" - span: - line_start: 9 - line_stop: 9 - col_start: 1 - col_stop: 28 - path: compiler-test - content: "const field_test: field = 2;" - use_another_const: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"use_another_const\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":7,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const use_another_const = basic + 1;\\\"}\"}" - span: - line_start: 10 - line_stop: 10 - col_start: 7 - col_stop: 24 - path: compiler-test - content: const use_another_const = basic + 1; - type_: - IntegerType: U32 - value: - Binary: - left: - Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":27,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const use_another_const = basic + 1;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 10 - line_stop: 10 - col_start: 35 - col_stop: 36 - path: compiler-test - content: const use_another_const = basic + 1; - op: Add - span: - line_start: 10 - line_stop: 10 - col_start: 27 - col_stop: 36 - path: compiler-test - content: const use_another_const = basic + 1; - span: - line_start: 10 - line_stop: 10 - col_start: 1 - col_stop: 36 - path: compiler-test - content: const use_another_const = basic + 1; - foo: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" - span: - line_start: 11 - line_stop: 11 - col_start: 7 - col_stop: 10 - path: compiler-test - content: "const foo = Foo { width: 10, height: 20 };" - type_: - Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" - value: - CircuitInit: - name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" - members: - - identifier: "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":19,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" - expression: - Value: - Integer: - - U32 - - "10" - - line_start: 11 - line_stop: 11 - col_start: 26 - col_stop: 28 - path: compiler-test - content: "const foo = Foo { width: 10, height: 20 };" - - identifier: "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":30,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const foo = Foo { width: 10, height: 20 };\\\"}\"}" - expression: - Value: - Integer: - - U32 - - "20" - - line_start: 11 - line_stop: 11 - col_start: 38 - col_stop: 40 - path: compiler-test - content: "const foo = Foo { width: 10, height: 20 };" - span: - line_start: 11 - line_stop: 11 - col_start: 13 - col_stop: 42 - path: compiler-test - content: "const foo = Foo { width: 10, height: 20 };" - span: - line_start: 11 - line_stop: 11 - col_start: 1 - col_stop: 42 - path: compiler-test - content: "const foo = Foo { width: 10, height: 20 };" - uno: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const uno = uno();\\\"}\"}" - span: - line_start: 12 - line_stop: 12 - col_start: 7 - col_stop: 10 - path: compiler-test - content: const uno = uno(); - type_: - IntegerType: U32 - value: - Call: - function: - Identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const uno = uno();\\\"}\"}" - arguments: [] - span: - line_start: 12 - line_stop: 12 - col_start: 13 - col_stop: 18 - path: compiler-test - content: const uno = uno(); - span: - line_start: 12 - line_stop: 12 - col_start: 1 - col_stop: 18 - path: compiler-test - content: const uno = uno(); - character: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":7,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const character = 'a';\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 7 - col_stop: 16 - path: compiler-test - content: "const character = 'a';" - type_: Char - value: - Value: - Char: - character: - Scalar: 97 - span: - line_start: 13 - line_stop: 13 - col_start: 19 - col_stop: 22 - path: compiler-test - content: "const character = 'a';" - span: - line_start: 13 - line_stop: 13 - col_start: 1 - col_stop: 22 - path: compiler-test - content: "const character = 'a';" - hello: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"const hello = \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" - span: - line_start: 14 - line_stop: 14 - col_start: 7 - col_stop: 12 - path: compiler-test - content: "const hello = \"Hello, World!\";" - type_: - Array: - - Char - - - value: "13" - value: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 72 - span: - line_start: 14 - line_stop: 14 - col_start: 16 - col_stop: 17 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 14 - line_stop: 14 - col_start: 17 - col_stop: 18 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 14 - line_stop: 14 - col_start: 18 - col_stop: 19 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 14 - line_stop: 14 - col_start: 19 - col_stop: 20 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 14 - line_stop: 14 - col_start: 20 - col_stop: 21 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 44 - span: - line_start: 14 - line_stop: 14 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 14 - line_stop: 14 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 87 - span: - line_start: 14 - line_stop: 14 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 14 - line_stop: 14 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 114 - span: - line_start: 14 - line_stop: 14 - col_start: 25 - col_stop: 26 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 14 - line_stop: 14 - col_start: 26 - col_stop: 27 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 14 - line_stop: 14 - col_start: 27 - col_stop: 28 - path: compiler-test - content: "const hello = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 14 - line_stop: 14 - col_start: 28 - col_stop: 29 - path: compiler-test - content: "const hello = \"Hello, World!\";" - span: - line_start: 14 - line_stop: 14 - col_start: 15 - col_stop: 30 - path: compiler-test - content: "const hello = \"Hello, World!\";" - span: - line_start: 14 - line_stop: 14 - col_start: 1 - col_stop: 30 - path: compiler-test - content: "const hello = \"Hello, World!\";" - functions: - "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function uno() -> u32 {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function uno() -> u32 {\\\"}\"}" - input: [] - output: - IntegerType: U32 - block: - statements: - - Return: - expression: - Value: - Integer: - - U32 - - "1" - - line_start: 22 - line_stop: 22 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return 1u32;" - span: - line_start: 22 - line_stop: 22 - col_start: 5 - col_stop: 16 - path: compiler-test - content: " return 1u32;" - span: - line_start: 21 - line_stop: 23 - col_start: 23 - col_stop: 2 - path: compiler-test - content: "function uno() -> u32 {\n...\n}" - span: - line_start: 21 - line_stop: 23 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function uno() -> u32 {\n...\n}" - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"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: 25 - line_stop: 25 - 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\":\"x\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (x, y) = (1u32, 2u32);\\\"}\"}" - span: - line_start: 26 - line_stop: 26 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (x, y) = (1u32, 2u32);\\\"}\"}" - span: - line_start: 26 - line_stop: 26 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - type_: - Tuple: - - IntegerType: U32 - - IntegerType: U32 - value: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "1" - - line_start: 26 - line_stop: 26 - col_start: 19 - col_stop: 23 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - - Value: - Integer: - - U32 - - "2" - - line_start: 26 - line_stop: 26 - col_start: 25 - col_stop: 29 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - span: - line_start: 26 - line_stop: 26 - col_start: 18 - col_stop: 30 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - span: - line_start: 26 - line_stop: 26 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " let (x, y) = (1u32, 2u32);" - - Return: - expression: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == basic\\\"}\"}" - right: - Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == basic\\\"}\"}" - op: Eq - span: - line_start: 28 - line_stop: 28 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return a == basic" - right: - Binary: - left: - Identifier: "{\"name\":\"basic\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && basic == 8u32\\\"}\"}" - right: - Value: - Integer: - - U32 - - "8" - - line_start: 29 - line_stop: 29 - col_start: 21 - col_stop: 25 - path: compiler-test - content: " && basic == 8u32" - op: Eq - span: - line_start: 29 - line_stop: 29 - col_start: 12 - col_stop: 25 - path: compiler-test - content: " && basic == 8u32" - op: And - span: - line_start: 28 - line_stop: 29 - col_start: 12 - col_stop: 25 - path: compiler-test - content: " return a == basic\n && basic == 8u32" - right: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && array[0][0] == 0 // arrays\\\"}\"}" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 30 - line_stop: 30 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - span: - line_start: 30 - line_stop: 30 - col_start: 12 - col_stop: 20 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 30 - line_stop: 30 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - span: - line_start: 30 - line_stop: 30 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - right: - Value: - Integer: - - U8 - - "0" - - line_start: 30 - line_stop: 30 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - op: Eq - span: - line_start: 30 - line_stop: 30 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " && array[0][0] == 0 // arrays" - op: And - span: - line_start: 28 - line_stop: 30 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays" - right: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"array\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && array[2][1] == 0\\\"}\"}" - index: - Value: - Integer: - - U32 - - "2" - - line_start: 31 - line_stop: 31 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " && array[2][1] == 0" - span: - line_start: 31 - line_stop: 31 - col_start: 12 - col_stop: 20 - path: compiler-test - content: " && array[2][1] == 0" - index: - Value: - Integer: - - U32 - - "1" - - line_start: 31 - line_stop: 31 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " && array[2][1] == 0" - span: - line_start: 31 - line_stop: 31 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " && array[2][1] == 0" - right: - Value: - Integer: - - U8 - - "0" - - line_start: 31 - line_stop: 31 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " && array[2][1] == 0" - op: Eq - span: - line_start: 31 - line_stop: 31 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " && array[2][1] == 0" - op: And - span: - line_start: 28 - line_stop: 31 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0" - right: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && x == 1u32 // tuple test\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 32 - line_stop: 32 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && x == 1u32 // tuple test" - op: Eq - span: - line_start: 32 - line_stop: 32 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && x == 1u32 // tuple test" - op: And - span: - line_start: 28 - line_stop: 32 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test" - right: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == 2u32 \\\"}\"}" - right: - Value: - Integer: - - U32 - - "2" - - line_start: 33 - line_stop: 33 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && y == 2u32 " - op: Eq - span: - line_start: 33 - line_stop: 33 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && y == 2u32 " - op: And - span: - line_start: 28 - line_stop: 33 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 " - right: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a == 1u32 // tuple extraction test\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 34 - line_stop: 34 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && a == 1u32 // tuple extraction test" - op: Eq - span: - line_start: 34 - line_stop: 34 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && a == 1u32 // tuple extraction test" - op: And - span: - line_start: 28 - line_stop: 34 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test" - right: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && b == 2u32\\\"}\"}" - right: - Value: - Integer: - - U32 - - "2" - - line_start: 35 - line_stop: 35 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && b == 2u32" - op: Eq - span: - line_start: 35 - line_stop: 35 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && b == 2u32" - op: And - span: - line_start: 28 - line_stop: 35 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32" - right: - Binary: - left: - Identifier: "{\"name\":\"simple_group\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":12,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && simple_group == 1group // group test\\\"}\"}" - right: - Value: - Group: - Single: - - "1" - - line_start: 36 - line_stop: 36 - col_start: 28 - col_stop: 34 - path: compiler-test - content: " && simple_group == 1group // group test" - op: Eq - span: - line_start: 36 - line_stop: 36 - col_start: 12 - col_stop: 34 - path: compiler-test - content: " && simple_group == 1group // group test" - op: And - span: - line_start: 28 - line_stop: 36 - col_start: 12 - col_stop: 34 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test" - right: - Binary: - left: - Identifier: "{\"name\":\"complex_group\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":12,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && complex_group == (_, 1)group\\\"}\"}" - right: - Value: - Group: - Tuple: - x: Inferred - y: - Number: - - "1" - - line_start: 37 - line_stop: 37 - col_start: 33 - col_stop: 34 - path: compiler-test - content: " && complex_group == (_, 1)group" - span: - line_start: 37 - line_stop: 37 - col_start: 30 - col_stop: 40 - path: compiler-test - content: " && complex_group == (_, 1)group" - op: Eq - span: - line_start: 37 - line_stop: 37 - col_start: 12 - col_stop: 40 - path: compiler-test - content: " && complex_group == (_, 1)group" - op: And - span: - line_start: 28 - line_stop: 37 - col_start: 12 - col_stop: 40 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group" - right: - Binary: - left: - Identifier: "{\"name\":\"field_test\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":12,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && field_test == 2field // field test\\\"}\"}" - right: - Value: - Field: - - "2" - - line_start: 38 - line_stop: 38 - col_start: 26 - col_stop: 32 - path: compiler-test - content: " && field_test == 2field // field test" - op: Eq - span: - line_start: 38 - line_stop: 38 - col_start: 12 - col_stop: 32 - path: compiler-test - content: " && field_test == 2field // field test" - op: And - span: - line_start: 28 - line_stop: 38 - col_start: 12 - col_stop: 32 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test" - right: - Binary: - left: - Identifier: "{\"name\":\"use_another_const\",\"span\":\"{\\\"line_start\\\":39,\\\"line_stop\\\":39,\\\"col_start\\\":12,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && use_another_const == 9u32 // use another const test\\\"}\"}" - right: - Value: - Integer: - - U32 - - "9" - - line_start: 39 - line_stop: 39 - col_start: 33 - col_stop: 37 - path: compiler-test - content: " && use_another_const == 9u32 // use another const test" - op: Eq - span: - line_start: 39 - line_stop: 39 - col_start: 12 - col_stop: 37 - path: compiler-test - content: " && use_another_const == 9u32 // use another const test" - op: And - span: - line_start: 28 - line_stop: 39 - col_start: 12 - col_stop: 37 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test" - right: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.width == 10u32 // circuit test\\\"}\"}" - name: "{\"name\":\"width\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":16,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.width == 10u32 // circuit test\\\"}\"}" - span: - line_start: 40 - line_stop: 40 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && foo.width == 10u32 // circuit test" - right: - Value: - Integer: - - U32 - - "10" - - line_start: 40 - line_stop: 40 - col_start: 25 - col_stop: 30 - path: compiler-test - content: " && foo.width == 10u32 // circuit test" - op: Eq - span: - line_start: 40 - line_stop: 40 - col_start: 12 - col_stop: 30 - path: compiler-test - content: " && foo.width == 10u32 // circuit test" - op: And - span: - line_start: 28 - line_stop: 40 - col_start: 12 - col_stop: 30 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test" - right: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.height == 20u32\\\"}\"}" - name: "{\"name\":\"height\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":16,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && foo.height == 20u32\\\"}\"}" - span: - line_start: 41 - line_stop: 41 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " && foo.height == 20u32" - right: - Value: - Integer: - - U32 - - "20" - - line_start: 41 - line_stop: 41 - col_start: 26 - col_stop: 31 - path: compiler-test - content: " && foo.height == 20u32" - op: Eq - span: - line_start: 41 - line_stop: 41 - col_start: 12 - col_stop: 31 - path: compiler-test - content: " && foo.height == 20u32" - op: And - span: - line_start: 28 - line_stop: 41 - col_start: 12 - col_stop: 31 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32" - right: - Binary: - left: - Identifier: "{\"name\":\"uno\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && uno == 1u32 // function test\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 42 - line_stop: 42 - col_start: 19 - col_stop: 23 - path: compiler-test - content: " && uno == 1u32 // function test" - op: Eq - span: - line_start: 42 - line_stop: 42 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " && uno == 1u32 // function test" - op: And - span: - line_start: 28 - line_stop: 42 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test" - right: - Binary: - left: - Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && character == 'a' // char test\\\"}\"}" - right: - Value: - Char: - character: - Scalar: 97 - span: - line_start: 43 - line_stop: 43 - col_start: 25 - col_stop: 28 - path: compiler-test - content: " && character == 'a' // char test" - op: Eq - span: - line_start: 43 - line_stop: 43 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " && character == 'a' // char test" - op: And - span: - line_start: 28 - line_stop: 43 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test" - right: - Binary: - left: - Identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && hello == \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 72 - span: - line_start: 44 - line_stop: 44 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 44 - line_stop: 44 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 44 - line_stop: 44 - col_start: 24 - col_stop: 25 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 44 - line_stop: 44 - col_start: 25 - col_stop: 26 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 44 - line_stop: 44 - col_start: 26 - col_stop: 27 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 44 - span: - line_start: 44 - line_stop: 44 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 44 - line_stop: 44 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 87 - span: - line_start: 44 - line_stop: 44 - col_start: 29 - col_stop: 30 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 44 - line_stop: 44 - col_start: 30 - col_stop: 31 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 114 - span: - line_start: 44 - line_stop: 44 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 44 - line_stop: 44 - col_start: 32 - col_stop: 33 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 44 - line_stop: 44 - col_start: 33 - col_stop: 34 - path: compiler-test - content: " && hello == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 44 - line_stop: 44 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " && hello == \"Hello, World!\";" - span: - line_start: 44 - line_stop: 44 - col_start: 21 - col_stop: 36 - path: compiler-test - content: " && hello == \"Hello, World!\";" - op: Eq - span: - line_start: 44 - line_stop: 44 - col_start: 12 - col_stop: 36 - path: compiler-test - content: " && hello == \"Hello, World!\";" - op: And - span: - line_start: 28 - line_stop: 44 - col_start: 12 - col_stop: 36 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test\n && hello == \"Hello, World!\";" - span: - line_start: 28 - line_stop: 44 - col_start: 5 - col_stop: 36 - path: compiler-test - content: " return a == basic\n && basic == 8u32\n && array[0][0] == 0 // arrays\n && array[2][1] == 0\n && x == 1u32 // tuple test\n && y == 2u32 \n && a == 1u32 // tuple extraction test\n && b == 2u32\n && simple_group == 1group // group test\n && complex_group == (_, 1)group\n && field_test == 2field // field test\n && use_another_const == 9u32 // use another const test\n && foo.width == 10u32 // circuit test\n && foo.height == 20u32\n && uno == 1u32 // function test\n && character == 'a' // char test\n && hello == \"Hello, World!\";" - span: - line_start: 25 - line_stop: 45 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(a: u32) -> bool {\n...\n}" - span: - line_start: 25 - line_stop: 45 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + initial_theorem: 8b9ad0b83a216048ab6179c6e223f68290059bab1deb72771f72a672ea7a0bf9 + canonicalized_theorem: acdf383c635404bccf9612be9c14c96e400496fb231cf3062bce9aa269331c0f + type_inferenced_theorem: ab3b8dc3ddfba1affaacf2bc344c658d5b82419544da136e42c810a3f99f3832 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out index 23bca74e7b..3a7c2cced7 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out @@ -16,213 +16,6 @@ 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}" + initial_theorem: c9a0358dec57807c9afbce3bb523f3677a19873b713b16e15b31be9b58e7e938 + canonicalized_theorem: c9a0358dec57807c9afbce3bb523f3677a19873b713b16e15b31be9b58e7e938 + type_inferenced_theorem: 33c49e9288050147b62513345adee7c22e7326ccef9bcf9b4e6782376a89de8f diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out index 2d51d9001a..8116d87e15 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out @@ -16,281 +16,6 @@ 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}" + initial_theorem: 49288b2a38f96d3b0d7dfafd780a028815c4f3dc033e9083daa9226ac630e9d2 + canonicalized_theorem: 49288b2a38f96d3b0d7dfafd780a028815c4f3dc033e9083daa9226ac630e9d2 + type_inferenced_theorem: 1324a840dafe289197021fddf594be6becdf99b195f37596af43ce300f84b023 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out index 06c2f7aa2e..7f8da2d37d 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out @@ -16,351 +16,6 @@ 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}" + initial_theorem: 812d646edd6b14d9e27244a9da95ce1dc805fcaac8b654f9e3e962837e776f84 + canonicalized_theorem: 812d646edd6b14d9e27244a9da95ce1dc805fcaac8b654f9e3e962837e776f84 + type_inferenced_theorem: 249bacf5d583e861e2e8168fdbb3d3a0219d5a00f5b2ba3ca4dcd94f62ef575d diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out index c708787a32..60a19c386f 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out @@ -16,357 +16,6 @@ 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}" + initial_theorem: f3bac684fe095a005d0d4811a3878d9c1ae67df0ad3a6229ac3f098ad413afb2 + canonicalized_theorem: f3bac684fe095a005d0d4811a3878d9c1ae67df0ad3a6229ac3f098ad413afb2 + type_inferenced_theorem: 0ece5b45cc7f746d06d626cce250e212fbd48eeecc61e972394609494937f7bc diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out index 6c7dad39ad..3aaf238a89 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out @@ -13,395 +13,6 @@ 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" + initial_theorem: b44ed4078cfd47b305648f8b661e63a925d296608b6e05e68922153dc384e5a6 + canonicalized_theorem: f63a180228feec0dd67f648abb07cbf595d43820ea1a98f3fcb746bbd7a6abe9 + type_inferenced_theorem: b3179dda593e9c7cd3607416273206a5ae8d171f2c46e6a724f6877e7f3e94b1 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out index 7ac14841ca..2a6ae0d82f 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out @@ -16,1299 +16,6 @@ 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; (2, 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(x: [i16; (2, 2, 3)]) -> 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; (2, 2, 3)]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: I16 - - - value: "2" - - value: "2" - - value: "3" - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(x: [i16; (2, 2, 3)]) -> bool {" - output: Boolean - block: - statements: - - Console: - function: - Log: - parts: - - Const: "x: " - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"x: {}\\\\\\\", x);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " console.log(\"x: {}\", x);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " console.log(\"x: {}\", x);" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - type_: - Array: - - IntegerType: I16 - - - value: "2" - - value: "2" - - value: "3" - value: - ArrayInit: - element: - Value: - Integer: - - I16 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 34 - col_stop: 38 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - dimensions: - - value: "2" - - value: "2" - - value: "3" - span: - line_start: 6 - line_stop: 6 - col_start: 33 - col_stop: 50 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 50 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - - Console: - function: - Log: - parts: - - Const: "y: " - - Container - parameters: - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"y: {}\\\\\\\", y);\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " console.log(\"y: {}\", y);" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " console.log(\"y: {}\", y);" - - Return: - expression: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 26 - col_stop: 30 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 26 - col_stop: 33 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 26 - col_stop: 36 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 36 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 9 - line_stop: 9 - col_start: 42 - col_stop: 43 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 40 - col_stop: 44 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "1" - - line_start: 9 - line_stop: 9 - col_start: 45 - col_stop: 46 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 40 - col_stop: 47 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "2" - - line_start: 9 - line_stop: 9 - col_start: 48 - col_stop: 49 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 40 - col_stop: 50 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":54,\\\"col_stop\\\":55,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 9 - line_stop: 9 - col_start: 56 - col_stop: 57 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 54 - col_stop: 58 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "1" - - line_start: 9 - line_stop: 9 - col_start: 59 - col_stop: 60 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 54 - col_stop: 61 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "2" - - line_start: 9 - line_stop: 9 - col_start: 62 - col_stop: 63 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 54 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 40 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: And - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 3 - line_stop: 10 - col_start: 44 - col_stop: 2 - path: compiler-test - content: "function main(x: [i16; (2, 2, 3)]) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 10 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: [i16; (2, 2, 3)]) -> 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(x: [i16; (2, 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(x: [i16; (2, 2, 3)]) -> 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; (2, 2, 3)]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Array: - - Array: - - IntegerType: I16 - - - value: "3" - - - value: "2" - - - value: "2" - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(x: [i16; (2, 2, 3)]) -> bool {" - output: Boolean - block: - statements: - - Console: - function: - Log: - parts: - - Const: "x: " - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"x: {}\\\\\\\", x);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " console.log(\"x: {}\", x);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " console.log(\"x: {}\", x);" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - type_: - Array: - - Array: - - Array: - - IntegerType: I16 - - - value: "3" - - - value: "2" - - - value: "2" - value: - ArrayInit: - element: - ArrayInit: - element: - ArrayInit: - element: - Value: - Integer: - - I16 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 34 - col_stop: 38 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - dimensions: - - value: "3" - span: - line_start: 6 - line_stop: 6 - col_start: 33 - col_stop: 50 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - dimensions: - - value: "2" - span: - line_start: 6 - line_stop: 6 - col_start: 33 - col_stop: 50 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - dimensions: - - value: "2" - span: - line_start: 6 - line_stop: 6 - col_start: 33 - col_stop: 50 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 50 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - - Console: - function: - Log: - parts: - - Const: "y: " - - Container - parameters: - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"y: {}\\\\\\\", y);\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " console.log(\"y: {}\", y);" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " console.log(\"y: {}\", y);" - - Return: - expression: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 26 - col_stop: 30 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 26 - col_stop: 33 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 26 - col_stop: 36 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 36 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 9 - line_stop: 9 - col_start: 42 - col_stop: 43 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 40 - col_stop: 44 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "1" - - line_start: 9 - line_stop: 9 - col_start: 45 - col_stop: 46 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 40 - col_stop: 47 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "2" - - line_start: 9 - line_stop: 9 - col_start: 48 - col_stop: 49 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 40 - col_stop: 50 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":54,\\\"col_stop\\\":55,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 9 - line_stop: 9 - col_start: 56 - col_stop: 57 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 54 - col_stop: 58 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "1" - - line_start: 9 - line_stop: 9 - col_start: 59 - col_stop: 60 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 54 - col_stop: 61 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "2" - - line_start: 9 - line_stop: 9 - col_start: 62 - col_stop: 63 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 54 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 40 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: And - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 3 - line_stop: 10 - col_start: 44 - col_stop: 2 - path: compiler-test - content: "function main(x: [i16; (2, 2, 3)]) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 10 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: [i16; (2, 2, 3)]) -> 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(x: [i16; (2, 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(x: [i16; (2, 2, 3)]) -> 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; (2, 2, 3)]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Array: - - Array: - - IntegerType: I16 - - - value: "3" - - - value: "2" - - - value: "2" - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(x: [i16; (2, 2, 3)]) -> bool {" - output: Boolean - block: - statements: - - Console: - function: - Log: - parts: - - Const: "x: " - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"x: {}\\\\\\\", x);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " console.log(\"x: {}\", x);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " console.log(\"x: {}\", x);" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - type_: - Array: - - Array: - - Array: - - IntegerType: I16 - - - value: "3" - - - value: "2" - - - value: "2" - value: - ArrayInit: - element: - ArrayInit: - element: - ArrayInit: - element: - Value: - Integer: - - I16 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 34 - col_stop: 38 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - dimensions: - - value: "3" - span: - line_start: 6 - line_stop: 6 - col_start: 33 - col_stop: 50 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - dimensions: - - value: "2" - span: - line_start: 6 - line_stop: 6 - col_start: 33 - col_stop: 50 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - dimensions: - - value: "2" - span: - line_start: 6 - line_stop: 6 - col_start: 33 - col_stop: 50 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 50 - path: compiler-test - content: " const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)];" - - Console: - function: - Log: - parts: - - Const: "y: " - - Container - parameters: - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"y: {}\\\\\\\", y);\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 27 - path: compiler-test - content: " console.log(\"y: {}\", y);" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " console.log(\"y: {}\", y);" - - Return: - expression: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 9 - line_stop: 9 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 9 - line_stop: 9 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 9 - line_stop: 9 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 9 - line_stop: 9 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 26 - col_stop: 30 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 9 - line_stop: 9 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 26 - col_stop: 33 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 9 - line_stop: 9 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 26 - col_stop: 36 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 36 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Integer: - - U32 - - "1" - - line_start: 9 - line_stop: 9 - col_start: 42 - col_stop: 43 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 40 - col_stop: 44 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "1" - - line_start: 9 - line_stop: 9 - col_start: 45 - col_stop: 46 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 40 - col_stop: 47 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "2" - - line_start: 9 - line_stop: 9 - col_start: 48 - col_stop: 49 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 40 - col_stop: 50 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":54,\\\"col_stop\\\":55,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Integer: - - U32 - - "1" - - line_start: 9 - line_stop: 9 - col_start: 56 - col_stop: 57 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 54 - col_stop: 58 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "1" - - line_start: 9 - line_stop: 9 - col_start: 59 - col_stop: 60 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 54 - col_stop: 61 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "2" - - line_start: 9 - line_stop: 9 - col_start: 62 - col_stop: 63 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 54 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 40 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: And - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 3 - line_stop: 10 - col_start: 44 - col_stop: 2 - path: compiler-test - content: "function main(x: [i16; (2, 2, 3)]) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 10 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: [i16; (2, 2, 3)]) -> bool {\n...\n}\n\n\n\n\n" + initial_theorem: 0b7d9217b441385cf29f20d5e73748627dcea1a608ccfb42ef3f1dc5e68caaac + canonicalized_theorem: 8168a20e4754f86746678eaf7dd23d741b7d81d7ddba1822e0a90fd8c3149651 + type_inferenced_theorem: 43dcf7397576914601b03d1b7fd92f531992aca52f0879646316df0840d9ff6a diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out index 57aa17e8a8..3423a11d0a 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out @@ -16,225 +16,6 @@ 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}" + initial_theorem: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 + canonicalized_theorem: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 + type_inferenced_theorem: 730367497b7b56381f29321e18eade74d70107a6d8c657b47022215015f53801 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out index 8df10fca5c..7427c2d1e2 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out @@ -16,478 +16,6 @@ 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}" + initial_theorem: 4d78c30ded08f7db4f66f8fb7a2afe70aeb6aa8e6deb904c559497c776147446 + canonicalized_theorem: a946a3abb84533a9d3b0ea014355920a058aa37b3fd7025946f35a317e0693e9 + type_inferenced_theorem: 0dad4ae7f3f49065239efb989eff41070ad109ae66331c15ae455718ef915563 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out index 1b157d941f..248601f71a 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out @@ -16,518 +16,6 @@ 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}" + initial_theorem: 0f65ed036cf7ac2bf2d9b1e73406b7f8ea669c3392b24c171697f924a99025b9 + canonicalized_theorem: 0f65ed036cf7ac2bf2d9b1e73406b7f8ea669c3392b24c171697f924a99025b9 + type_inferenced_theorem: 685758ab99acb9f79da0c0665097d1dc34d821d02502011dee82c5564e5f885a diff --git a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out index df3de426fd..67cb3f66e0 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out @@ -16,249 +16,6 @@ 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}" + initial_theorem: 1c5370b54401931103a9aee59aadbc05dd747e758a20dcf9665ba181777d76d5 + canonicalized_theorem: 1c5370b54401931103a9aee59aadbc05dd747e758a20dcf9665ba181777d76d5 + type_inferenced_theorem: 04a1f100613ccf2f49733ecc76c83058d78c14c03fc4817df117eaa9a8296c66 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out index b13abeff08..bce194cc1f 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out @@ -16,894 +16,6 @@ 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" + initial_theorem: 1ef884c7c1e9e5a806bc5dce27cd68f33b3cddf5c1ebf930a292fd6adb5762ce + canonicalized_theorem: 1ef884c7c1e9e5a806bc5dce27cd68f33b3cddf5c1ebf930a292fd6adb5762ce + type_inferenced_theorem: aeedb43de348c034bee08c8df80d0fb2e8f9e7f11989e57cfa4fb8bbf876eb83 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out index b3cc41785c..19c1045716 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out @@ -16,285 +16,6 @@ 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(const 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(const a: bool, b: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, b: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: bool, b: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, b: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 30 - col_stop: 31 - path: compiler-test - content: "function main(const a: bool, b: bool) -> 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 == true == b;\\\"}\"}" - right: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " return a == true == b;" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == true == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 26 - path: compiler-test - content: " return a == true == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " return a == true == b;" - span: - line_start: 3 - line_stop: 5 - col_start: 47 - col_stop: 2 - path: compiler-test - content: "function main(const 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(const 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(const 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(const a: bool, b: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, b: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: bool, b: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, b: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 30 - col_stop: 31 - path: compiler-test - content: "function main(const a: bool, b: bool) -> 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 == true == b;\\\"}\"}" - right: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " return a == true == b;" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == true == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 26 - path: compiler-test - content: " return a == true == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " return a == true == b;" - span: - line_start: 3 - line_stop: 5 - col_start: 47 - col_stop: 2 - path: compiler-test - content: "function main(const 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(const 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(const 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(const a: bool, b: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, b: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: bool, b: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, b: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 30 - col_stop: 31 - path: compiler-test - content: "function main(const a: bool, b: bool) -> 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 == true == b;\\\"}\"}" - right: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " return a == true == b;" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == true == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 26 - path: compiler-test - content: " return a == true == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " return a == true == b;" - span: - line_start: 3 - line_stop: 5 - col_start: 47 - col_stop: 2 - path: compiler-test - content: "function main(const 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(const a: bool, b: bool) -> bool {\n...\n}" + initial_theorem: 0ef02cf93072c348503a723a38e972ef2439ca9160ebc4e68741929b60138aa4 + canonicalized_theorem: 0ef02cf93072c348503a723a38e972ef2439ca9160ebc4e68741929b60138aa4 + type_inferenced_theorem: b3b0114629852238e4488b5be7a1d4af601806674ee6408c2335c3a80ac04b0e diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out index de1bfcd5e5..f9e312de29 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out @@ -16,419 +16,6 @@ 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(const x: [i16; 1], 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(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: - Array: - - IntegerType: I16 - - - value: "1" - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const x: [i16; 1], y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 34 - col_stop: 35 - path: compiler-test - content: "function main(const x: [i16; 1], y: bool) -> bool {" - output: Boolean - block: - statements: - - Console: - function: - Log: - parts: - - Const: "" - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 24 - path: compiler-test - content: " console.log(\"{}\", x);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " console.log(\"{}\", x);" - - Return: - expression: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0] == 0 == y;\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 5 - line_stop: 5 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " return x[0] == 0 == y;" - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return x[0] == 0 == y;" - right: - Value: - Implicit: - - "0" - - line_start: 5 - line_stop: 5 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " return x[0] == 0 == y;" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return x[0] == 0 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0] == 0 == y;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 26 - path: compiler-test - content: " return x[0] == 0 == y;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " return x[0] == 0 == y;" - span: - line_start: 3 - line_stop: 6 - col_start: 51 - col_stop: 2 - path: compiler-test - content: "function main(const x: [i16; 1], y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(const x: [i16; 1], 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(const x: [i16; 1], 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(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: - Array: - - IntegerType: I16 - - - value: "1" - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const x: [i16; 1], y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 34 - col_stop: 35 - path: compiler-test - content: "function main(const x: [i16; 1], y: bool) -> bool {" - output: Boolean - block: - statements: - - Console: - function: - Log: - parts: - - Const: "" - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 24 - path: compiler-test - content: " console.log(\"{}\", x);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " console.log(\"{}\", x);" - - Return: - expression: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0] == 0 == y;\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 5 - line_stop: 5 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " return x[0] == 0 == y;" - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return x[0] == 0 == y;" - right: - Value: - Implicit: - - "0" - - line_start: 5 - line_stop: 5 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " return x[0] == 0 == y;" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return x[0] == 0 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0] == 0 == y;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 26 - path: compiler-test - content: " return x[0] == 0 == y;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " return x[0] == 0 == y;" - span: - line_start: 3 - line_stop: 6 - col_start: 51 - col_stop: 2 - path: compiler-test - content: "function main(const x: [i16; 1], y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(const x: [i16; 1], 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(const x: [i16; 1], 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(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: - Array: - - IntegerType: I16 - - - value: "1" - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const x: [i16; 1], y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; 1], y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 34 - col_stop: 35 - path: compiler-test - content: "function main(const x: [i16; 1], y: bool) -> bool {" - output: Boolean - block: - statements: - - Console: - function: - Log: - parts: - - Const: "" - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 24 - path: compiler-test - content: " console.log(\"{}\", x);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " console.log(\"{}\", x);" - - Return: - expression: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0] == 0 == y;\\\"}\"}" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " return x[0] == 0 == y;" - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return x[0] == 0 == y;" - right: - Value: - Integer: - - I16 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " return x[0] == 0 == y;" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return x[0] == 0 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0] == 0 == y;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 26 - path: compiler-test - content: " return x[0] == 0 == y;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " return x[0] == 0 == y;" - span: - line_start: 3 - line_stop: 6 - col_start: 51 - col_stop: 2 - path: compiler-test - content: "function main(const x: [i16; 1], y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(const x: [i16; 1], y: bool) -> bool {\n...\n}\n" + initial_theorem: 6726f88925f393f90e09f536b7da48575feb19fb2f30f5fb8ce0968b66a469b1 + canonicalized_theorem: 6726f88925f393f90e09f536b7da48575feb19fb2f30f5fb8ce0968b66a469b1 + type_inferenced_theorem: 3b0f1f17c8876d1e1a644bb425beedbc951e38683f33f726edaf12a6d003d896 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out index a87b6a37c2..c0abae8219 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out @@ -16,351 +16,6 @@ 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(const 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(const a: char, y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: char, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Char - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: char, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: char, y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 30 - col_stop: 31 - path: compiler-test - content: "function main(const 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(const 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(const 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(const 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(const a: char, y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: char, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Char - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: char, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: char, y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 30 - col_stop: 31 - path: compiler-test - content: "function main(const 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(const 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(const 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(const 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(const a: char, y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: char, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Char - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: char, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: char, y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 30 - col_stop: 31 - path: compiler-test - content: "function main(const 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(const 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(const a: char, y: bool) -> bool {\n...\n}" + initial_theorem: 0fd985182a4a32bc7b983c13e4f7b188902b6ef37ea1fbaa22da867b388990e8 + canonicalized_theorem: 0fd985182a4a32bc7b983c13e4f7b188902b6ef37ea1fbaa22da867b388990e8 + type_inferenced_theorem: 08864c66bc6890ed6d83cbb214318f7423735533f0146a856a9bdf5b8d48e816 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out index a3ebe4cab5..9cacd78b35 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out @@ -16,357 +16,6 @@ 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(const a: field, const 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(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Field - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: field, const b: field, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Field - span: - line_start: 3 - line_stop: 3 - col_start: 37 - col_stop: 38 - path: compiler-test - content: "function main(const a: field, const b: field, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":47,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 47 - col_stop: 48 - path: compiler-test - content: "function main(const a: field, const 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: 64 - col_stop: 2 - path: compiler-test - content: "function main(const a: field, const 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(const a: field, const 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(const a: field, const 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(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Field - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: field, const b: field, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Field - span: - line_start: 3 - line_stop: 3 - col_start: 37 - col_stop: 38 - path: compiler-test - content: "function main(const a: field, const b: field, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":47,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 47 - col_stop: 48 - path: compiler-test - content: "function main(const a: field, const 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: 64 - col_stop: 2 - path: compiler-test - content: "function main(const a: field, const 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(const a: field, const 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(const a: field, const 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(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Field - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: field, const b: field, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Field - span: - line_start: 3 - line_stop: 3 - col_start: 37 - col_stop: 38 - path: compiler-test - content: "function main(const a: field, const b: field, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":47,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: field, const b: field, y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 47 - col_stop: 48 - path: compiler-test - content: "function main(const a: field, const 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: 64 - col_stop: 2 - path: compiler-test - content: "function main(const a: field, const 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(const a: field, const b: field, y: bool) -> bool {\n...\n}" + initial_theorem: da17f98e5cf8d90b4d73d797493d752c9d519c61cf900509c866a0649c034cad + canonicalized_theorem: da17f98e5cf8d90b4d73d797493d752c9d519c61cf900509c866a0649c034cad + type_inferenced_theorem: 5842a5364abf56e9a51e69b2ded9fdce009c8851d86beba39ba8ab373394ef66 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out index 46f94575eb..9f10cbaa20 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out @@ -16,519 +16,6 @@ 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(const a: group, const b: group, const c: group, 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(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Group - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Group - span: - line_start: 3 - line_stop: 3 - col_start: 37 - col_stop: 38 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":53,\\\"col_stop\\\":54,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Group - span: - line_start: 3 - line_stop: 3 - col_start: 53 - col_stop: 54 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":63,\\\"col_stop\\\":64,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 63 - col_stop: 64 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" - output: Boolean - 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);" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}" - right: - Value: - Boolean: - - "true" - - line_start: 9 - line_stop: 9 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " return y == true;" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return y == true;" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " return y == true;" - span: - line_start: 3 - line_stop: 10 - col_start: 80 - col_stop: 2 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 10 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, 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(const a: group, const b: group, const c: group, 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(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Group - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Group - span: - line_start: 3 - line_stop: 3 - col_start: 37 - col_stop: 38 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":53,\\\"col_stop\\\":54,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Group - span: - line_start: 3 - line_stop: 3 - col_start: 53 - col_stop: 54 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":63,\\\"col_stop\\\":64,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 63 - col_stop: 64 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" - output: Boolean - 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);" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}" - right: - Value: - Boolean: - - "true" - - line_start: 9 - line_stop: 9 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " return y == true;" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return y == true;" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " return y == true;" - span: - line_start: 3 - line_stop: 10 - col_start: 80 - col_stop: 2 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 10 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, 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(const a: group, const b: group, const c: group, 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(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Group - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Group - span: - line_start: 3 - line_stop: 3 - col_start: 37 - col_stop: 38 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":53,\\\"col_stop\\\":54,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Group - span: - line_start: 3 - line_stop: 3 - col_start: 53 - col_stop: 54 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":63,\\\"col_stop\\\":64,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: group, const b: group, const c: group, y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 63 - col_stop: 64 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {" - output: Boolean - 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);" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}" - right: - Value: - Boolean: - - "true" - - line_start: 9 - line_stop: 9 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " return y == true;" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return y == true;" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " return y == true;" - span: - line_start: 3 - line_stop: 10 - col_start: 80 - col_stop: 2 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 10 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(const a: group, const b: group, const c: group, y: bool) -> bool {\n...\n}\n\n\n\n\n" + initial_theorem: 3d5a53e68eb786c6a74618b539714d3fffbcc890444a5d57409a88cc214cfb7e + canonicalized_theorem: 3d5a53e68eb786c6a74618b539714d3fffbcc890444a5d57409a88cc214cfb7e + type_inferenced_theorem: 2baac7174583b7f6562bd0715d58da99c335c8ccfd56a2286e18ae57ea078694 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out index f05a7e68a8..9bdf311b07 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out @@ -16,1031 +16,6 @@ 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(const x: [i16; (2, 2, 3)], y: [i16; (2, 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(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: - Array: - - IntegerType: I16 - - - value: "2" - - value: "2" - - value: "3" - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: I16 - - - value: "2" - - value: "2" - - value: "3" - span: - line_start: 3 - line_stop: 3 - col_start: 42 - col_stop: 43 - path: compiler-test - content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - 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][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 26 - col_stop: 30 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 26 - col_stop: 33 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 26 - col_stop: 36 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 36 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 43 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 44 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "1" - - line_start: 4 - line_stop: 4 - col_start: 45 - col_stop: 46 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 47 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "2" - - line_start: 4 - line_stop: 4 - col_start: 48 - col_stop: 49 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 50 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":54,\\\"col_stop\\\":55,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 4 - line_stop: 4 - col_start: 56 - col_stop: 57 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 54 - col_stop: 58 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "1" - - line_start: 4 - line_stop: 4 - col_start: 59 - col_stop: 60 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 54 - col_stop: 61 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "2" - - line_start: 4 - line_stop: 4 - col_start: 62 - col_stop: 63 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 54 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: And - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 3 - line_stop: 5 - col_start: 71 - col_stop: 2 - path: compiler-test - content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> 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(const x: [i16; (2, 2, 3)], y: [i16; (2, 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(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: - Array: - - Array: - - Array: - - IntegerType: I16 - - - value: "3" - - - value: "2" - - - value: "2" - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Array: - - Array: - - IntegerType: I16 - - - value: "3" - - - value: "2" - - - value: "2" - span: - line_start: 3 - line_stop: 3 - col_start: 42 - col_stop: 43 - path: compiler-test - content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - 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][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 26 - col_stop: 30 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 26 - col_stop: 33 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 26 - col_stop: 36 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 36 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 43 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 44 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "1" - - line_start: 4 - line_stop: 4 - col_start: 45 - col_stop: 46 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 47 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "2" - - line_start: 4 - line_stop: 4 - col_start: 48 - col_stop: 49 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 50 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":54,\\\"col_stop\\\":55,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 4 - line_stop: 4 - col_start: 56 - col_stop: 57 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 54 - col_stop: 58 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "1" - - line_start: 4 - line_stop: 4 - col_start: 59 - col_stop: 60 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 54 - col_stop: 61 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Implicit: - - "2" - - line_start: 4 - line_stop: 4 - col_start: 62 - col_stop: 63 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 54 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: And - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 3 - line_stop: 5 - col_start: 71 - col_stop: 2 - path: compiler-test - content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> 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(const x: [i16; (2, 2, 3)], y: [i16; (2, 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(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: - Array: - - Array: - - Array: - - IntegerType: I16 - - - value: "3" - - - value: "2" - - - value: "2" - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Array: - - Array: - - IntegerType: I16 - - - value: "3" - - - value: "2" - - - value: "2" - span: - line_start: 3 - line_stop: 3 - col_start: 42 - col_stop: 43 - path: compiler-test - content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - 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][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - 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][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 26 - col_stop: 30 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 26 - col_stop: 33 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 26 - col_stop: 36 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 36 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - Binary: - left: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 43 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 44 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 45 - col_stop: 46 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 47 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 48 - col_stop: 49 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 50 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - right: - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":54,\\\"col_stop\\\":55,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];\\\"}\"}" - index: - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 56 - col_stop: 57 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 54 - col_stop: 58 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 59 - col_stop: 60 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 54 - col_stop: 61 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - index: - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 62 - col_stop: 63 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 54 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - op: And - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 64 - path: compiler-test - content: " return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2];" - span: - line_start: 3 - line_stop: 5 - col_start: 71 - col_stop: 2 - path: compiler-test - content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool {\n...\n}" + initial_theorem: a42e650c64317b4ee6145da788ff7348dbe61543e87016c7491854edc7104e3b + canonicalized_theorem: ebda82101177805ec323d0cce8325ea29090a7942d6784f074444fdf370c3e2e + type_inferenced_theorem: c034b0dec8b1c4b3aa735137d2294514a7014a223565811054fbf7d69b67c9da diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out index c3138e4d00..77ba67208d 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out @@ -16,297 +16,6 @@ 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(const a: bool, const b: bool, 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(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: bool, const b: bool, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":36,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 36 - col_stop: 37 - path: compiler-test - content: "function main(const a: bool, const b: bool, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":45,\\\"col_stop\\\":46,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 45 - col_stop: 46 - path: compiler-test - content: "function main(const a: bool, const b: bool, y: bool) -> 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 == y;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == y;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == y;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == y;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == y;" - span: - line_start: 3 - line_stop: 5 - col_start: 62 - col_stop: 2 - path: compiler-test - content: "function main(const a: bool, const b: bool, y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(const a: bool, const b: bool, 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(const a: bool, const b: bool, 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(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: bool, const b: bool, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":36,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 36 - col_stop: 37 - path: compiler-test - content: "function main(const a: bool, const b: bool, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":45,\\\"col_stop\\\":46,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 45 - col_stop: 46 - path: compiler-test - content: "function main(const a: bool, const b: bool, y: bool) -> 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 == y;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == y;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == y;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == y;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == y;" - span: - line_start: 3 - line_stop: 5 - col_start: 62 - col_stop: 2 - path: compiler-test - content: "function main(const a: bool, const b: bool, y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(const a: bool, const b: bool, 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(const a: bool, const b: bool, 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(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: bool, const b: bool, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":36,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 36 - col_stop: 37 - path: compiler-test - content: "function main(const a: bool, const b: bool, y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":45,\\\"col_stop\\\":46,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: bool, const b: bool, y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 45 - col_stop: 46 - path: compiler-test - content: "function main(const a: bool, const b: bool, y: bool) -> 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 == y;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == y;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == y;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == y;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == y;" - span: - line_start: 3 - line_stop: 5 - col_start: 62 - col_stop: 2 - path: compiler-test - content: "function main(const a: bool, const b: bool, y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(const a: bool, const b: bool, y: bool) -> bool {\n...\n}" + initial_theorem: ef8bcab6d5371ef86e4d7e5df90ca23079b9e5fedbfd7917b08be3a1d2ebb5b6 + canonicalized_theorem: ef8bcab6d5371ef86e4d7e5df90ca23079b9e5fedbfd7917b08be3a1d2ebb5b6 + type_inferenced_theorem: c199ab005e42c960beb6ca2b62e6b0d144960e7360530ad4fb89757f412e1c67 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out index c27c9c0c2c..174ea0ef42 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out @@ -16,478 +16,6 @@ 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(const 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(const a: [char; 5], y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: [char; 5], y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: - Array: - - Char - - - value: "5" - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: [char; 5], 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(const a: [char; 5], 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(const 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: 52 - col_stop: 2 - path: compiler-test - content: "function main(const 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(const 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(const 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(const a: [char; 5], y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: [char; 5], y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: - Array: - - Char - - - value: "5" - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: [char; 5], 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(const a: [char; 5], 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(const 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: 52 - col_stop: 2 - path: compiler-test - content: "function main(const 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(const 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(const 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(const a: [char; 5], y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const a: [char; 5], y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: - Array: - - Char - - - value: "5" - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const a: [char; 5], 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(const a: [char; 5], 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(const 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: 52 - col_stop: 2 - path: compiler-test - content: "function main(const 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(const a: [char; 5], y: bool) -> bool {\n...\n}" + initial_theorem: 54f05a3b9e065ed4a4c9060278ebbfba8c871fc0952928b3247495e3420e6a8f + canonicalized_theorem: 5239f39807679614fa177f6da454d51e73348714e680cc51c4587630525a3d1f + type_inferenced_theorem: 34dc40266a9c59e43ecbb094edbefbe654d89032e57f75fdcd42f5cd6125896a diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out index 68ab21f1cd..c1a196883a 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out @@ -16,554 +16,6 @@ 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(const x: (u8, bool, u8), 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(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: - Tuple: - - IntegerType: U8 - - Boolean - - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const x: (u8, bool, u8), y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(const x: (u8, bool, u8), y: bool) -> 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: 57 - col_stop: 2 - path: compiler-test - content: "function main(const x: (u8, bool, u8), y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(const x: (u8, bool, u8), 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(const x: (u8, bool, u8), 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(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: - Tuple: - - IntegerType: U8 - - Boolean - - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const x: (u8, bool, u8), y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(const x: (u8, bool, u8), y: bool) -> 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: 57 - col_stop: 2 - path: compiler-test - content: "function main(const x: (u8, bool, u8), y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(const x: (u8, bool, u8), 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(const x: (u8, bool, u8), 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(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" - const_: true - mutable: false - type_: - Tuple: - - IntegerType: U8 - - Boolean - - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 21 - col_stop: 22 - path: compiler-test - content: "function main(const x: (u8, bool, u8), y: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: (u8, bool, u8), y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(const x: (u8, bool, u8), y: bool) -> 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: 57 - col_stop: 2 - path: compiler-test - content: "function main(const x: (u8, bool, u8), y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(const x: (u8, bool, u8), y: bool) -> bool {\n...\n}" + initial_theorem: a5fdbc9ea34c5171ba153bfd9b5078d84d4be9e08c2eb97410082299143ae902 + canonicalized_theorem: a5fdbc9ea34c5171ba153bfd9b5078d84d4be9e08c2eb97410082299143ae902 + type_inferenced_theorem: 2caf7e798653f694eb868a03899e8316d25f4d35df081a287ca1c764d9f45a33 diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out index eee3e244de..4afd229f1f 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out @@ -16,183 +16,6 @@ outputs: r2: type: "[[u8; 4]; 2]" value: "\"[0, 0, 0, 0][0, 0, 0, 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(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}": - 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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}" - 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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Array: - - IntegerType: U8 - - - value: "4" - - - value: "2" - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {" - output: - Array: - - Array: - - IntegerType: U8 - - - value: "4" - - - value: "2" - block: - statements: - - Return: - expression: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " return a;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {\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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}": - 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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}" - 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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Array: - - IntegerType: U8 - - - value: "4" - - - value: "2" - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {" - output: - Array: - - Array: - - IntegerType: U8 - - - value: "4" - - - value: "2" - block: - statements: - - Return: - expression: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " return a;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {\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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}": - 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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}" - 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; 4]; 2]) -> [[u8; 4]; 2] {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Array: - - IntegerType: U8 - - - value: "4" - - - value: "2" - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {" - output: - Array: - - Array: - - IntegerType: U8 - - - value: "4" - - - value: "2" - block: - statements: - - Return: - expression: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " return a;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] {\n...\n}" + initial_theorem: fb540ccd0618e433c2181c6dc9b73080e0a23c3f5b5ebe9f1106276aae38d8ef + canonicalized_theorem: fb540ccd0618e433c2181c6dc9b73080e0a23c3f5b5ebe9f1106276aae38d8ef + type_inferenced_theorem: f6ed6b87a3fb35bf53ef4ba86a9a3e0d2271914a45d773dd7931c6a5d1b83151 diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out index 34e9fa881a..8abb760809 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out @@ -16,222 +16,6 @@ outputs: r: type: u8 value: "101" - 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) -> u8 {\\\"}\"}": - 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) -> u8 {\\\"}\"}" - 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) -> u8 {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8) -> u8 {" - output: - IntegerType: U8 - block: - statements: - - Return: - expression: - Binary: - left: - Value: - Integer: - - U8 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 15 - path: compiler-test - content: " return 1u8 + a;" - right: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return 1u8 + a;\\\"}\"}" - op: Add - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return 1u8 + a;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " return 1u8 + a;" - span: - line_start: 3 - line_stop: 5 - col_start: 28 - col_stop: 2 - path: compiler-test - content: "function main(a: u8) -> u8 {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8) -> u8 {\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) -> u8 {\\\"}\"}": - 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) -> u8 {\\\"}\"}" - 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) -> u8 {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8) -> u8 {" - output: - IntegerType: U8 - block: - statements: - - Return: - expression: - Binary: - left: - Value: - Integer: - - U8 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 15 - path: compiler-test - content: " return 1u8 + a;" - right: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return 1u8 + a;\\\"}\"}" - op: Add - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return 1u8 + a;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " return 1u8 + a;" - span: - line_start: 3 - line_stop: 5 - col_start: 28 - col_stop: 2 - path: compiler-test - content: "function main(a: u8) -> u8 {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8) -> u8 {\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) -> u8 {\\\"}\"}": - 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) -> u8 {\\\"}\"}" - 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) -> u8 {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8) -> u8 {" - output: - IntegerType: U8 - block: - statements: - - Return: - expression: - Binary: - left: - Value: - Integer: - - U8 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 15 - path: compiler-test - content: " return 1u8 + a;" - right: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return 1u8 + a;\\\"}\"}" - op: Add - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return 1u8 + a;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " return 1u8 + a;" - span: - line_start: 3 - line_stop: 5 - col_start: 28 - col_stop: 2 - path: compiler-test - content: "function main(a: u8) -> u8 {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8) -> u8 {\n...\n}" + initial_theorem: 430d76675273bb92e7af55000e710e2f5d1621db50550a5366325779633577bf + canonicalized_theorem: 430d76675273bb92e7af55000e710e2f5d1621db50550a5366325779633577bf + type_inferenced_theorem: bcde9c109d65d236fb2079bc26490658438c422bc17b09bd0beebe0298feaf03 diff --git a/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out index ab5918bc4f..741f0918b6 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out @@ -16,522 +16,6 @@ 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() -> 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 {\\\"}\"}" - input: [] - output: Boolean - block: - statements: - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 19 - path: compiler-test - content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" - type_: Address - value: - Value: - Address: - - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 - - line_start: 4 - line_stop: 4 - col_start: 31 - col_stop: 94 - path: compiler-test - content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 94 - path: compiler-test - content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" - - Return: - expression: - Binary: - left: - 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\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" - name: "{\"name\":\"state\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return input.state.root == [0u8; 32] " - name: "{\"name\":\"root\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return input.state.root == [0u8; 32] " - right: - ArrayInit: - element: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 33 - col_stop: 36 - path: compiler-test - content: " return input.state.root == [0u8; 32] " - dimensions: - - value: "32" - span: - line_start: 6 - line_stop: 6 - col_start: 32 - col_stop: 41 - path: compiler-test - content: " return input.state.root == [0u8; 32] " - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 41 - path: compiler-test - content: " return input.state.root == [0u8; 32] " - 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: 6 - line_stop: 7 - col_start: 12 - col_stop: 46 - path: compiler-test - content: " return input.state.root == [0u8; 32] \n && input.state_leaf.network_id == 0u8;" - span: - line_start: 6 - line_stop: 7 - col_start: 5 - col_stop: 46 - path: compiler-test - content: " return input.state.root == [0u8; 32] \n && input.state_leaf.network_id == 0u8;" - span: - line_start: 3 - line_stop: 8 - col_start: 25 - col_stop: 2 - path: compiler-test - content: "function main() -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 8 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main() -> 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() -> 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 {\\\"}\"}" - input: [] - output: Boolean - block: - statements: - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 19 - path: compiler-test - content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" - type_: Address - value: - Value: - Address: - - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 - - line_start: 4 - line_stop: 4 - col_start: 31 - col_stop: 94 - path: compiler-test - content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 94 - path: compiler-test - content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" - - Return: - expression: - Binary: - left: - 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\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" - name: "{\"name\":\"state\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return input.state.root == [0u8; 32] " - name: "{\"name\":\"root\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return input.state.root == [0u8; 32] " - right: - ArrayInit: - element: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 33 - col_stop: 36 - path: compiler-test - content: " return input.state.root == [0u8; 32] " - dimensions: - - value: "32" - span: - line_start: 6 - line_stop: 6 - col_start: 32 - col_stop: 41 - path: compiler-test - content: " return input.state.root == [0u8; 32] " - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 41 - path: compiler-test - content: " return input.state.root == [0u8; 32] " - 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: 6 - line_stop: 7 - col_start: 12 - col_stop: 46 - path: compiler-test - content: " return input.state.root == [0u8; 32] \n && input.state_leaf.network_id == 0u8;" - span: - line_start: 6 - line_stop: 7 - col_start: 5 - col_stop: 46 - path: compiler-test - content: " return input.state.root == [0u8; 32] \n && input.state_leaf.network_id == 0u8;" - span: - line_start: 3 - line_stop: 8 - col_start: 25 - col_stop: 2 - path: compiler-test - content: "function main() -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 8 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main() -> 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() -> 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 {\\\"}\"}" - input: [] - output: Boolean - block: - statements: - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 19 - path: compiler-test - content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" - type_: Address - value: - Value: - Address: - - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 - - line_start: 4 - line_stop: 4 - col_start: 31 - col_stop: 94 - path: compiler-test - content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 94 - path: compiler-test - content: " const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" - - Return: - expression: - Binary: - left: - 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\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" - name: "{\"name\":\"state\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return input.state.root == [0u8; 32] " - name: "{\"name\":\"root\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32] \\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return input.state.root == [0u8; 32] " - right: - ArrayInit: - element: - Value: - Integer: - - U8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 33 - col_stop: 36 - path: compiler-test - content: " return input.state.root == [0u8; 32] " - dimensions: - - value: "32" - span: - line_start: 6 - line_stop: 6 - col_start: 32 - col_stop: 41 - path: compiler-test - content: " return input.state.root == [0u8; 32] " - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 41 - path: compiler-test - content: " return input.state.root == [0u8; 32] " - 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: 6 - line_stop: 7 - col_start: 12 - col_stop: 46 - path: compiler-test - content: " return input.state.root == [0u8; 32] \n && input.state_leaf.network_id == 0u8;" - span: - line_start: 6 - line_stop: 7 - col_start: 5 - col_stop: 46 - path: compiler-test - content: " return input.state.root == [0u8; 32] \n && input.state_leaf.network_id == 0u8;" - span: - line_start: 3 - line_stop: 8 - col_start: 25 - col_stop: 2 - path: compiler-test - content: "function main() -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 8 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main() -> bool {\n...\n}\n\n\n" + initial_theorem: 6f08333f0f602b1ef25d548da7f5f5a611a4409281e3412fe380c367a76bac24 + canonicalized_theorem: 6f08333f0f602b1ef25d548da7f5f5a611a4409281e3412fe380c367a76bac24 + type_inferenced_theorem: 3a05ae6705cfc5a344631563ed43c3caf73c1762bef0b4a4165ae73e1466e27f diff --git a/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out index 5cb258f8b0..9d3fbaaf1c 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out @@ -16,273 +16,6 @@ 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() -> 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 {\\\"}\"}" - input: [] - output: Boolean - block: - statements: - - Return: - expression: - 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.state.root == [0u8; 32];\\\"}\"}" - name: "{\"name\":\"state\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - name: "{\"name\":\"root\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - right: - ArrayInit: - element: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 33 - col_stop: 36 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - dimensions: - - value: "32" - span: - line_start: 4 - line_stop: 4 - col_start: 32 - col_stop: 41 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 41 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 41 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - span: - line_start: 3 - line_stop: 5 - col_start: 25 - col_stop: 2 - path: compiler-test - content: "function main() -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main() -> 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 {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main() -> bool {\\\"}\"}" - input: [] - output: Boolean - block: - statements: - - Return: - expression: - 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.state.root == [0u8; 32];\\\"}\"}" - name: "{\"name\":\"state\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - name: "{\"name\":\"root\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - right: - ArrayInit: - element: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 33 - col_stop: 36 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - dimensions: - - value: "32" - span: - line_start: 4 - line_stop: 4 - col_start: 32 - col_stop: 41 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 41 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 41 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - span: - line_start: 3 - line_stop: 5 - col_start: 25 - col_stop: 2 - path: compiler-test - content: "function main() -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main() -> 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 {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main() -> bool {\\\"}\"}" - input: [] - output: Boolean - block: - statements: - - Return: - expression: - 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.state.root == [0u8; 32];\\\"}\"}" - name: "{\"name\":\"state\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - name: "{\"name\":\"root\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.state.root == [0u8; 32];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - right: - ArrayInit: - element: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 33 - col_stop: 36 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - dimensions: - - value: "32" - span: - line_start: 4 - line_stop: 4 - col_start: 32 - col_stop: 41 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 41 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 41 - path: compiler-test - content: " return input.state.root == [0u8; 32];" - span: - line_start: 3 - line_stop: 5 - col_start: 25 - col_stop: 2 - path: compiler-test - content: "function main() -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main() -> bool {\n...\n}" + initial_theorem: 0eabec3e7bd9d1b1ca1666329f7bd3ad9d3095d209c94f83a19b60e78857375f + canonicalized_theorem: 0eabec3e7bd9d1b1ca1666329f7bd3ad9d3095d209c94f83a19b60e78857375f + type_inferenced_theorem: c6fb6168c1089361909edf6d76a9d3cba97a2f907821eb7f71198f1fb6bb1310 diff --git a/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out index 3f78a174fa..9c549bcf3b 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out @@ -16,213 +16,6 @@ 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: - - Return: - expression: - Binary: - left: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return true == y; // hey Yoda" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return true == y; // hey Yoda\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return true == y; // hey Yoda" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " return true == y; // hey Yoda" - span: - line_start: 3 - line_stop: 5 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool { \n...\n}" - span: - line_start: 3 - line_stop: 5 - 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\":\"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: - - Return: - expression: - Binary: - left: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return true == y; // hey Yoda" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return true == y; // hey Yoda\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return true == y; // hey Yoda" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " return true == y; // hey Yoda" - span: - line_start: 3 - line_stop: 5 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool { \n...\n}" - span: - line_start: 3 - line_stop: 5 - 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\":\"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: - - Return: - expression: - Binary: - left: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return true == y; // hey Yoda" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return true == y; // hey Yoda\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return true == y; // hey Yoda" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " return true == y; // hey Yoda" - span: - line_start: 3 - line_stop: 5 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool { \n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool { \n...\n}" + initial_theorem: e94f4826afb8405a883b3c3df074507dbd38db45e8fa5e8d984ed5974f521c6a + canonicalized_theorem: e94f4826afb8405a883b3c3df074507dbd38db45e8fa5e8d984ed5974f521c6a + type_inferenced_theorem: 26596f4778c179462d3365caa87addc607d88bb8f700b6132565b56ff3396dd2 diff --git a/tests/expectations/compiler/compiler/integers/i128/add.leo.out b/tests/expectations/compiler/compiler/integers/i128/add.leo.out index 0620c464dd..0d792431bc 100644 --- a/tests/expectations/compiler/compiler/integers/i128/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/add.leo.out @@ -16,306 +16,6 @@ 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: Add - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: Add - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: Add - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + initial_theorem: 278b92038c32110995dae24885b81e15d897c16ca4500633b8550557758d76a1 + canonicalized_theorem: 278b92038c32110995dae24885b81e15d897c16ca4500633b8550557758d76a1 + type_inferenced_theorem: 58f145ea9284607029135a8afd9bb00e05c3ae31836c735aeb2cc0c7628f9e98 diff --git a/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out index f351cc0392..b6351866a5 100644 --- a/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out @@ -13,236 +13,6 @@ outputs: - input_file: i128.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: i128, b: i128) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128) {\\\"}\"}" - 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: i128, b: i128) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128) {" - output: ~ - 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 3 - line_stop: 5 - col_start: 33 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128) {\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: i128, b: i128) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128) {\\\"}\"}" - 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: i128, b: i128) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128) {" - output: - Tuple: [] - 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 3 - line_stop: 5 - col_start: 33 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128) {\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: i128, b: i128) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128) {\\\"}\"}" - 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: i128, b: i128) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128) {" - output: - Tuple: [] - 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 3 - line_stop: 5 - col_start: 33 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128) {\n...\n}" + initial_theorem: 069a5439632b91a257c447f7db4278b6ea59ec794ab3ec3e5805757615d9f3a4 + canonicalized_theorem: 43ea108e255608c03dea9e4cd6e4ac1ab4dc84a3c974372b9902139c83e4434e + type_inferenced_theorem: 3314b8988acb6fa813557f5e87f81b95370a3f15e336b78a1f0575208034d55b diff --git a/tests/expectations/compiler/compiler/integers/i128/div.leo.out b/tests/expectations/compiler/compiler/integers/i128/div.leo.out index 18f141676a..5a03c2bbb6 100644 --- a/tests/expectations/compiler/compiler/integers/i128/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/div.leo.out @@ -16,306 +16,6 @@ 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + initial_theorem: 4a1bed67b569a4ca5d986533ae623e685c6cb4b5fcab951ce35e6c6833c75f9e + canonicalized_theorem: 4a1bed67b569a4ca5d986533ae623e685c6cb4b5fcab951ce35e6c6833c75f9e + type_inferenced_theorem: 5327f9c10201daf1c2089780c8d6b03d25ff62ee07c739070c7a50823de4da64 diff --git a/tests/expectations/compiler/compiler/integers/i128/eq.leo.out b/tests/expectations/compiler/compiler/integers/i128/eq.leo.out index 49ee474fe9..fdf76b86bd 100644 --- a/tests/expectations/compiler/compiler/integers/i128/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/eq.leo.out @@ -16,303 +16,6 @@ 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + initial_theorem: 74aab1a9bcfc6f3a25c2f7fab9d493e8d687ce86505cd375c22b6258603a72cf + canonicalized_theorem: 74aab1a9bcfc6f3a25c2f7fab9d493e8d687ce86505cd375c22b6258603a72cf + type_inferenced_theorem: 8fd6e1c3e06fe7839d93479c03c4e59eca644ad420955e77312c6749dde5520d diff --git a/tests/expectations/compiler/compiler/integers/i128/ge.leo.out b/tests/expectations/compiler/compiler/integers/i128/ge.leo.out index c70f5b4974..d0f08578d1 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ge.leo.out @@ -22,303 +22,6 @@ 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + initial_theorem: bcde5f6ea48309da013de3c4cd2e759f809e8cce72c115f8b5bd2b1272e1c088 + canonicalized_theorem: bcde5f6ea48309da013de3c4cd2e759f809e8cce72c115f8b5bd2b1272e1c088 + type_inferenced_theorem: 0aa48e18e8b7b7857f9ca9808d0eac7ded70cd617e65e527fdb93fa07ff5336b diff --git a/tests/expectations/compiler/compiler/integers/i128/gt.leo.out b/tests/expectations/compiler/compiler/integers/i128/gt.leo.out index 38ca42d5b6..f2c40c8ca1 100644 --- a/tests/expectations/compiler/compiler/integers/i128/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/gt.leo.out @@ -22,303 +22,6 @@ 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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: Gt - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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: Gt - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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: Gt - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + initial_theorem: 59236105dd9e8340d9348c60d9b7cd51e615dd4ec6a645b09573a22678e74470 + canonicalized_theorem: 59236105dd9e8340d9348c60d9b7cd51e615dd4ec6a645b09573a22678e74470 + type_inferenced_theorem: 4b84f0d2fd2d0bebcffce6bdb30919e230a5e7f6f0b31f2772efedf4f6fd3c94 diff --git a/tests/expectations/compiler/compiler/integers/i128/le.leo.out b/tests/expectations/compiler/compiler/integers/i128/le.leo.out index 7f9831e958..9cfac5c802 100644 --- a/tests/expectations/compiler/compiler/integers/i128/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/le.leo.out @@ -22,303 +22,6 @@ 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool {\n...\n}" + initial_theorem: 3f8f56d5c17a96d015b50f804dababd4e15d1d2ebf54bd239fe362befc49f98c + canonicalized_theorem: 3f8f56d5c17a96d015b50f804dababd4e15d1d2ebf54bd239fe362befc49f98c + type_inferenced_theorem: 74e997c5107955a418b7e658b649f10bac760ab497a69925642db4e372f8fff7 diff --git a/tests/expectations/compiler/compiler/integers/i128/lt.leo.out b/tests/expectations/compiler/compiler/integers/i128/lt.leo.out index 8070c8a4c1..3df54ecd6d 100644 --- a/tests/expectations/compiler/compiler/integers/i128/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/lt.leo.out @@ -22,303 +22,6 @@ 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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: Lt - 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: Eq - 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: 49 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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: Lt - 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: Eq - 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: 49 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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: Lt - 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: Eq - 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: 49 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" + initial_theorem: d6025ab5243349142231d66100fe3e6001606095303d39aaf28663c6f0984369 + canonicalized_theorem: d6025ab5243349142231d66100fe3e6001606095303d39aaf28663c6f0984369 + type_inferenced_theorem: 06ff7de0309de0c4e88adc23d837363f0951bf96859c1dc18076d2deff17474f diff --git a/tests/expectations/compiler/compiler/integers/i128/max.leo.out b/tests/expectations/compiler/compiler/integers/i128/max.leo.out index 9b161dbf7e..a3e985fbcc 100644 --- a/tests/expectations/compiler/compiler/integers/i128/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/max.leo.out @@ -16,307 +16,6 @@ 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: i128 = 170141183460469231731687303715884105727;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i128 = 170141183460469231731687303715884105727;" - type_: - IntegerType: I128 - value: - Value: - Implicit: - - "170141183460469231731687303715884105727" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 60 - path: compiler-test - content: " const a: i128 = 170141183460469231731687303715884105727;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 60 - path: compiler-test - content: " const a: i128 = 170141183460469231731687303715884105727;" - - 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: - - 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: i128 = 170141183460469231731687303715884105727;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i128 = 170141183460469231731687303715884105727;" - type_: - IntegerType: I128 - value: - Value: - Implicit: - - "170141183460469231731687303715884105727" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 60 - path: compiler-test - content: " const a: i128 = 170141183460469231731687303715884105727;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 60 - path: compiler-test - content: " const a: i128 = 170141183460469231731687303715884105727;" - - 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: - - 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: i128 = 170141183460469231731687303715884105727;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i128 = 170141183460469231731687303715884105727;" - type_: - IntegerType: I128 - value: - Value: - Integer: - - I128 - - "170141183460469231731687303715884105727" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 60 - path: compiler-test - content: " const a: i128 = 170141183460469231731687303715884105727;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 60 - path: compiler-test - content: " const a: i128 = 170141183460469231731687303715884105727;" - - 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" + initial_theorem: fbe3d891245219b62b7444a1a2d145e6aa77ef5a5bb768b0fb058f1b243dd894 + canonicalized_theorem: fbe3d891245219b62b7444a1a2d145e6aa77ef5a5bb768b0fb058f1b243dd894 + type_inferenced_theorem: 926fdd740dd000b2155e292ac0fb4c51ea2c6ca6a1a8dc88addf83b35b07ca94 diff --git a/tests/expectations/compiler/compiler/integers/i128/min.leo.out b/tests/expectations/compiler/compiler/integers/i128/min.leo.out index e25fb7878b..2a4d818df3 100644 --- a/tests/expectations/compiler/compiler/integers/i128/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/min.leo.out @@ -16,307 +16,6 @@ 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: i128 = -170141183460469231731687303715884105728;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i128 = -170141183460469231731687303715884105728;" - type_: - IntegerType: I128 - value: - Value: - Implicit: - - "-170141183460469231731687303715884105728" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 61 - path: compiler-test - content: " const a: i128 = -170141183460469231731687303715884105728;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 61 - path: compiler-test - content: " const a: i128 = -170141183460469231731687303715884105728;" - - 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: - - 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: i128 = -170141183460469231731687303715884105728;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i128 = -170141183460469231731687303715884105728;" - type_: - IntegerType: I128 - value: - Value: - Implicit: - - "-170141183460469231731687303715884105728" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 61 - path: compiler-test - content: " const a: i128 = -170141183460469231731687303715884105728;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 61 - path: compiler-test - content: " const a: i128 = -170141183460469231731687303715884105728;" - - 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: - - 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: i128 = -170141183460469231731687303715884105728;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i128 = -170141183460469231731687303715884105728;" - type_: - IntegerType: I128 - value: - Value: - Integer: - - I128 - - "-170141183460469231731687303715884105728" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 61 - path: compiler-test - content: " const a: i128 = -170141183460469231731687303715884105728;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 61 - path: compiler-test - content: " const a: i128 = -170141183460469231731687303715884105728;" - - 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" + initial_theorem: 12baf68b32dd0cc27e6c695e4373c68e789a0b7da1e30392ca84dd237602df20 + canonicalized_theorem: 12baf68b32dd0cc27e6c695e4373c68e789a0b7da1e30392ca84dd237602df20 + type_inferenced_theorem: 7b3cd17b290d7c46f014ae424adc4f526e770925fa8ff678c35f0f4283c591d7 diff --git a/tests/expectations/compiler/compiler/integers/i128/mul.leo.out b/tests/expectations/compiler/compiler/integers/i128/mul.leo.out index d908159b6c..a62b1ae9b2 100644 --- a/tests/expectations/compiler/compiler/integers/i128/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/mul.leo.out @@ -16,306 +16,6 @@ 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: Mul - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: Mul - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: Mul - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + initial_theorem: 749f276238221a67ee7cc724f2925f47ee72e2de8ce28135f0090ddc70843896 + canonicalized_theorem: 749f276238221a67ee7cc724f2925f47ee72e2de8ce28135f0090ddc70843896 + type_inferenced_theorem: 2e262184d0acfd77343ea357565d5c460b002637df8c1e1d30832373cd4bb348 diff --git a/tests/expectations/compiler/compiler/integers/i128/ne.leo.out b/tests/expectations/compiler/compiler/integers/i128/ne.leo.out index 0b7df70ae4..f314ffcc99 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ne.leo.out @@ -22,303 +22,6 @@ 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 49 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 49 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: 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: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 49 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: bool) -> bool{\n...\n}" + initial_theorem: b20415db5988fac6c707d5ddf4a1287003395bdb74a96cfc4be4d8b869ace579 + canonicalized_theorem: b20415db5988fac6c707d5ddf4a1287003395bdb74a96cfc4be4d8b869ace579 + type_inferenced_theorem: 55c6b5cc48d8d80c0347d477418168c323d34aee33ea36447192166a9f54d32e diff --git a/tests/expectations/compiler/compiler/integers/i128/negate.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate.leo.out index 40222011c8..21565b37eb 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate.leo.out @@ -22,261 +22,6 @@ 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: i128, b: i128) -> 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: i128, b: i128) -> 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: i128, b: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128) -> 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: i128, b: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Negate - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - 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: i128, b: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128) -> 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: i128, b: i128) -> 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: i128, b: i128) -> 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: i128, b: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128) -> 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: i128, b: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Negate - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - 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: i128, b: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128) -> 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: i128, b: i128) -> 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: i128, b: i128) -> 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: i128, b: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128) -> 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: i128, b: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Negate - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - 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: i128, b: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128) -> bool {\n...\n}" + initial_theorem: 77b18a83d019f104049c3d1c6bf7b3a159e56024184304d42508d1be58a12e4a + canonicalized_theorem: 77b18a83d019f104049c3d1c6bf7b3a159e56024184304d42508d1be58a12e4a + type_inferenced_theorem: e08006c78ca1dfede635303eeab1b764d86c25d1e64c9f1584e67b2903cbbcc6 diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out index f8ffc2a1ec..1ae265a31c 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out @@ -16,446 +16,6 @@ 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 = -128i128;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = -128i128;" - type_: ~ - value: - Value: - Integer: - - I128 - - "-128" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 23 - path: compiler-test - content: " const a = -128i128;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " const a = -128i128;" - - 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 = -a;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b = -a;" - type_: ~ - value: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" - op: Negate - span: - line_start: 5 - line_stop: 5 - col_start: 15 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - right: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = -128i128;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = -128i128;" - type_: ~ - value: - Value: - Integer: - - I128 - - "-128" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 23 - path: compiler-test - content: " const a = -128i128;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " const a = -128i128;" - - 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 = -a;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b = -a;" - type_: ~ - value: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" - op: Negate - span: - line_start: 5 - line_stop: 5 - col_start: 15 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - right: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = -128i128;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = -128i128;" - type_: - IntegerType: I128 - value: - Value: - Integer: - - I128 - - "-128" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 23 - path: compiler-test - content: " const a = -128i128;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " const a = -128i128;" - - 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 = -a;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b = -a;" - type_: - IntegerType: I128 - value: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" - op: Negate - span: - line_start: 5 - line_stop: 5 - col_start: 15 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - right: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}\n\n" + initial_theorem: b3d531ff16ea167af0dde295b141fb88045336204cfad4eb1ef39a3491ac5b21 + canonicalized_theorem: b3d531ff16ea167af0dde295b141fb88045336204cfad4eb1ef39a3491ac5b21 + type_inferenced_theorem: 01cf1e13b4c7b489855c33559bd632a3fddb2b49077922cbbe1a4a6f7d200a14 diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out index fe618f0df4..b1bab3f02a 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out @@ -16,376 +16,6 @@ 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 = 0i128;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = 0i128;" - type_: ~ - value: - Value: - Integer: - - I128 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 20 - path: compiler-test - content: " const a = 0i128;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 20 - path: compiler-test - content: " const a = 0i128;" - - Return: - expression: - Binary: - left: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i128 == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == 0i128 == y;" - right: - Value: - Integer: - - I128 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 23 - path: compiler-test - content: " return -a == 0i128 == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return -a == 0i128 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i128 == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return -a == 0i128 == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 28 - path: compiler-test - content: " return -a == 0i128 == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = 0i128;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = 0i128;" - type_: ~ - value: - Value: - Integer: - - I128 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 20 - path: compiler-test - content: " const a = 0i128;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 20 - path: compiler-test - content: " const a = 0i128;" - - Return: - expression: - Binary: - left: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i128 == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == 0i128 == y;" - right: - Value: - Integer: - - I128 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 23 - path: compiler-test - content: " return -a == 0i128 == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return -a == 0i128 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i128 == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return -a == 0i128 == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 28 - path: compiler-test - content: " return -a == 0i128 == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = 0i128;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = 0i128;" - type_: - IntegerType: I128 - value: - Value: - Integer: - - I128 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 20 - path: compiler-test - content: " const a = 0i128;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 20 - path: compiler-test - content: " const a = 0i128;" - - Return: - expression: - Binary: - left: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i128 == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == 0i128 == y;" - right: - Value: - Integer: - - I128 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 23 - path: compiler-test - content: " return -a == 0i128 == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return -a == 0i128 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i128 == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return -a == 0i128 == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 28 - path: compiler-test - content: " return -a == 0i128 == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\n\n" + initial_theorem: dd7a24b71e74622ec5620629aa7f60e928009e12aea0fadea259f2d62258cd8d + canonicalized_theorem: dd7a24b71e74622ec5620629aa7f60e928009e12aea0fadea259f2d62258cd8d + type_inferenced_theorem: 186f2e3226cb21c39e67390ea3ebc1e2863ed44ee3cc85278b512db4829d20f3 diff --git a/tests/expectations/compiler/compiler/integers/i128/sub.leo.out b/tests/expectations/compiler/compiler/integers/i128/sub.leo.out index 6cbe17270f..8687cc4072 100644 --- a/tests/expectations/compiler/compiler/integers/i128/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/sub.leo.out @@ -16,306 +16,6 @@ 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: Sub - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: Sub - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> 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: Sub - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i128, b: i128, c: i128) -> bool {\n...\n}" + initial_theorem: cbc3426682d111bcc624772a9e331194e91afe090c7fad60b6a26f7bbfc80c52 + canonicalized_theorem: cbc3426682d111bcc624772a9e331194e91afe090c7fad60b6a26f7bbfc80c52 + type_inferenced_theorem: 6590ef64c4fea22ae40610713fd9ab9c8099db62dfa03dbb4b52544745add887 diff --git a/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out index 3d0bf5b0b8..b7ed5b0cc5 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out @@ -22,412 +22,6 @@ 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(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> 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(s: bool, a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 42 - col_stop: 43 - path: compiler-test - content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 59 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i128, b: i128, c: i128) -> 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(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> 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(s: bool, a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 42 - col_stop: 43 - path: compiler-test - content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 59 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i128, b: i128, c: i128) -> 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(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> 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(s: bool, a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i128, b: i128, c: i128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I128 - span: - line_start: 3 - line_stop: 3 - col_start: 42 - col_stop: 43 - path: compiler-test - content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: - IntegerType: I128 - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 59 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i128, b: i128, c: i128) -> bool {\n...\n}\n\n" + initial_theorem: ba1d5d680a9efb9ec10633ea657d4671b3e68bf496ae75a9f6a21c39572ab928 + canonicalized_theorem: ba1d5d680a9efb9ec10633ea657d4671b3e68bf496ae75a9f6a21c39572ab928 + type_inferenced_theorem: 24933918f7ad7589c86ee29dcb310034c6061ac0f30447cd90e1909812388494 diff --git a/tests/expectations/compiler/compiler/integers/i16/add.leo.out b/tests/expectations/compiler/compiler/integers/i16/add.leo.out index d9ba547b0b..c915ffb23b 100644 --- a/tests/expectations/compiler/compiler/integers/i16/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/add.leo.out @@ -16,306 +16,6 @@ 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + initial_theorem: c6e60e90f02eedaf8209c76aaf12e2fe10ae13dc6061c36f5e49b72bf6b0a65a + canonicalized_theorem: c6e60e90f02eedaf8209c76aaf12e2fe10ae13dc6061c36f5e49b72bf6b0a65a + type_inferenced_theorem: cbd5e50cfc56419e9406f490d626035c8337a1bdaf35bc62a4600fcf76c391b9 diff --git a/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out index cd80deb25d..add36d8fe1 100644 --- a/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out @@ -13,236 +13,6 @@ outputs: - input_file: i16.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: i16, b: i16) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) {\\\"}\"}" - 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: i16, b: i16) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16) {" - output: ~ - 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 3 - line_stop: 5 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16) {\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: i16, b: i16) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) {\\\"}\"}" - 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: i16, b: i16) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16) {" - output: - Tuple: [] - 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 3 - line_stop: 5 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16) {\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: i16, b: i16) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) {\\\"}\"}" - 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: i16, b: i16) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16) {" - output: - Tuple: [] - 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 3 - line_stop: 5 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16) {\n...\n}" + initial_theorem: dc4639a138bd4abe35fdb62f4276a1dd7d9fff035da9e307f3522ebcd0d85242 + canonicalized_theorem: 11c7e7171c6ae7c1cbb12c7e27dee4786d5689c83d4e60c1c1860f78372e9ae7 + type_inferenced_theorem: 8d5f15f30bfa9b61498011cd4c66e7980a6a30d43112fb54f80247764f5ccaca diff --git a/tests/expectations/compiler/compiler/integers/i16/div.leo.out b/tests/expectations/compiler/compiler/integers/i16/div.leo.out index fad48443a6..2b8b5adc93 100644 --- a/tests/expectations/compiler/compiler/integers/i16/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/div.leo.out @@ -16,306 +16,6 @@ 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + initial_theorem: 9ba56478095b7f7ed43019d532d9b21817ecb729458843de0ee84f64ccbeaad5 + canonicalized_theorem: 9ba56478095b7f7ed43019d532d9b21817ecb729458843de0ee84f64ccbeaad5 + type_inferenced_theorem: 0313c0eb6ab4ee2bf5c8a0b2e5936a6ee62e73897fb2da20f4278f0627f1c9db diff --git a/tests/expectations/compiler/compiler/integers/i16/eq.leo.out b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out index db25092293..c84d3f446a 100644 --- a/tests/expectations/compiler/compiler/integers/i16/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out @@ -16,303 +16,6 @@ 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + initial_theorem: 5d901a32aea72e5e08d1150961941b53637e7586f617ee1b5975022e7efcc597 + canonicalized_theorem: 5d901a32aea72e5e08d1150961941b53637e7586f617ee1b5975022e7efcc597 + type_inferenced_theorem: b1044cf20a97768d2dc751289415634cc43c63642a0db05f08546c5ce4337615 diff --git a/tests/expectations/compiler/compiler/integers/i16/ge.leo.out b/tests/expectations/compiler/compiler/integers/i16/ge.leo.out index 67b0580e65..087897d4fa 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ge.leo.out @@ -22,303 +22,6 @@ 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + initial_theorem: acbe69247b7e93d134e08bb50b235fb0fdcedc5aaf0d064dd32d1955eb7530f1 + canonicalized_theorem: acbe69247b7e93d134e08bb50b235fb0fdcedc5aaf0d064dd32d1955eb7530f1 + type_inferenced_theorem: 8c762e804e44a6ec7aee1106bc0742266f34f7136a35878675ac239ffb4e2f9c diff --git a/tests/expectations/compiler/compiler/integers/i16/gt.leo.out b/tests/expectations/compiler/compiler/integers/i16/gt.leo.out index db19e7b349..34204ea799 100644 --- a/tests/expectations/compiler/compiler/integers/i16/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/gt.leo.out @@ -22,303 +22,6 @@ 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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: Gt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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: Gt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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: Gt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + initial_theorem: 79c5123b8d5fdde1e774ce298e69fec5a6ac561d42f2cff1620ee90868a1a788 + canonicalized_theorem: 79c5123b8d5fdde1e774ce298e69fec5a6ac561d42f2cff1620ee90868a1a788 + type_inferenced_theorem: 2f5c103f24367e1b7d38073a41b039c94fd2d4138ed6ededd1f1a526ed741653 diff --git a/tests/expectations/compiler/compiler/integers/i16/le.leo.out b/tests/expectations/compiler/compiler/integers/i16/le.leo.out index f54a185fb4..3c852c9810 100644 --- a/tests/expectations/compiler/compiler/integers/i16/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/le.leo.out @@ -22,303 +22,6 @@ 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool {\n...\n}" + initial_theorem: 0ec2096fbd8fdfa796b104aef9e28458e18a25951bb610f61f4ea4fbaae9757f + canonicalized_theorem: 0ec2096fbd8fdfa796b104aef9e28458e18a25951bb610f61f4ea4fbaae9757f + type_inferenced_theorem: 7ddd6341403c131f721540b6cb1a7e3daaff0ec9615f8c35e4c07f32591f9eaf diff --git a/tests/expectations/compiler/compiler/integers/i16/lt.leo.out b/tests/expectations/compiler/compiler/integers/i16/lt.leo.out index d268eed29e..ff448ddd8f 100644 --- a/tests/expectations/compiler/compiler/integers/i16/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/lt.leo.out @@ -22,303 +22,6 @@ 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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: Lt - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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: Lt - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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: Lt - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" + initial_theorem: 4fd8570e10354fb6f8fe19d8d822ed3d8d9149f464c0bbdcc5967d903875234e + canonicalized_theorem: 4fd8570e10354fb6f8fe19d8d822ed3d8d9149f464c0bbdcc5967d903875234e + type_inferenced_theorem: 0cd72ea5eaf563bfc2a2ba82ad6e2e9d65df60730c8cf87aa9d09848448cbdca diff --git a/tests/expectations/compiler/compiler/integers/i16/max.leo.out b/tests/expectations/compiler/compiler/integers/i16/max.leo.out index a35189a4ff..421beaa304 100644 --- a/tests/expectations/compiler/compiler/integers/i16/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/max.leo.out @@ -16,307 +16,6 @@ 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: i16 = 32767;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i16 = 32767;" - type_: - IntegerType: I16 - value: - Value: - Implicit: - - "32767" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " const a: i16 = 32767;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " const a: i16 = 32767;" - - 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: - - 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: i16 = 32767;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i16 = 32767;" - type_: - IntegerType: I16 - value: - Value: - Implicit: - - "32767" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " const a: i16 = 32767;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " const a: i16 = 32767;" - - 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: - - 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: i16 = 32767;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i16 = 32767;" - type_: - IntegerType: I16 - value: - Value: - Integer: - - I16 - - "32767" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " const a: i16 = 32767;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " const a: i16 = 32767;" - - 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" + initial_theorem: 8cc319fae5a195cc91c1b906a4945d60fe8f4a2649ecae5910523f20ab29a80e + canonicalized_theorem: 8cc319fae5a195cc91c1b906a4945d60fe8f4a2649ecae5910523f20ab29a80e + type_inferenced_theorem: 79c7c35ea8546567ff0faef52f0a90e945a3cd835859b96f5e25d457eac51212 diff --git a/tests/expectations/compiler/compiler/integers/i16/min.leo.out b/tests/expectations/compiler/compiler/integers/i16/min.leo.out index d831056057..d73fb5f7af 100644 --- a/tests/expectations/compiler/compiler/integers/i16/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/min.leo.out @@ -16,307 +16,6 @@ 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: i16 = -32768;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i16 = -32768;" - type_: - IntegerType: I16 - value: - Value: - Implicit: - - "-32768" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " const a: i16 = -32768;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " const a: i16 = -32768;" - - 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: - - 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: i16 = -32768;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i16 = -32768;" - type_: - IntegerType: I16 - value: - Value: - Implicit: - - "-32768" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " const a: i16 = -32768;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " const a: i16 = -32768;" - - 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: - - 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: i16 = -32768;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i16 = -32768;" - type_: - IntegerType: I16 - value: - Value: - Integer: - - I16 - - "-32768" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " const a: i16 = -32768;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " const a: i16 = -32768;" - - 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" + initial_theorem: 01194f1d3e40d631c4b4f2d57d7c6d9906a2dd53299f0246fe259d49a81aaf1e + canonicalized_theorem: 01194f1d3e40d631c4b4f2d57d7c6d9906a2dd53299f0246fe259d49a81aaf1e + type_inferenced_theorem: 384165664aac2ff844fb06836db88f9e92de2aff6bf9745a56c6924e1f5ed63a diff --git a/tests/expectations/compiler/compiler/integers/i16/mul.leo.out b/tests/expectations/compiler/compiler/integers/i16/mul.leo.out index ce56c6cf8d..c8b3de0e31 100644 --- a/tests/expectations/compiler/compiler/integers/i16/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/mul.leo.out @@ -16,306 +16,6 @@ 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + initial_theorem: e4d59a5cf7736b6fe993c348eb71c77e19339f9f48c71288858ee57f8afea1a2 + canonicalized_theorem: e4d59a5cf7736b6fe993c348eb71c77e19339f9f48c71288858ee57f8afea1a2 + type_inferenced_theorem: fdbdf403033c6317a5767b06b27454c40055dfb3f58893021e6abd7325b0eba7 diff --git a/tests/expectations/compiler/compiler/integers/i16/ne.leo.out b/tests/expectations/compiler/compiler/integers/i16/ne.leo.out index 78e5086ebd..2c8bdf8697 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ne.leo.out @@ -22,303 +22,6 @@ 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: 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: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: bool) -> bool{\n...\n}" + initial_theorem: 8c6fea5199db90bc83b06a665def03d3d3f9dc21d0880e870afd5316e882d020 + canonicalized_theorem: 8c6fea5199db90bc83b06a665def03d3d3f9dc21d0880e870afd5316e882d020 + type_inferenced_theorem: 55b7d570fcaafdbd2f19c3bfae73c089e92ed89837f5d71bd8a72800870bc0fd diff --git a/tests/expectations/compiler/compiler/integers/i16/negate.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate.leo.out index 47c1b66528..e3934a5af2 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate.leo.out @@ -22,261 +22,6 @@ 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: i16, b: i16) -> 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: i16, b: i16) -> 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: i16, b: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Negate - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 3 - line_stop: 5 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16) -> 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: i16, b: i16) -> 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: i16, b: i16) -> 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: i16, b: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Negate - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 3 - line_stop: 5 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16) -> 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: i16, b: i16) -> 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: i16, b: i16) -> 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: i16, b: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Negate - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 3 - line_stop: 5 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16) -> bool {\n...\n}" + initial_theorem: 3d30aa34b4b8c3dc2e1e63c4e82f829562c037e9ce1025e157e84fbc445e5b8d + canonicalized_theorem: 3d30aa34b4b8c3dc2e1e63c4e82f829562c037e9ce1025e157e84fbc445e5b8d + type_inferenced_theorem: 0f85cf3686a22da3196600a5f511095ad54a892716001eb3970ab128eed84908 diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out index edd0a87a6b..7cd5357c3c 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out @@ -16,446 +16,6 @@ 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 = -128i16;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = -128i16;" - type_: ~ - value: - Value: - Integer: - - I16 - - "-128" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 22 - path: compiler-test - content: " const a = -128i16;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a = -128i16;" - - 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 = -a;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b = -a;" - type_: ~ - value: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" - op: Negate - span: - line_start: 5 - line_stop: 5 - col_start: 15 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - right: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = -128i16;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = -128i16;" - type_: ~ - value: - Value: - Integer: - - I16 - - "-128" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 22 - path: compiler-test - content: " const a = -128i16;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a = -128i16;" - - 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 = -a;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b = -a;" - type_: ~ - value: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" - op: Negate - span: - line_start: 5 - line_stop: 5 - col_start: 15 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - right: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = -128i16;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = -128i16;" - type_: - IntegerType: I16 - value: - Value: - Integer: - - I16 - - "-128" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 22 - path: compiler-test - content: " const a = -128i16;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a = -128i16;" - - 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 = -a;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b = -a;" - type_: - IntegerType: I16 - value: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" - op: Negate - span: - line_start: 5 - line_stop: 5 - col_start: 15 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - right: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\n\n" + initial_theorem: 2b5fdbe8e706501b0de7ac1f58e189ff4a712cd8a0fb19ee96a0a58f2d64ec47 + canonicalized_theorem: 2b5fdbe8e706501b0de7ac1f58e189ff4a712cd8a0fb19ee96a0a58f2d64ec47 + type_inferenced_theorem: cf0a37b8845d1545cd46b8b850eaad1aa2e227fd2d8268da7e8d4c087ba1745c diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out index 5191a043db..d68956807c 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out @@ -16,376 +16,6 @@ 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 = 0i16;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = 0i16;" - type_: ~ - value: - Value: - Integer: - - I16 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " const a = 0i16;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " const a = 0i16;" - - Return: - expression: - Binary: - left: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i16 == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == 0i16 == y;" - right: - Value: - Integer: - - I16 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 22 - path: compiler-test - content: " return -a == 0i16 == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return -a == 0i16 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i16 == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 27 - path: compiler-test - content: " return -a == 0i16 == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " return -a == 0i16 == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = 0i16;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = 0i16;" - type_: ~ - value: - Value: - Integer: - - I16 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " const a = 0i16;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " const a = 0i16;" - - Return: - expression: - Binary: - left: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i16 == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == 0i16 == y;" - right: - Value: - Integer: - - I16 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 22 - path: compiler-test - content: " return -a == 0i16 == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return -a == 0i16 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i16 == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 27 - path: compiler-test - content: " return -a == 0i16 == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " return -a == 0i16 == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = 0i16;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = 0i16;" - type_: - IntegerType: I16 - value: - Value: - Integer: - - I16 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " const a = 0i16;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " const a = 0i16;" - - Return: - expression: - Binary: - left: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i16 == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == 0i16 == y;" - right: - Value: - Integer: - - I16 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 22 - path: compiler-test - content: " return -a == 0i16 == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return -a == 0i16 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i16 == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 27 - path: compiler-test - content: " return -a == 0i16 == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " return -a == 0i16 == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\n\n" + initial_theorem: a7bc8fb723de623e653ecada1109a7a6c658af1430c36a817062445ce546049b + canonicalized_theorem: a7bc8fb723de623e653ecada1109a7a6c658af1430c36a817062445ce546049b + type_inferenced_theorem: 87cbf23ee8ad59885301deda7c1d5aae8bc683ff6addc80454d43d477800a4d7 diff --git a/tests/expectations/compiler/compiler/integers/i16/sub.leo.out b/tests/expectations/compiler/compiler/integers/i16/sub.leo.out index a84da08900..467dfd8d06 100644 --- a/tests/expectations/compiler/compiler/integers/i16/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/sub.leo.out @@ -16,306 +16,6 @@ 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> 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: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i16, b: i16, c: i16) -> bool {\n...\n}" + initial_theorem: 0ed8af4e184becf59423bef3f18a8282e14797fa65605cde3ec662b3495c17b6 + canonicalized_theorem: 0ed8af4e184becf59423bef3f18a8282e14797fa65605cde3ec662b3495c17b6 + type_inferenced_theorem: 692c5aa63291373cd59ace973c18581c08e1713a80a07d4e49a94384e00f5b4d diff --git a/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out index 7e925263ae..3dd6d0cf0f 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out @@ -22,412 +22,6 @@ 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(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> 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(s: bool, a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i16, b: i16, c: i16) -> 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(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> 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(s: bool, a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i16, b: i16, c: i16) -> 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(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> 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(s: bool, a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i16, b: i16, c: i16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I16 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: - IntegerType: I16 - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i16, b: i16, c: i16) -> bool {\n...\n}\n\n" + initial_theorem: 9bcb3368b7c5c54401805a92c0a38a5e2790ce1404928ce53c5f11fc91facda6 + canonicalized_theorem: 9bcb3368b7c5c54401805a92c0a38a5e2790ce1404928ce53c5f11fc91facda6 + type_inferenced_theorem: 24a9f154beda36f615d7b8eb20d82d2302f5a98e530ec5d6f7178248c54fc485 diff --git a/tests/expectations/compiler/compiler/integers/i32/add.leo.out b/tests/expectations/compiler/compiler/integers/i32/add.leo.out index e3e4631bb7..d001ebc54c 100644 --- a/tests/expectations/compiler/compiler/integers/i32/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/add.leo.out @@ -16,306 +16,6 @@ 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + initial_theorem: f42260573fe4d4c93a3ef5d4ce6178361696d80a6d59c29bbc45c2f91372524d + canonicalized_theorem: f42260573fe4d4c93a3ef5d4ce6178361696d80a6d59c29bbc45c2f91372524d + type_inferenced_theorem: 53a55ce50552159c54febcc31f2f02f3b2b60264dfc53fece8b6cb12c80774f6 diff --git a/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out index 3018d619d7..020a3eda38 100644 --- a/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out @@ -13,236 +13,6 @@ outputs: - input_file: i32.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: i32, b: i32) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) {\\\"}\"}" - 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: i32, b: i32) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32) {" - output: ~ - 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 3 - line_stop: 5 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32) {\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: i32, b: i32) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) {\\\"}\"}" - 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: i32, b: i32) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32) {" - output: - Tuple: [] - 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 3 - line_stop: 5 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32) {\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: i32, b: i32) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) {\\\"}\"}" - 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: i32, b: i32) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32) {" - output: - Tuple: [] - 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 3 - line_stop: 5 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32) {\n...\n}" + initial_theorem: 0827f6332d1efc21bf2d0875dbe60a00ca0af5b8fac88831402c1289d5cb561a + canonicalized_theorem: 2744510f89a25b5b0cac8cdd335cfaad65f6df030b01b3bbf543d1766c7392b4 + type_inferenced_theorem: 03dfb3c4eabf1f32ffc24ef5cd2f682346a9b9aa03a081dae718954070ac4460 diff --git a/tests/expectations/compiler/compiler/integers/i32/div.leo.out b/tests/expectations/compiler/compiler/integers/i32/div.leo.out index 1c3441fc80..dd7fc4119d 100644 --- a/tests/expectations/compiler/compiler/integers/i32/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/div.leo.out @@ -16,306 +16,6 @@ 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + initial_theorem: a86f5aafe6577bb0be490afcc9e0837c068aab15ad2d130d47c1eda9dd754515 + canonicalized_theorem: a86f5aafe6577bb0be490afcc9e0837c068aab15ad2d130d47c1eda9dd754515 + type_inferenced_theorem: f25c7ba9ed10a4ad8e102f0af326a396b94169721251986531ba68313af8a40a diff --git a/tests/expectations/compiler/compiler/integers/i32/eq.leo.out b/tests/expectations/compiler/compiler/integers/i32/eq.leo.out index c4709adb5b..41eb64f4b7 100644 --- a/tests/expectations/compiler/compiler/integers/i32/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/eq.leo.out @@ -16,303 +16,6 @@ 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + initial_theorem: 3ad98a090977f2aea01478afbf703c1f657e4db04668129faa515e4111de74cf + canonicalized_theorem: 3ad98a090977f2aea01478afbf703c1f657e4db04668129faa515e4111de74cf + type_inferenced_theorem: 4587277f48dfa604f067c16208b2abbedfa2b349205641db8bf7e386a1a6f4a5 diff --git a/tests/expectations/compiler/compiler/integers/i32/ge.leo.out b/tests/expectations/compiler/compiler/integers/i32/ge.leo.out index 3a9721b0f6..842520415b 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ge.leo.out @@ -22,303 +22,6 @@ 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + initial_theorem: cf1aa79b2597a82e8347b093417a2281829e3c07fd74973b42bf7cc2018c7cb1 + canonicalized_theorem: cf1aa79b2597a82e8347b093417a2281829e3c07fd74973b42bf7cc2018c7cb1 + type_inferenced_theorem: 0810a1676362bcd258b306296590dc9ffa325dd3150b7e241a0c755979fa0b48 diff --git a/tests/expectations/compiler/compiler/integers/i32/gt.leo.out b/tests/expectations/compiler/compiler/integers/i32/gt.leo.out index 47da2b337b..bf74246ad1 100644 --- a/tests/expectations/compiler/compiler/integers/i32/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/gt.leo.out @@ -22,303 +22,6 @@ 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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: Gt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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: Gt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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: Gt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + initial_theorem: aa75c9b492684e06ea45996ac25a23ee47617312b986e9ce6756ff76f22be3b0 + canonicalized_theorem: aa75c9b492684e06ea45996ac25a23ee47617312b986e9ce6756ff76f22be3b0 + type_inferenced_theorem: b84a67583559c2d8794b0c4bee5038864b54649134deb088a4a72309b664e0a5 diff --git a/tests/expectations/compiler/compiler/integers/i32/le.leo.out b/tests/expectations/compiler/compiler/integers/i32/le.leo.out index 31f708a725..b19b5a7e34 100644 --- a/tests/expectations/compiler/compiler/integers/i32/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/le.leo.out @@ -22,303 +22,6 @@ 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool {\n...\n}" + initial_theorem: 496c0f9332973aeac3f7f10a663d7449dfb5ee3bb800dde47eda82f1e61beea3 + canonicalized_theorem: 496c0f9332973aeac3f7f10a663d7449dfb5ee3bb800dde47eda82f1e61beea3 + type_inferenced_theorem: 9e9611c48ffd078fdb36febf75b0294f2adad7e43e044f0fa80791a2a49f1b35 diff --git a/tests/expectations/compiler/compiler/integers/i32/lt.leo.out b/tests/expectations/compiler/compiler/integers/i32/lt.leo.out index a39844feb5..6ca0a7ffec 100644 --- a/tests/expectations/compiler/compiler/integers/i32/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/lt.leo.out @@ -22,303 +22,6 @@ 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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: Lt - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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: Lt - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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: Lt - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" + initial_theorem: aba1dbe634cb3a7ff87cfff3af689a49807d98b7068c6a8500f305d8cdc7d9a5 + canonicalized_theorem: aba1dbe634cb3a7ff87cfff3af689a49807d98b7068c6a8500f305d8cdc7d9a5 + type_inferenced_theorem: c0d77512c6581e6998277754ce5abf3acf4864a5f6d7440de3525e207b67e401 diff --git a/tests/expectations/compiler/compiler/integers/i32/max.leo.out b/tests/expectations/compiler/compiler/integers/i32/max.leo.out index 14156d5c00..af7739094d 100644 --- a/tests/expectations/compiler/compiler/integers/i32/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/max.leo.out @@ -16,307 +16,6 @@ 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: i32 = 2147483647;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i32 = 2147483647;" - type_: - IntegerType: I32 - value: - Value: - Implicit: - - "2147483647" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " const a: i32 = 2147483647;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " const a: i32 = 2147483647;" - - 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: - - 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: i32 = 2147483647;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i32 = 2147483647;" - type_: - IntegerType: I32 - value: - Value: - Implicit: - - "2147483647" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " const a: i32 = 2147483647;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " const a: i32 = 2147483647;" - - 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: - - 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: i32 = 2147483647;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i32 = 2147483647;" - type_: - IntegerType: I32 - value: - Value: - Integer: - - I32 - - "2147483647" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " const a: i32 = 2147483647;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " const a: i32 = 2147483647;" - - 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" + initial_theorem: bc6011a5b62f3a74a2279d10e8cc2a80309b7a72717fc6a3f21f3ef3dcdfd561 + canonicalized_theorem: bc6011a5b62f3a74a2279d10e8cc2a80309b7a72717fc6a3f21f3ef3dcdfd561 + type_inferenced_theorem: 000c069c25da11a48ed3d7e4a0a806a7cc482e62830e52bdc36f21843c855b8b diff --git a/tests/expectations/compiler/compiler/integers/i32/min.leo.out b/tests/expectations/compiler/compiler/integers/i32/min.leo.out index 89bdd310cb..5d2a7cfc1a 100644 --- a/tests/expectations/compiler/compiler/integers/i32/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/min.leo.out @@ -16,307 +16,6 @@ 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: i32 = -2147483648;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i32 = -2147483648;" - type_: - IntegerType: I32 - value: - Value: - Implicit: - - "-2147483648" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 31 - path: compiler-test - content: " const a: i32 = -2147483648;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 31 - path: compiler-test - content: " const a: i32 = -2147483648;" - - 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: - - 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: i32 = -2147483648;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i32 = -2147483648;" - type_: - IntegerType: I32 - value: - Value: - Implicit: - - "-2147483648" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 31 - path: compiler-test - content: " const a: i32 = -2147483648;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 31 - path: compiler-test - content: " const a: i32 = -2147483648;" - - 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: - - 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: i32 = -2147483648;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i32 = -2147483648;" - type_: - IntegerType: I32 - value: - Value: - Integer: - - I32 - - "-2147483648" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 31 - path: compiler-test - content: " const a: i32 = -2147483648;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 31 - path: compiler-test - content: " const a: i32 = -2147483648;" - - 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" + initial_theorem: fca7ee4eba546b4b481f1686b3db4c82c863b7aa122c3d38ff435672271dd609 + canonicalized_theorem: fca7ee4eba546b4b481f1686b3db4c82c863b7aa122c3d38ff435672271dd609 + type_inferenced_theorem: dab4b2cd49c1a69873fa82bb37f61013cdaf8d04e65023cd670514ca93ff9081 diff --git a/tests/expectations/compiler/compiler/integers/i32/mul.leo.out b/tests/expectations/compiler/compiler/integers/i32/mul.leo.out index 39e496fcef..edd1c67c6d 100644 --- a/tests/expectations/compiler/compiler/integers/i32/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/mul.leo.out @@ -16,306 +16,6 @@ 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + initial_theorem: 2db6f04149f1e4f57186156a57f6a03acba8c67d1fba6a1b1014e1f1b7a13aa8 + canonicalized_theorem: 2db6f04149f1e4f57186156a57f6a03acba8c67d1fba6a1b1014e1f1b7a13aa8 + type_inferenced_theorem: 3813b4f84021ed964cb335c399de9d5baacb695f0c881d6c15fdb557c3cb0ba4 diff --git a/tests/expectations/compiler/compiler/integers/i32/ne.leo.out b/tests/expectations/compiler/compiler/integers/i32/ne.leo.out index fd37d27800..708a542533 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ne.leo.out @@ -22,303 +22,6 @@ 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: 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: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: bool) -> bool{\n...\n}" + initial_theorem: 04055130f6fd1b07e2ac9d07a669d27d0152b5bf5b3ef2553bdffa819e555e9e + canonicalized_theorem: 04055130f6fd1b07e2ac9d07a669d27d0152b5bf5b3ef2553bdffa819e555e9e + type_inferenced_theorem: a6d7c40fc41874564a3d562e7c912fdda4a28803cb244d925a26110142cc3c36 diff --git a/tests/expectations/compiler/compiler/integers/i32/negate.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate.leo.out index e118778559..e0aef14e3d 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate.leo.out @@ -22,261 +22,6 @@ 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: i32, b: i32) -> 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: i32, b: i32) -> 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: i32, b: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Negate - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 3 - line_stop: 5 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32) -> 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: i32, b: i32) -> 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: i32, b: i32) -> 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: i32, b: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Negate - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 3 - line_stop: 5 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32) -> 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: i32, b: i32) -> 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: i32, b: i32) -> 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: i32, b: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Negate - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 3 - line_stop: 5 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32) -> bool {\n...\n}" + initial_theorem: 2ae478eb637f8e59b53f6750c726e728aa6bcdc702a9434f290a15ce091c2fd8 + canonicalized_theorem: 2ae478eb637f8e59b53f6750c726e728aa6bcdc702a9434f290a15ce091c2fd8 + type_inferenced_theorem: 0fe0731c61c040d0221066408c5bb64204db82b9521fb8bc6ebd0e9d7fb8e46c diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out index 8035adff3b..8383b39234 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out @@ -16,446 +16,6 @@ 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 = -128i32;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = -128i32;" - type_: ~ - value: - Value: - Integer: - - I32 - - "-128" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 22 - path: compiler-test - content: " const a = -128i32;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a = -128i32;" - - 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 = -a;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b = -a;" - type_: ~ - value: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" - op: Negate - span: - line_start: 5 - line_stop: 5 - col_start: 15 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - right: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = -128i32;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = -128i32;" - type_: ~ - value: - Value: - Integer: - - I32 - - "-128" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 22 - path: compiler-test - content: " const a = -128i32;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a = -128i32;" - - 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 = -a;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b = -a;" - type_: ~ - value: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" - op: Negate - span: - line_start: 5 - line_stop: 5 - col_start: 15 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - right: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = -128i32;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = -128i32;" - type_: - IntegerType: I32 - value: - Value: - Integer: - - I32 - - "-128" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 22 - path: compiler-test - content: " const a = -128i32;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a = -128i32;" - - 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 = -a;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b = -a;" - type_: - IntegerType: I32 - value: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" - op: Negate - span: - line_start: 5 - line_stop: 5 - col_start: 15 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - right: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}\n\n" + initial_theorem: 21c23d4b0a17a10c30503e42bc1bf9e0316f7f901b967f3373d66913641727ef + canonicalized_theorem: 21c23d4b0a17a10c30503e42bc1bf9e0316f7f901b967f3373d66913641727ef + type_inferenced_theorem: 0d28e064d20397ee01c71459fc7830663bd7dd571d311e5fa2d2c141069052a3 diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out index 5bc77f0a96..fd0fc1b4dc 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out @@ -16,376 +16,6 @@ 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 = 0i32;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = 0i32;" - type_: ~ - value: - Value: - Integer: - - I32 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " const a = 0i32;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " const a = 0i32;" - - Return: - expression: - Binary: - left: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i32 == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == 0i32 == y;" - right: - Value: - Integer: - - I32 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 22 - path: compiler-test - content: " return -a == 0i32 == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return -a == 0i32 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i32 == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 27 - path: compiler-test - content: " return -a == 0i32 == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " return -a == 0i32 == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = 0i32;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = 0i32;" - type_: ~ - value: - Value: - Integer: - - I32 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " const a = 0i32;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " const a = 0i32;" - - Return: - expression: - Binary: - left: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i32 == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == 0i32 == y;" - right: - Value: - Integer: - - I32 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 22 - path: compiler-test - content: " return -a == 0i32 == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return -a == 0i32 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i32 == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 27 - path: compiler-test - content: " return -a == 0i32 == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " return -a == 0i32 == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = 0i32;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = 0i32;" - type_: - IntegerType: I32 - value: - Value: - Integer: - - I32 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " const a = 0i32;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " const a = 0i32;" - - Return: - expression: - Binary: - left: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i32 == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == 0i32 == y;" - right: - Value: - Integer: - - I32 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 22 - path: compiler-test - content: " return -a == 0i32 == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return -a == 0i32 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i32 == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 27 - path: compiler-test - content: " return -a == 0i32 == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " return -a == 0i32 == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\n\n" + initial_theorem: f1101ce333dfdb4c59192eeec160deb86e46be82cf0add2014740c389f9353e4 + canonicalized_theorem: f1101ce333dfdb4c59192eeec160deb86e46be82cf0add2014740c389f9353e4 + type_inferenced_theorem: 2951a32c512d7d681b20c5f6b750aec9dade991b777fc9789278461b4a9bb954 diff --git a/tests/expectations/compiler/compiler/integers/i32/sub.leo.out b/tests/expectations/compiler/compiler/integers/i32/sub.leo.out index 66198c3592..8607c2d4e3 100644 --- a/tests/expectations/compiler/compiler/integers/i32/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/sub.leo.out @@ -16,306 +16,6 @@ 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> 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: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i32, b: i32, c: i32) -> bool {\n...\n}" + initial_theorem: ccb65cb15b43a9dc74925cca1128198439de34c4208a8ca6674cc11d775f4a6c + canonicalized_theorem: ccb65cb15b43a9dc74925cca1128198439de34c4208a8ca6674cc11d775f4a6c + type_inferenced_theorem: 53f17f158869f377d8feb3d63b4f8885d0a1e826d0e4d4faaa770a47fb2bea4d diff --git a/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out index 082065d6b8..4dc8624611 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out @@ -22,412 +22,6 @@ 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(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> 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(s: bool, a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i32, b: i32, c: i32) -> 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(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> 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(s: bool, a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i32, b: i32, c: i32) -> 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(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> 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(s: bool, a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i32, b: i32, c: i32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: - IntegerType: I32 - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i32, b: i32, c: i32) -> bool {\n...\n}\n\n" + initial_theorem: d9f544c8d3c1f2b5f75e43aaa6ad136262668bb8f52961b0890d6e417f1b7cd4 + canonicalized_theorem: d9f544c8d3c1f2b5f75e43aaa6ad136262668bb8f52961b0890d6e417f1b7cd4 + type_inferenced_theorem: 7f557bec0085efc8317c8061c4bb8b1d31d898e5d0d75e07b0ebc3bb958de770 diff --git a/tests/expectations/compiler/compiler/integers/i64/add.leo.out b/tests/expectations/compiler/compiler/integers/i64/add.leo.out index bb82d040df..e4a168bbdf 100644 --- a/tests/expectations/compiler/compiler/integers/i64/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/add.leo.out @@ -16,306 +16,6 @@ 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + initial_theorem: 95021c02880a3b85d58be6a8f0ddba2732ba35322af9c767c232a47c9a9e66a8 + canonicalized_theorem: 95021c02880a3b85d58be6a8f0ddba2732ba35322af9c767c232a47c9a9e66a8 + type_inferenced_theorem: f6befcf4a7ebde46dd5434464cb0ead1900294e5704000350667d1763d614c72 diff --git a/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out index 2c9c4a6ca7..a9decb1830 100644 --- a/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out @@ -13,236 +13,6 @@ outputs: - input_file: i64.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: i64, b: i64) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) {\\\"}\"}" - 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: i64, b: i64) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64) {" - output: ~ - 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 3 - line_stop: 5 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64) {\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: i64, b: i64) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) {\\\"}\"}" - 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: i64, b: i64) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64) {" - output: - Tuple: [] - 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 3 - line_stop: 5 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64) {\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: i64, b: i64) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) {\\\"}\"}" - 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: i64, b: i64) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64) {" - output: - Tuple: [] - 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 3 - line_stop: 5 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64) {\n...\n}" + initial_theorem: e602573b4419a65c310de826337dc34bfc1dc2e215546d27c84be8f958f2fbe7 + canonicalized_theorem: 66e33af7b62390b864dc4d488ecffaa3fbc1673788394ea87a94e650b6a4fcd2 + type_inferenced_theorem: 1d22b0a31160d820841f5c8b5b85a683e878d35c237f45d0e5cf0f98151a7577 diff --git a/tests/expectations/compiler/compiler/integers/i64/div.leo.out b/tests/expectations/compiler/compiler/integers/i64/div.leo.out index b029d59aea..e9c7d231ec 100644 --- a/tests/expectations/compiler/compiler/integers/i64/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/div.leo.out @@ -16,306 +16,6 @@ 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + initial_theorem: 9cbb95349371703905da55fff0b264d4ef85d754ac942d4e3f6e8079bb903c28 + canonicalized_theorem: 9cbb95349371703905da55fff0b264d4ef85d754ac942d4e3f6e8079bb903c28 + type_inferenced_theorem: 00e413b039c152dff6d27afb5c8ac135debc9774f9cb4bb3c58c56de3368552b diff --git a/tests/expectations/compiler/compiler/integers/i64/eq.leo.out b/tests/expectations/compiler/compiler/integers/i64/eq.leo.out index 233021e0b6..efbce65c1a 100644 --- a/tests/expectations/compiler/compiler/integers/i64/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/eq.leo.out @@ -16,303 +16,6 @@ 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + initial_theorem: 9d56aeda85fd6ffb426a28be08896b044758b35faf9dde99e2f26df642e0c765 + canonicalized_theorem: 9d56aeda85fd6ffb426a28be08896b044758b35faf9dde99e2f26df642e0c765 + type_inferenced_theorem: 0f6b7a99b49ac61d636b1dc0ba226e545ed51f55eddc962a5cf83c06705f00f7 diff --git a/tests/expectations/compiler/compiler/integers/i64/ge.leo.out b/tests/expectations/compiler/compiler/integers/i64/ge.leo.out index 7c0e7f5ef7..99e37d4824 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ge.leo.out @@ -22,303 +22,6 @@ 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + initial_theorem: 2bcccde7177cfd914485ebdaee98cdedccad44284d9bdcea03f17d6d20c57270 + canonicalized_theorem: 2bcccde7177cfd914485ebdaee98cdedccad44284d9bdcea03f17d6d20c57270 + type_inferenced_theorem: a6d083260a3b5596c2dc24424f95a5ccaf6e46998e3cea8d998416888e0b95b6 diff --git a/tests/expectations/compiler/compiler/integers/i64/gt.leo.out b/tests/expectations/compiler/compiler/integers/i64/gt.leo.out index 1736371bdf..c06e4f104c 100644 --- a/tests/expectations/compiler/compiler/integers/i64/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/gt.leo.out @@ -22,303 +22,6 @@ 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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: Gt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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: Gt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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: Gt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + initial_theorem: 55fd60c9cf7fef6cafa09678da081f9eedf33af39a7d04ec6ba9da4bbf4d3dd7 + canonicalized_theorem: 55fd60c9cf7fef6cafa09678da081f9eedf33af39a7d04ec6ba9da4bbf4d3dd7 + type_inferenced_theorem: 816b7aa988cbfc5fa868facbce6533c4a721ff7e8a6123c83329a1effd65f1c3 diff --git a/tests/expectations/compiler/compiler/integers/i64/le.leo.out b/tests/expectations/compiler/compiler/integers/i64/le.leo.out index 372d6ad8dd..a499d485e1 100644 --- a/tests/expectations/compiler/compiler/integers/i64/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/le.leo.out @@ -22,303 +22,6 @@ 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool {\n...\n}" + initial_theorem: 109dd9e920a3e1bd6cddad99ead2f7061810a22e1f5d0dc624c23a4f73058788 + canonicalized_theorem: 109dd9e920a3e1bd6cddad99ead2f7061810a22e1f5d0dc624c23a4f73058788 + type_inferenced_theorem: 242bb938c88a667b0591a25633163be323767851bbbc2867340742d5314d9a1e diff --git a/tests/expectations/compiler/compiler/integers/i64/lt.leo.out b/tests/expectations/compiler/compiler/integers/i64/lt.leo.out index 5409671159..08c4390ccd 100644 --- a/tests/expectations/compiler/compiler/integers/i64/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/lt.leo.out @@ -22,303 +22,6 @@ 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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: Lt - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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: Lt - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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: Lt - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" + initial_theorem: 027c84f3937e34053a8f35500c77fb58f751b974b73d1fa569aa935be1b25968 + canonicalized_theorem: 027c84f3937e34053a8f35500c77fb58f751b974b73d1fa569aa935be1b25968 + type_inferenced_theorem: 38992b9114c318fe9740fa924107c6aa52b8ca956815a4aaaf6d47e151414434 diff --git a/tests/expectations/compiler/compiler/integers/i64/max.leo.out b/tests/expectations/compiler/compiler/integers/i64/max.leo.out index bb76c1851f..1c297fa7fa 100644 --- a/tests/expectations/compiler/compiler/integers/i64/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/max.leo.out @@ -16,307 +16,6 @@ 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: i64 = 9223372036854775807;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i64 = 9223372036854775807;" - type_: - IntegerType: I64 - value: - Value: - Implicit: - - "9223372036854775807" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 39 - path: compiler-test - content: " const a: i64 = 9223372036854775807;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 39 - path: compiler-test - content: " const a: i64 = 9223372036854775807;" - - 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: - - 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: i64 = 9223372036854775807;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i64 = 9223372036854775807;" - type_: - IntegerType: I64 - value: - Value: - Implicit: - - "9223372036854775807" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 39 - path: compiler-test - content: " const a: i64 = 9223372036854775807;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 39 - path: compiler-test - content: " const a: i64 = 9223372036854775807;" - - 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: - - 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: i64 = 9223372036854775807;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i64 = 9223372036854775807;" - type_: - IntegerType: I64 - value: - Value: - Integer: - - I64 - - "9223372036854775807" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 39 - path: compiler-test - content: " const a: i64 = 9223372036854775807;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 39 - path: compiler-test - content: " const a: i64 = 9223372036854775807;" - - 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" + initial_theorem: 698a82d44fbb01e2c3c65df9190bac740af75cd5425cdff9e4bbf34b1eb928c7 + canonicalized_theorem: 698a82d44fbb01e2c3c65df9190bac740af75cd5425cdff9e4bbf34b1eb928c7 + type_inferenced_theorem: af2a509e627e3ee3ab2f4d3a47c4c97162c510a27e4aa30bbe0ff2461f9942af diff --git a/tests/expectations/compiler/compiler/integers/i64/min.leo.out b/tests/expectations/compiler/compiler/integers/i64/min.leo.out index 16e2b4b1d9..50f10d55af 100644 --- a/tests/expectations/compiler/compiler/integers/i64/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/min.leo.out @@ -16,307 +16,6 @@ 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: i64 = -9223372036854775808;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i64 = -9223372036854775808;" - type_: - IntegerType: I64 - value: - Value: - Implicit: - - "-9223372036854775808" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 40 - path: compiler-test - content: " const a: i64 = -9223372036854775808;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 40 - path: compiler-test - content: " const a: i64 = -9223372036854775808;" - - 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: - - 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: i64 = -9223372036854775808;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i64 = -9223372036854775808;" - type_: - IntegerType: I64 - value: - Value: - Implicit: - - "-9223372036854775808" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 40 - path: compiler-test - content: " const a: i64 = -9223372036854775808;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 40 - path: compiler-test - content: " const a: i64 = -9223372036854775808;" - - 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: - - 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: i64 = -9223372036854775808;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i64 = -9223372036854775808;" - type_: - IntegerType: I64 - value: - Value: - Integer: - - I64 - - "-9223372036854775808" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 40 - path: compiler-test - content: " const a: i64 = -9223372036854775808;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 40 - path: compiler-test - content: " const a: i64 = -9223372036854775808;" - - 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" + initial_theorem: 662b9ccc5756661ad9a5433665c235452e5602af433d5174a9a7d35575d58e50 + canonicalized_theorem: 662b9ccc5756661ad9a5433665c235452e5602af433d5174a9a7d35575d58e50 + type_inferenced_theorem: 1cca602cda64194082da2aeda13e806abfd1dec6f2f6e33b8f59e684a7f8a9f6 diff --git a/tests/expectations/compiler/compiler/integers/i64/mul.leo.out b/tests/expectations/compiler/compiler/integers/i64/mul.leo.out index 5cae1ffaf0..cddbdacfd6 100644 --- a/tests/expectations/compiler/compiler/integers/i64/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/mul.leo.out @@ -16,306 +16,6 @@ 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + initial_theorem: 56e7098f4df6632cd2182397b87055079912107712b141e5752c733fd205ea5d + canonicalized_theorem: 56e7098f4df6632cd2182397b87055079912107712b141e5752c733fd205ea5d + type_inferenced_theorem: 46df0d390bd68d1309e24be5d7a442884a6d7b1f001649d0ebc529c31d4850b6 diff --git a/tests/expectations/compiler/compiler/integers/i64/ne.leo.out b/tests/expectations/compiler/compiler/integers/i64/ne.leo.out index 6dffb3f8d0..1de0eacc10 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ne.leo.out @@ -22,303 +22,6 @@ 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: 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: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: bool) -> bool{\n...\n}" + initial_theorem: f973603815c81c6de14edfbfe5bcbb5adab0be5f45dd6b517dccaa7ace0b6396 + canonicalized_theorem: f973603815c81c6de14edfbfe5bcbb5adab0be5f45dd6b517dccaa7ace0b6396 + type_inferenced_theorem: ebff9ab7ae18bf3c44aeb65e54e4d47e084c9f82eeb82ae99c5093f0e5150843 diff --git a/tests/expectations/compiler/compiler/integers/i64/negate.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate.leo.out index 7795eb217a..266ef579d2 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate.leo.out @@ -22,261 +22,6 @@ 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: i64, b: i64) -> 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: i64, b: i64) -> 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: i64, b: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Negate - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 3 - line_stop: 5 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64) -> 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: i64, b: i64) -> 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: i64, b: i64) -> 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: i64, b: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Negate - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 3 - line_stop: 5 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64) -> 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: i64, b: i64) -> 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: i64, b: i64) -> 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: i64, b: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Negate - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 3 - line_stop: 5 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64) -> bool {\n...\n}" + initial_theorem: 928bb21b0da55474b51aa036c31fabe00ba68f3ff051159871a99493503edcb8 + canonicalized_theorem: 928bb21b0da55474b51aa036c31fabe00ba68f3ff051159871a99493503edcb8 + type_inferenced_theorem: 5e9aea6325f193622ecd68c7c7c7c05864d05b37b0b122432119243939153f49 diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out index 390334eb3e..e8e1b07976 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out @@ -16,446 +16,6 @@ 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 = -128i64;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = -128i64;" - type_: ~ - value: - Value: - Integer: - - I64 - - "-128" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 22 - path: compiler-test - content: " const a = -128i64;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a = -128i64;" - - 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 = -a;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b = -a;" - type_: ~ - value: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" - op: Negate - span: - line_start: 5 - line_stop: 5 - col_start: 15 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - right: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = -128i64;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = -128i64;" - type_: ~ - value: - Value: - Integer: - - I64 - - "-128" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 22 - path: compiler-test - content: " const a = -128i64;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a = -128i64;" - - 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 = -a;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b = -a;" - type_: ~ - value: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" - op: Negate - span: - line_start: 5 - line_stop: 5 - col_start: 15 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - right: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = -128i64;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = -128i64;" - type_: - IntegerType: I64 - value: - Value: - Integer: - - I64 - - "-128" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 22 - path: compiler-test - content: " const a = -128i64;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a = -128i64;" - - 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 = -a;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const b = -a;" - type_: - IntegerType: I64 - value: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = -a;\\\"}\"}" - op: Negate - span: - line_start: 5 - line_stop: 5 - col_start: 15 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " const b = -a;" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - right: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return b == -a == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == -a == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " return b == -a == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}\n\n" + initial_theorem: dcc877091aff3aff01bbb075ab6b7f64c26a743bac10f51010cc45157711a65a + canonicalized_theorem: dcc877091aff3aff01bbb075ab6b7f64c26a743bac10f51010cc45157711a65a + type_inferenced_theorem: d86e07433c967775af7fccc46195317dd8abc41b52852918084aa4eabe63466f diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out index 92f974ccb6..c0fb72069d 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out @@ -16,376 +16,6 @@ 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 = 0i64;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = 0i64;" - type_: ~ - value: - Value: - Integer: - - I64 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " const a = 0i64;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " const a = 0i64;" - - Return: - expression: - Binary: - left: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i64 == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == 0i64 == y;" - right: - Value: - Integer: - - I64 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 22 - path: compiler-test - content: " return -a == 0i64 == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return -a == 0i64 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i64 == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 27 - path: compiler-test - content: " return -a == 0i64 == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " return -a == 0i64 == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = 0i64;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = 0i64;" - type_: ~ - value: - Value: - Integer: - - I64 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " const a = 0i64;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " const a = 0i64;" - - Return: - expression: - Binary: - left: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i64 == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == 0i64 == y;" - right: - Value: - Integer: - - I64 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 22 - path: compiler-test - content: " return -a == 0i64 == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return -a == 0i64 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i64 == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 27 - path: compiler-test - content: " return -a == 0i64 == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " return -a == 0i64 == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = 0i64;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = 0i64;" - type_: - IntegerType: I64 - value: - Value: - Integer: - - I64 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " const a = 0i64;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " const a = 0i64;" - - Return: - expression: - Binary: - left: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i64 == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == 0i64 == y;" - right: - Value: - Integer: - - I64 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 22 - path: compiler-test - content: " return -a == 0i64 == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return -a == 0i64 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i64 == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 27 - path: compiler-test - content: " return -a == 0i64 == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " return -a == 0i64 == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\n\n" + initial_theorem: 8ff367f167d482baba64ec752418d09d68a8ef7790a5b877a888b4e3b42ae5ab + canonicalized_theorem: 8ff367f167d482baba64ec752418d09d68a8ef7790a5b877a888b4e3b42ae5ab + type_inferenced_theorem: 868614ead4954c1561beb808880c2d2a4da60658753773febe82e7031d512c3c diff --git a/tests/expectations/compiler/compiler/integers/i64/sub.leo.out b/tests/expectations/compiler/compiler/integers/i64/sub.leo.out index 6b1e821b3d..069d2f3c10 100644 --- a/tests/expectations/compiler/compiler/integers/i64/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/sub.leo.out @@ -16,306 +16,6 @@ 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> 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: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i64, b: i64, c: i64) -> bool {\n...\n}" + initial_theorem: 5912057d08a97f306a50eee0b5fc41b703ac08625a2a52948f2efe1fd88e9e22 + canonicalized_theorem: 5912057d08a97f306a50eee0b5fc41b703ac08625a2a52948f2efe1fd88e9e22 + type_inferenced_theorem: a8402fdcd9a7806c0abb5a5f251d843cbdaa78a9c8b3a4732caff52e91ebb405 diff --git a/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out index fd5a210ba2..a4825dc6d3 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out @@ -22,412 +22,6 @@ 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(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> 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(s: bool, a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i64, b: i64, c: i64) -> 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(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> 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(s: bool, a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i64, b: i64, c: i64) -> 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(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> 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(s: bool, a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i64, b: i64, c: i64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I64 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: - IntegerType: I64 - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i64, b: i64, c: i64) -> bool {\n...\n}\n\n" + initial_theorem: 855c17c617a81e8c5b10eba1f7eecd695209bf976a80eea338263afa18916800 + canonicalized_theorem: 855c17c617a81e8c5b10eba1f7eecd695209bf976a80eea338263afa18916800 + type_inferenced_theorem: 4fa3ab3a8fc73e4d758fa6cfbe3417a71135b5073328d1227bcd8695d61880a3 diff --git a/tests/expectations/compiler/compiler/integers/i8/add.leo.out b/tests/expectations/compiler/compiler/integers/i8/add.leo.out index 067579ef56..02f779336c 100644 --- a/tests/expectations/compiler/compiler/integers/i8/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/add.leo.out @@ -16,306 +16,6 @@ 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: Add - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: Add - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: Add - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + initial_theorem: 24eace7d2b0f99fb7a1a0d1d5089047c0805945d98d55e27fe2794cf68b46a9a + canonicalized_theorem: 24eace7d2b0f99fb7a1a0d1d5089047c0805945d98d55e27fe2794cf68b46a9a + type_inferenced_theorem: f3aa44fe027d17b02b2751d91483ed27a14039fdf523952236b89c345d2359fa diff --git a/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out index 45dc8c29bf..5fd74a0b80 100644 --- a/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out @@ -13,236 +13,6 @@ outputs: - input_file: i8.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: i8, b: i8) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) {\\\"}\"}" - 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: i8, b: i8) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8) {" - output: ~ - 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 3 - line_stop: 5 - col_start: 29 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8) {\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: i8, b: i8) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) {\\\"}\"}" - 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: i8, b: i8) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8) {" - output: - Tuple: [] - 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 3 - line_stop: 5 - col_start: 29 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8) {\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: i8, b: i8) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) {\\\"}\"}" - 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: i8, b: i8) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8) {" - output: - Tuple: [] - 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 3 - line_stop: 5 - col_start: 29 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8) {\n...\n}" + initial_theorem: a579aa5a1bc5185d4dc4e8d463edc176d1fbf8d2761f64f276c2bc89ea57a8e7 + canonicalized_theorem: 852adf503c72cc27c6555b37f6742c195f9c5b9dc837734954caec31b519a85d + type_inferenced_theorem: 9a3ebea7ab65abf6dc23811657dbdae791bf72cc5b28ccbc7dc4e89515d97463 diff --git a/tests/expectations/compiler/compiler/integers/i8/div.leo.out b/tests/expectations/compiler/compiler/integers/i8/div.leo.out index a5b7d74040..d47b2740a4 100644 --- a/tests/expectations/compiler/compiler/integers/i8/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/div.leo.out @@ -16,306 +16,6 @@ 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + initial_theorem: 2ad50f87d6336c8436def71a47ed317220eadf07ef90717be8ef2567c60913f9 + canonicalized_theorem: 2ad50f87d6336c8436def71a47ed317220eadf07ef90717be8ef2567c60913f9 + type_inferenced_theorem: a818fdc8b79bc6b68364a686a6b17b6167fcbdd5d4a80123419cabfa526f46aa diff --git a/tests/expectations/compiler/compiler/integers/i8/eq.leo.out b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out index fbc5f0ebf4..48f0bba95c 100644 --- a/tests/expectations/compiler/compiler/integers/i8/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out @@ -16,303 +16,6 @@ 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + initial_theorem: 035d136c5a2b9d429f6202d9c5967099e73312e0fbfa8bf669899a983ed1f1fa + canonicalized_theorem: 035d136c5a2b9d429f6202d9c5967099e73312e0fbfa8bf669899a983ed1f1fa + type_inferenced_theorem: 5e552e93b709e9931695f42df9f43459b4321ca23d91ccec7496a908e0e9d0b0 diff --git a/tests/expectations/compiler/compiler/integers/i8/ge.leo.out b/tests/expectations/compiler/compiler/integers/i8/ge.leo.out index dca3d8b376..d004c50f73 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ge.leo.out @@ -22,303 +22,6 @@ 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + initial_theorem: be98a456d3f1a866fbb1793db4a6da15b6c23e5bcfe1ea820808c50df523d269 + canonicalized_theorem: be98a456d3f1a866fbb1793db4a6da15b6c23e5bcfe1ea820808c50df523d269 + type_inferenced_theorem: 6291f19c100f11c11cee46c98a7ed78de16f2bd8527bdb2926cc7c0e7212b084 diff --git a/tests/expectations/compiler/compiler/integers/i8/gt.leo.out b/tests/expectations/compiler/compiler/integers/i8/gt.leo.out index 1ec1163142..bd9c73ef7e 100644 --- a/tests/expectations/compiler/compiler/integers/i8/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/gt.leo.out @@ -22,303 +22,6 @@ 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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: Gt - 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: Eq - 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: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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: Gt - 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: Eq - 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: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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: Gt - 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: Eq - 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: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + initial_theorem: 7f40bef3810a98a6069ee9f27d91902b8c21779e27790fd44d80e6b798e26214 + canonicalized_theorem: 7f40bef3810a98a6069ee9f27d91902b8c21779e27790fd44d80e6b798e26214 + type_inferenced_theorem: c83944355f670629d6cefc4e35dc52b86d5f42a6b6f4b20e0e6b712b661d5261 diff --git a/tests/expectations/compiler/compiler/integers/i8/le.leo.out b/tests/expectations/compiler/compiler/integers/i8/le.leo.out index 2e6eb3d917..d67b8a16b6 100644 --- a/tests/expectations/compiler/compiler/integers/i8/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/le.leo.out @@ -22,303 +22,6 @@ 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool {\n...\n}" + initial_theorem: 57bdf9ca35c48812e16a9d4cb6531c96a625ed9995804ed4b8b31edc1837c124 + canonicalized_theorem: 57bdf9ca35c48812e16a9d4cb6531c96a625ed9995804ed4b8b31edc1837c124 + type_inferenced_theorem: 6fe044c68d21ad1379c1a74967a420cf0ffa182785d294bdabe75b624b9dad6d diff --git a/tests/expectations/compiler/compiler/integers/i8/lt.leo.out b/tests/expectations/compiler/compiler/integers/i8/lt.leo.out index 4244bcb48d..d8850ed654 100644 --- a/tests/expectations/compiler/compiler/integers/i8/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/lt.leo.out @@ -22,303 +22,6 @@ 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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: Lt - 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: Eq - 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: 45 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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: Lt - 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: Eq - 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: 45 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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: Lt - 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: Eq - 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: 45 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" + initial_theorem: bb0cf928abcdf4b3492dd75699a6726f11600b55021bc56b4fd45f6fd3df4b54 + canonicalized_theorem: bb0cf928abcdf4b3492dd75699a6726f11600b55021bc56b4fd45f6fd3df4b54 + type_inferenced_theorem: 5b41154e37f1f4976f75493b49cef9b8d0b2b2ca1a7f42b586e1390c0767bb5e diff --git a/tests/expectations/compiler/compiler/integers/i8/max.leo.out b/tests/expectations/compiler/compiler/integers/i8/max.leo.out index 6186862f11..f5e2397a04 100644 --- a/tests/expectations/compiler/compiler/integers/i8/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/max.leo.out @@ -16,307 +16,6 @@ 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: i8 = 127;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i8 = 127;" - type_: - IntegerType: I8 - value: - Value: - Implicit: - - "127" - - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " const a: i8 = 127;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a: i8 = 127;" - - 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: - - 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: i8 = 127;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i8 = 127;" - type_: - IntegerType: I8 - value: - Value: - Implicit: - - "127" - - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " const a: i8 = 127;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a: i8 = 127;" - - 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: - - 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: i8 = 127;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i8 = 127;" - type_: - IntegerType: I8 - value: - Value: - Integer: - - I8 - - "127" - - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " const a: i8 = 127;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a: i8 = 127;" - - 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" + initial_theorem: 5b36c3f9e174c3e003993e13992f35b1b2b381bb600999205fcb6099b56b521e + canonicalized_theorem: 5b36c3f9e174c3e003993e13992f35b1b2b381bb600999205fcb6099b56b521e + type_inferenced_theorem: 8175e64b383fb53a548b58cc463e2edd55a87d133fa60246b794dde5b9119ef6 diff --git a/tests/expectations/compiler/compiler/integers/i8/min.leo.out b/tests/expectations/compiler/compiler/integers/i8/min.leo.out index 44484ed1af..2ff7d5b992 100644 --- a/tests/expectations/compiler/compiler/integers/i8/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/min.leo.out @@ -16,307 +16,6 @@ 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: i8 = -128;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i8 = -128;" - type_: - IntegerType: I8 - value: - Value: - Implicit: - - "-128" - - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 23 - path: compiler-test - content: " const a: i8 = -128;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " const a: i8 = -128;" - - 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: - - 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: i8 = -128;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i8 = -128;" - type_: - IntegerType: I8 - value: - Value: - Implicit: - - "-128" - - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 23 - path: compiler-test - content: " const a: i8 = -128;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " const a: i8 = -128;" - - 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: - - 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: i8 = -128;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: i8 = -128;" - type_: - IntegerType: I8 - value: - Value: - Integer: - - I8 - - "-128" - - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 23 - path: compiler-test - content: " const a: i8 = -128;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " const a: i8 = -128;" - - 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" + initial_theorem: 09df9882f6b902d6148316917e8ed9e62408e85c2248e111f87cbb505f7705fd + canonicalized_theorem: 09df9882f6b902d6148316917e8ed9e62408e85c2248e111f87cbb505f7705fd + type_inferenced_theorem: dbe09fecd41cbf9d4027140464ce6e87e57f4ee32f60dd1272a5cec82d088a1c diff --git a/tests/expectations/compiler/compiler/integers/i8/mul.leo.out b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out index 49c2065dc6..00e23b0c62 100644 --- a/tests/expectations/compiler/compiler/integers/i8/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out @@ -16,306 +16,6 @@ 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: Mul - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: Mul - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: Mul - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + initial_theorem: ad9b97cdc654da8d5c850e7d79b38f26dae3fcb90711c18a0c3b34df60349c7e + canonicalized_theorem: ad9b97cdc654da8d5c850e7d79b38f26dae3fcb90711c18a0c3b34df60349c7e + type_inferenced_theorem: de1670f9a5fc69c24fdd5607d6789af9d5a59e6f87f170857d8c29f3414013e5 diff --git a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out index 412bf2b9b0..3d87bcea8b 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out @@ -22,303 +22,6 @@ 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 45 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 45 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: 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: i8, b: i8, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: 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: i8, b: i8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 45 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: bool) -> bool{\n...\n}" + initial_theorem: bf4147e29bd455cee755fac32078c7ab45c13bdb18d9b2ea3a27cf2f454ed3cb + canonicalized_theorem: bf4147e29bd455cee755fac32078c7ab45c13bdb18d9b2ea3a27cf2f454ed3cb + type_inferenced_theorem: 1f6abffa9fa5dbca11e43b1c4f228937bf100a4013e8f83e920fbff3d8d22f44 diff --git a/tests/expectations/compiler/compiler/integers/i8/negate.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out index bd805aa05b..4804ca5658 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out @@ -22,261 +22,6 @@ 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: i8, b: i8) -> 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: i8, b: i8) -> 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: i8, b: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Negate - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 3 - line_stop: 5 - col_start: 37 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8) -> 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: i8, b: i8) -> 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: i8, b: i8) -> 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: i8, b: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Negate - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 3 - line_stop: 5 - col_start: 37 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8) -> 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: i8, b: i8) -> 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: i8, b: i8) -> 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: i8, b: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Negate - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == b;" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == b;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " return -a == b;" - span: - line_start: 3 - line_stop: 5 - col_start: 37 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8) -> bool {\n...\n}" + initial_theorem: 2698a8d7153a02a13dfb9450652465cae7b807f53ed1b1429eaecfb888300334 + canonicalized_theorem: 2698a8d7153a02a13dfb9450652465cae7b807f53ed1b1429eaecfb888300334 + type_inferenced_theorem: fe061e3467bfcabc7a36ea290be2f04aff27efa6dae8e1164bd03ce1af8664c1 diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out index 74d9e2aae7..539990264c 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out @@ -16,376 +16,6 @@ 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 = 0i8;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = 0i8;" - type_: ~ - value: - Value: - Integer: - - I8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 18 - path: compiler-test - content: " const a = 0i8;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " const a = 0i8;" - - Return: - expression: - Binary: - left: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i8 == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == 0i8 == y;" - right: - Value: - Integer: - - I8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " return -a == 0i8 == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return -a == 0i8 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i8 == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 26 - path: compiler-test - content: " return -a == 0i8 == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " return -a == 0i8 == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = 0i8;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = 0i8;" - type_: ~ - value: - Value: - Integer: - - I8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 18 - path: compiler-test - content: " const a = 0i8;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " const a = 0i8;" - - Return: - expression: - Binary: - left: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i8 == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == 0i8 == y;" - right: - Value: - Integer: - - I8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " return -a == 0i8 == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return -a == 0i8 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i8 == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 26 - path: compiler-test - content: " return -a == 0i8 == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " return -a == 0i8 == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - 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\":\"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 = 0i8;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = 0i8;" - type_: - IntegerType: I8 - value: - Value: - Integer: - - I8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 18 - path: compiler-test - content: " const a = 0i8;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " const a = 0i8;" - - Return: - expression: - Binary: - left: - Binary: - left: - Unary: - inner: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i8 == y;\\\"}\"}" - op: Negate - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 14 - path: compiler-test - content: " return -a == 0i8 == y;" - right: - Value: - Integer: - - I8 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " return -a == 0i8 == y;" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return -a == 0i8 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == 0i8 == y;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 26 - path: compiler-test - content: " return -a == 0i8 == y;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " return -a == 0i8 == y;" - span: - line_start: 3 - line_stop: 7 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\n\n" + initial_theorem: 04a3369b02921bfec3d0753adaea9adee8d90c31e65cf53bd1beb14965dd22e5 + canonicalized_theorem: 04a3369b02921bfec3d0753adaea9adee8d90c31e65cf53bd1beb14965dd22e5 + type_inferenced_theorem: 5d9f2f6b87a16f82e9995c59a3f456254ffd3a04ea8e802ca7e8e42779219ee8 diff --git a/tests/expectations/compiler/compiler/integers/i8/sub.leo.out b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out index ee4b9058a8..7f4f0dd2ab 100644 --- a/tests/expectations/compiler/compiler/integers/i8/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out @@ -16,306 +16,6 @@ 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: Sub - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: Sub - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> 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: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> 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: Sub - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: i8, b: i8, c: i8) -> bool {\n...\n}" + initial_theorem: 59c47c65fa77729fdb64f325d9498a52b13e57f92e57f64c0b65f32a81b5d0b5 + canonicalized_theorem: 59c47c65fa77729fdb64f325d9498a52b13e57f92e57f64c0b65f32a81b5d0b5 + type_inferenced_theorem: 46fbeb4b3b044958e67d0ae0b89a149729a982b9c02fc9e0892bc907c93b3b5b diff --git a/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out index fc75cd4183..7f317f8c3b 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out @@ -22,412 +22,6 @@ 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(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> 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(s: bool, a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 38 - col_stop: 39 - path: compiler-test - content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 53 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i8, b: i8, c: i8) -> 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(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> 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(s: bool, a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 38 - col_stop: 39 - path: compiler-test - content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 53 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i8, b: i8, c: i8) -> 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(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> 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(s: bool, a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: i8, b: i8, c: i8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I8 - span: - line_start: 3 - line_stop: 3 - col_start: 38 - col_stop: 39 - path: compiler-test - content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: - IntegerType: I8 - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 53 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: i8, b: i8, c: i8) -> bool {\n...\n}\n\n" + initial_theorem: 807f6d204c511da0de8677fec27d64b461d505be3f756a5cf2430c4e5fe16d6d + canonicalized_theorem: 807f6d204c511da0de8677fec27d64b461d505be3f756a5cf2430c4e5fe16d6d + type_inferenced_theorem: 90970cdd4a45182dac1861ed3cd4ce397f3d0117c596b8ed388b98a28e4718ca diff --git a/tests/expectations/compiler/compiler/integers/u128/add.leo.out b/tests/expectations/compiler/compiler/integers/u128/add.leo.out index c550b5fd10..ce8c382cfd 100644 --- a/tests/expectations/compiler/compiler/integers/u128/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/add.leo.out @@ -16,306 +16,6 @@ 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: Add - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: Add - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: Add - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + initial_theorem: d45e6866a79c28636a5333b057f577ddb9af3528c72cfb0292d6cb30e9a84c34 + canonicalized_theorem: d45e6866a79c28636a5333b057f577ddb9af3528c72cfb0292d6cb30e9a84c34 + type_inferenced_theorem: d5500f11415075486f76f4f88a98f48f89ba30b9c7829527481004f05563be56 diff --git a/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out index 82a0ed418f..72d80d2bf9 100644 --- a/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out @@ -16,300 +16,6 @@ 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: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - - 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 == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 3 - line_stop: 6 - col_start: 41 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - - 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 == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 3 - line_stop: 6 - col_start: 41 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - - 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 == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 3 - line_stop: 6 - col_start: 41 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128) -> bool {\n...\n}\n" + initial_theorem: a50e90edf35c1c2d69c6ab04a5024c951caf54e37677cba8aed3e5f653ffcf5e + canonicalized_theorem: a50e90edf35c1c2d69c6ab04a5024c951caf54e37677cba8aed3e5f653ffcf5e + type_inferenced_theorem: 62efd6e15269c60fd45fbd873fc2a120ea98ba0a9bf96d774eb85847c36d482e diff --git a/tests/expectations/compiler/compiler/integers/u128/div.leo.out b/tests/expectations/compiler/compiler/integers/u128/div.leo.out index db736fb18e..afd4521eca 100644 --- a/tests/expectations/compiler/compiler/integers/u128/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/div.leo.out @@ -16,306 +16,6 @@ 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + initial_theorem: f50f65ba74e0e2c2cf146d66f83beb18023692e90b664e0217a19486b9b5fd67 + canonicalized_theorem: f50f65ba74e0e2c2cf146d66f83beb18023692e90b664e0217a19486b9b5fd67 + type_inferenced_theorem: d851da0f7cf5b7dacc0186f963b33564fde73427d10b84d13635923d12998963 diff --git a/tests/expectations/compiler/compiler/integers/u128/eq.leo.out b/tests/expectations/compiler/compiler/integers/u128/eq.leo.out index 84d94b4bec..75bb23feb8 100644 --- a/tests/expectations/compiler/compiler/integers/u128/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/eq.leo.out @@ -22,303 +22,6 @@ 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + initial_theorem: 573187768b9c075767e7798068a4bfb0a1b9081f1ed0f8952560bd12d5bf15af + canonicalized_theorem: 573187768b9c075767e7798068a4bfb0a1b9081f1ed0f8952560bd12d5bf15af + type_inferenced_theorem: 136eb2cb152b93f02856d911f3381d24895a77739220e3026d9b4a1d2c2ceb68 diff --git a/tests/expectations/compiler/compiler/integers/u128/ge.leo.out b/tests/expectations/compiler/compiler/integers/u128/ge.leo.out index 18dcb52460..106bd592f0 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ge.leo.out @@ -28,303 +28,6 @@ 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + initial_theorem: c398a4f1f04fc9ebe97c65cb33c26ac5faf161417493db8bd8c50f0c0da7fad6 + canonicalized_theorem: c398a4f1f04fc9ebe97c65cb33c26ac5faf161417493db8bd8c50f0c0da7fad6 + type_inferenced_theorem: f5052bd40c74aee7da886eb480ccbb24136ee7d2fed1c70d5e8d38e819a9a697 diff --git a/tests/expectations/compiler/compiler/integers/u128/gt.leo.out b/tests/expectations/compiler/compiler/integers/u128/gt.leo.out index 98faff1f31..4a4b63bb99 100644 --- a/tests/expectations/compiler/compiler/integers/u128/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/gt.leo.out @@ -16,308 +16,6 @@ outputs: - input_file: u128_f.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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) {" - output: ~ - block: - statements: - - Console: - function: - Assert: - Binary: - left: - 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 > b == c);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Gt - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " console.assert(a > b == c);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 3 - line_stop: 5 - col_start: 42 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) {" - output: - Tuple: [] - block: - statements: - - Console: - function: - Assert: - Binary: - left: - 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 > b == c);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Gt - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " console.assert(a > b == c);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 3 - line_stop: 5 - col_start: 42 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) {" - output: - Tuple: [] - block: - statements: - - Console: - function: - Assert: - Binary: - left: - 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 > b == c);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Gt - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " console.assert(a > b == c);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 3 - line_stop: 5 - col_start: 42 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) {\n...\n}" + initial_theorem: 8c2309bdacd6b025d2462e08376db93e25406d164abc8955e039a338a0a58c00 + canonicalized_theorem: 7bec6018459ad543c408f4f911200b81dc05f855ef680a3b12c6b8f58558f216 + type_inferenced_theorem: d495e9868687b702dc07201da22b59dfd91212f2d6632e67f0a967b0fc748995 diff --git a/tests/expectations/compiler/compiler/integers/u128/input.leo.out b/tests/expectations/compiler/compiler/integers/u128/input.leo.out index ae2c11119b..43e5af16e1 100644 --- a/tests/expectations/compiler/compiler/integers/u128/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/input.leo.out @@ -16,231 +16,6 @@ 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: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128) -> 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: u128, b: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128) -> bool {\n...\n}" + initial_theorem: 564026493df81fbcbea34b98737e3aade0b3a0a410f19534c61b8132b2796a58 + canonicalized_theorem: 564026493df81fbcbea34b98737e3aade0b3a0a410f19534c61b8132b2796a58 + type_inferenced_theorem: c64ae9e0e4aefcc4897de172b9107ab0a824b49dbd1e678d88ae15a33c85ce41 diff --git a/tests/expectations/compiler/compiler/integers/u128/le.leo.out b/tests/expectations/compiler/compiler/integers/u128/le.leo.out index 69b20dc799..d29420a0bc 100644 --- a/tests/expectations/compiler/compiler/integers/u128/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/le.leo.out @@ -28,303 +28,6 @@ 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + initial_theorem: 07514fbeb1b81b4c2c99555ab2b7402b71997838ab48cf8a00c859441a93bfaa + canonicalized_theorem: 07514fbeb1b81b4c2c99555ab2b7402b71997838ab48cf8a00c859441a93bfaa + type_inferenced_theorem: b3aad22da78779bbc4982cc8ee42b1d68ffc77cdea0000d31f8ec23710f088b5 diff --git a/tests/expectations/compiler/compiler/integers/u128/lt.leo.out b/tests/expectations/compiler/compiler/integers/u128/lt.leo.out index 5bdae121ce..61b6e2ff20 100644 --- a/tests/expectations/compiler/compiler/integers/u128/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/lt.leo.out @@ -22,303 +22,6 @@ 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> 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: Lt - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> 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: Lt - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> 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: Lt - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + initial_theorem: 6cc9a99c85b53360a020faa95b45beda98089442160343df3c0b5705430a8d0d + canonicalized_theorem: 6cc9a99c85b53360a020faa95b45beda98089442160343df3c0b5705430a8d0d + type_inferenced_theorem: 63fcd7cf6ba3b36bbeed4bd7a234502a427b93289f0253693226692fe7dd457b diff --git a/tests/expectations/compiler/compiler/integers/u128/max.leo.out b/tests/expectations/compiler/compiler/integers/u128/max.leo.out index 9d69c7c923..4dfd557023 100644 --- a/tests/expectations/compiler/compiler/integers/u128/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/max.leo.out @@ -16,307 +16,6 @@ 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: u128 = 340282366920938463463374607431768211455;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u128 = 340282366920938463463374607431768211455;" - type_: - IntegerType: U128 - value: - Value: - Implicit: - - "340282366920938463463374607431768211455" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 60 - path: compiler-test - content: " const a: u128 = 340282366920938463463374607431768211455;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 60 - path: compiler-test - content: " const a: u128 = 340282366920938463463374607431768211455;" - - 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: - - 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: u128 = 340282366920938463463374607431768211455;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u128 = 340282366920938463463374607431768211455;" - type_: - IntegerType: U128 - value: - Value: - Implicit: - - "340282366920938463463374607431768211455" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 60 - path: compiler-test - content: " const a: u128 = 340282366920938463463374607431768211455;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 60 - path: compiler-test - content: " const a: u128 = 340282366920938463463374607431768211455;" - - 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: - - 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: u128 = 340282366920938463463374607431768211455;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u128 = 340282366920938463463374607431768211455;" - type_: - IntegerType: U128 - value: - Value: - Integer: - - U128 - - "340282366920938463463374607431768211455" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 60 - path: compiler-test - content: " const a: u128 = 340282366920938463463374607431768211455;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 60 - path: compiler-test - content: " const a: u128 = 340282366920938463463374607431768211455;" - - 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" + initial_theorem: 22e031b9484b25549efe77735034b7868fe15cb482fb2b9866c4eb6a97d66a9b + canonicalized_theorem: 22e031b9484b25549efe77735034b7868fe15cb482fb2b9866c4eb6a97d66a9b + type_inferenced_theorem: 1a18559f37943d7863243f97f204a7967bd5ca421cf614db3a454eb62570fa55 diff --git a/tests/expectations/compiler/compiler/integers/u128/min.leo.out b/tests/expectations/compiler/compiler/integers/u128/min.leo.out index c712d1a415..3f62d18ad4 100644 --- a/tests/expectations/compiler/compiler/integers/u128/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/min.leo.out @@ -16,307 +16,6 @@ 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: u128 = 0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u128 = 0;" - type_: - IntegerType: U128 - value: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " const a: u128 = 0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a: u128 = 0;" - - 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: 31 - 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: - - 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: u128 = 0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u128 = 0;" - type_: - IntegerType: U128 - value: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " const a: u128 = 0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a: u128 = 0;" - - 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: 31 - 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: - - 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: u128 = 0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u128 = 0;" - type_: - IntegerType: U128 - value: - Value: - Integer: - - U128 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " const a: u128 = 0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a: u128 = 0;" - - 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: 31 - 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" + initial_theorem: 2e69e9af36727a547e5494e3c77f80a55c18daf0d13398df6c2101a76264d695 + canonicalized_theorem: 2e69e9af36727a547e5494e3c77f80a55c18daf0d13398df6c2101a76264d695 + type_inferenced_theorem: 4586f887e2d6d10833c6f556c1e6a0a3c53d3da89f1e0659967e6da60692106f diff --git a/tests/expectations/compiler/compiler/integers/u128/mul.leo.out b/tests/expectations/compiler/compiler/integers/u128/mul.leo.out index 8523ea42f6..a0ed6056bd 100644 --- a/tests/expectations/compiler/compiler/integers/u128/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/mul.leo.out @@ -16,306 +16,6 @@ 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: Mul - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: Mul - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: Mul - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + initial_theorem: 21a49e719d3cf8ef9c34775b584b8ef46213f5c4df384f0780d8233eb9f8c09c + canonicalized_theorem: 21a49e719d3cf8ef9c34775b584b8ef46213f5c4df384f0780d8233eb9f8c09c + type_inferenced_theorem: af6b3537bf7508bd97b7049bb76df13456dac4d4bdb526cba43aba952f9da9ae diff --git a/tests/expectations/compiler/compiler/integers/u128/ne.leo.out b/tests/expectations/compiler/compiler/integers/u128/ne.leo.out index 24e0187bb6..82c2685a60 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ne.leo.out @@ -16,303 +16,6 @@ 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: 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: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: bool) -> bool {\n...\n}" + initial_theorem: 8165065b0ab14fa4f6e793d588fd02a535b58ee0a62732f1a9ac13b5fbf96cb6 + canonicalized_theorem: 8165065b0ab14fa4f6e793d588fd02a535b58ee0a62732f1a9ac13b5fbf96cb6 + type_inferenced_theorem: 54a6fe96befb6664f53f8024515e853f6b760ceaa3155782b33edc6c45f8ca89 diff --git a/tests/expectations/compiler/compiler/integers/u128/sub.leo.out b/tests/expectations/compiler/compiler/integers/u128/sub.leo.out index 4529bfd891..b240caf22f 100644 --- a/tests/expectations/compiler/compiler/integers/u128/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/sub.leo.out @@ -16,306 +16,6 @@ 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: Sub - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: Sub - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> 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: Sub - 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: Eq - 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: 50 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u128, b: u128, c: u128) -> bool {\n...\n}" + initial_theorem: ab2437dbf56e0d28c7b0d370e95fa38d326cdcff9f8cc1f016c8b5ad317d38ce + canonicalized_theorem: ab2437dbf56e0d28c7b0d370e95fa38d326cdcff9f8cc1f016c8b5ad317d38ce + type_inferenced_theorem: 46fab75c453ebe6ce6ba360a8b5d82e1d6d89799b4a280a27772d66a450bde9f diff --git a/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out index a5bcdc31e8..0d74c81713 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out @@ -22,412 +22,6 @@ 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(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> 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(s: bool, a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 42 - col_stop: 43 - path: compiler-test - content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 59 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u128, b: u128, c: u128) -> 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(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> 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(s: bool, a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 42 - col_stop: 43 - path: compiler-test - content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 59 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u128, b: u128, c: u128) -> 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(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> 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(s: bool, a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 33 - col_stop: 34 - path: compiler-test - content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":42,\\\"col_stop\\\":43,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u128, b: u128, c: u128) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U128 - span: - line_start: 3 - line_stop: 3 - col_start: 42 - col_stop: 43 - path: compiler-test - content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: - IntegerType: U128 - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 59 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u128, b: u128, c: u128) -> bool {\n...\n}\n\n" + initial_theorem: 35127d5f289d7f1dd3e1c79c919ceafaff778ea857b4035d6d90d0abc6804533 + canonicalized_theorem: 35127d5f289d7f1dd3e1c79c919ceafaff778ea857b4035d6d90d0abc6804533 + type_inferenced_theorem: 257c366629f72e71847216b24d14bb81d6125b75c7ade6b0335c82370c3e8550 diff --git a/tests/expectations/compiler/compiler/integers/u16/add.leo.out b/tests/expectations/compiler/compiler/integers/u16/add.leo.out index 33008990b0..9126e194a4 100644 --- a/tests/expectations/compiler/compiler/integers/u16/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/add.leo.out @@ -16,306 +16,6 @@ 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + initial_theorem: 41be1c43cd89daed5f9d28b5a5a9788989f2618cb157259329be41ae06b89e7c + canonicalized_theorem: 41be1c43cd89daed5f9d28b5a5a9788989f2618cb157259329be41ae06b89e7c + type_inferenced_theorem: 9a775f976c931eca2318f74c0dde3e4b207d10ed1e8398e64533b7870d73e98a diff --git a/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out index bfd4677ed7..ad18a3b6ba 100644 --- a/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out @@ -16,300 +16,6 @@ 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: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16) -> 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - - 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 == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 3 - line_stop: 6 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16) -> 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - - 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 == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 3 - line_stop: 6 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16) -> 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - - 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 == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 3 - line_stop: 6 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16) -> bool {\n...\n}\n" + initial_theorem: c19ce080448a618611bb810bc73339a31e6f4be3afd3ed782ef848d448105ff4 + canonicalized_theorem: c19ce080448a618611bb810bc73339a31e6f4be3afd3ed782ef848d448105ff4 + type_inferenced_theorem: 5cedb974c91a3131d6c74d6ad59df8c02c365a0f3bc2717f19020125507354ea diff --git a/tests/expectations/compiler/compiler/integers/u16/div.leo.out b/tests/expectations/compiler/compiler/integers/u16/div.leo.out index 585552f306..b71a1d73f8 100644 --- a/tests/expectations/compiler/compiler/integers/u16/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/div.leo.out @@ -16,306 +16,6 @@ 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + initial_theorem: 9951c318a725992029658c3a45ba687e51b9025bd7e209471e1dac83fda7ae00 + canonicalized_theorem: 9951c318a725992029658c3a45ba687e51b9025bd7e209471e1dac83fda7ae00 + type_inferenced_theorem: e85bde99e42c696418bb61214dfdc22d0481f413e81ac5890ef63bf4c29a3f6e diff --git a/tests/expectations/compiler/compiler/integers/u16/eq.leo.out b/tests/expectations/compiler/compiler/integers/u16/eq.leo.out index 1e33a7822b..9df7ae37a6 100644 --- a/tests/expectations/compiler/compiler/integers/u16/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/eq.leo.out @@ -22,303 +22,6 @@ 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + initial_theorem: 8e267a226869f49793d77d6b5038ec61ad7c00df58fe761880633e276733d9b8 + canonicalized_theorem: 8e267a226869f49793d77d6b5038ec61ad7c00df58fe761880633e276733d9b8 + type_inferenced_theorem: 502ee92ed049003c911de3290cd7dbfaff3d15e86cb8f8b9eb3fcdbba7829023 diff --git a/tests/expectations/compiler/compiler/integers/u16/ge.leo.out b/tests/expectations/compiler/compiler/integers/u16/ge.leo.out index 481b166c98..5f7e8a0d8f 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ge.leo.out @@ -28,303 +28,6 @@ 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + initial_theorem: 55b790c06884aa8e3b3c90d14020080ef8f80e87ecb56bc0b3cf98d522906e91 + canonicalized_theorem: 55b790c06884aa8e3b3c90d14020080ef8f80e87ecb56bc0b3cf98d522906e91 + type_inferenced_theorem: fcfdcd073d22c15e7018e171c82efc6dc8aa2a77df8557f51991b2265ec39fea diff --git a/tests/expectations/compiler/compiler/integers/u16/gt.leo.out b/tests/expectations/compiler/compiler/integers/u16/gt.leo.out index 2de9ad54dd..bd2e86a62e 100644 --- a/tests/expectations/compiler/compiler/integers/u16/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/gt.leo.out @@ -16,308 +16,6 @@ outputs: - input_file: u16_f.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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) {" - output: ~ - block: - statements: - - Console: - function: - Assert: - Binary: - left: - 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 > b == c);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Gt - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " console.assert(a > b == c);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 3 - line_stop: 5 - col_start: 40 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) {" - output: - Tuple: [] - block: - statements: - - Console: - function: - Assert: - Binary: - left: - 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 > b == c);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Gt - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " console.assert(a > b == c);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 3 - line_stop: 5 - col_start: 40 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) {" - output: - Tuple: [] - block: - statements: - - Console: - function: - Assert: - Binary: - left: - 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 > b == c);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Gt - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " console.assert(a > b == c);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 3 - line_stop: 5 - col_start: 40 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) {\n...\n}" + initial_theorem: 475f4077b47b7cb63c07bab29c7acc6781e7c5693484c36c982951c0e1850ac7 + canonicalized_theorem: 0808701df629a9df6b534097d0e87536c93c8ccd693747085d1f5254214212a4 + type_inferenced_theorem: 810d18f1fdbd7769db52937df22f1f27ea1be7923e74fbe2cd2a645cb4d27f1e diff --git a/tests/expectations/compiler/compiler/integers/u16/input.leo.out b/tests/expectations/compiler/compiler/integers/u16/input.leo.out index 7cdddba4ba..b628e79609 100644 --- a/tests/expectations/compiler/compiler/integers/u16/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/input.leo.out @@ -16,231 +16,6 @@ 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: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16) -> 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: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16) -> 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: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> 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: u16, b: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16) -> 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: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16) -> bool {\n...\n}" + initial_theorem: d3aaf23c5b1383351acd6c0696e70e14c84e9cae56019730a35818fd142b9204 + canonicalized_theorem: d3aaf23c5b1383351acd6c0696e70e14c84e9cae56019730a35818fd142b9204 + type_inferenced_theorem: 62f1318f2117ce10ca73d902572e8af6d3f97d37fce108403877f50f277e9963 diff --git a/tests/expectations/compiler/compiler/integers/u16/le.leo.out b/tests/expectations/compiler/compiler/integers/u16/le.leo.out index be8acd1616..da1a3db76b 100644 --- a/tests/expectations/compiler/compiler/integers/u16/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/le.leo.out @@ -28,303 +28,6 @@ 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + initial_theorem: 34fc9cb86dd1d3ace79e57d9ba989cc2f995d3b61c18f55c2aae502b0fb51ea4 + canonicalized_theorem: 34fc9cb86dd1d3ace79e57d9ba989cc2f995d3b61c18f55c2aae502b0fb51ea4 + type_inferenced_theorem: 089d93f92c53431f63aabc1d113c1f6dcd6562228d1c2dd3761c937aa91d88ee diff --git a/tests/expectations/compiler/compiler/integers/u16/lt.leo.out b/tests/expectations/compiler/compiler/integers/u16/lt.leo.out index cdb34166d3..43461e0fcb 100644 --- a/tests/expectations/compiler/compiler/integers/u16/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/lt.leo.out @@ -22,303 +22,6 @@ 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> 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: Lt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> 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: Lt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> 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: Lt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + initial_theorem: dccf5d8cd58b2dbf1680f04107dfe9ab1644ecced22a6256f0d6f1d5ff2d2270 + canonicalized_theorem: dccf5d8cd58b2dbf1680f04107dfe9ab1644ecced22a6256f0d6f1d5ff2d2270 + type_inferenced_theorem: 66b374f00e25551d6b8f613c65c3cdfca98819252c7b76677837cadb0159eda0 diff --git a/tests/expectations/compiler/compiler/integers/u16/max.leo.out b/tests/expectations/compiler/compiler/integers/u16/max.leo.out index da159b0768..54ee635afc 100644 --- a/tests/expectations/compiler/compiler/integers/u16/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/max.leo.out @@ -16,307 +16,6 @@ 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: u16 = 65535;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u16 = 65535;" - type_: - IntegerType: U16 - value: - Value: - Implicit: - - "65535" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " const a: u16 = 65535;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " const a: u16 = 65535;" - - 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: - - 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: u16 = 65535;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u16 = 65535;" - type_: - IntegerType: U16 - value: - Value: - Implicit: - - "65535" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " const a: u16 = 65535;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " const a: u16 = 65535;" - - 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: - - 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: u16 = 65535;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u16 = 65535;" - type_: - IntegerType: U16 - value: - Value: - Integer: - - U16 - - "65535" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " const a: u16 = 65535;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " const a: u16 = 65535;" - - 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" + initial_theorem: baa6d3c3d700d25eba38c74347a712dc94d47fd44283437649601e60173c0d74 + canonicalized_theorem: baa6d3c3d700d25eba38c74347a712dc94d47fd44283437649601e60173c0d74 + type_inferenced_theorem: ae44c093359df948b236fd0db5bbfb38c8a793af7bb4ad0491d9ed71f9cd5f5b diff --git a/tests/expectations/compiler/compiler/integers/u16/min.leo.out b/tests/expectations/compiler/compiler/integers/u16/min.leo.out index 079866ab0d..c835a52158 100644 --- a/tests/expectations/compiler/compiler/integers/u16/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/min.leo.out @@ -16,307 +16,6 @@ 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: u16 = 0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u16 = 0;" - type_: - IntegerType: U16 - value: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " const a: u16 = 0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " const a: u16 = 0;" - - 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: - - 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: u16 = 0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u16 = 0;" - type_: - IntegerType: U16 - value: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " const a: u16 = 0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " const a: u16 = 0;" - - 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: - - 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: u16 = 0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u16 = 0;" - type_: - IntegerType: U16 - value: - Value: - Integer: - - U16 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " const a: u16 = 0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " const a: u16 = 0;" - - 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" + initial_theorem: cde26bef80f68049390ccde167fa99e92595c4f28049540922710fcd5c848c03 + canonicalized_theorem: cde26bef80f68049390ccde167fa99e92595c4f28049540922710fcd5c848c03 + type_inferenced_theorem: 22350cdbf4a782784b7d68022fda1db95e089d3f548517a34fbce0beb7189682 diff --git a/tests/expectations/compiler/compiler/integers/u16/mul.leo.out b/tests/expectations/compiler/compiler/integers/u16/mul.leo.out index b9c925f233..5871c208ee 100644 --- a/tests/expectations/compiler/compiler/integers/u16/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/mul.leo.out @@ -16,306 +16,6 @@ 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + initial_theorem: 2eefc41f982ec20bc145b7a5dd34d87aad66e0852abf44a9415ee4e0401aca04 + canonicalized_theorem: 2eefc41f982ec20bc145b7a5dd34d87aad66e0852abf44a9415ee4e0401aca04 + type_inferenced_theorem: e8898c8abc5eea0b22fc9f8eb61b6b37f79351f1fed4c490a83256da66a84b58 diff --git a/tests/expectations/compiler/compiler/integers/u16/ne.leo.out b/tests/expectations/compiler/compiler/integers/u16/ne.leo.out index b96579f50c..6becc419a3 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ne.leo.out @@ -16,303 +16,6 @@ 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: 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: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: bool) -> bool {\n...\n}" + initial_theorem: 299e893c8e424583eb27648b0d2aae54c922da31a7e46e5891c57fce3dff0424 + canonicalized_theorem: 299e893c8e424583eb27648b0d2aae54c922da31a7e46e5891c57fce3dff0424 + type_inferenced_theorem: 6e80b43bd2e4d8e8be23b159eca4f6212aa9aa32b49fb04c99d8d8754702561d diff --git a/tests/expectations/compiler/compiler/integers/u16/sub.leo.out b/tests/expectations/compiler/compiler/integers/u16/sub.leo.out index 083f61c3f7..7a61b89619 100644 --- a/tests/expectations/compiler/compiler/integers/u16/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/sub.leo.out @@ -16,306 +16,6 @@ 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> 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: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u16, b: u16, c: u16) -> bool {\n...\n}" + initial_theorem: 7f4ed5b88303c057d83ac580c857cca2fa3a38ab7e8d381bc0efc1fb280edc85 + canonicalized_theorem: 7f4ed5b88303c057d83ac580c857cca2fa3a38ab7e8d381bc0efc1fb280edc85 + type_inferenced_theorem: 8afc96f5b6a18bb7677735c62e478e49cf801ca9832311ebe95c89f6df422f88 diff --git a/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out index 361cf8917b..82a427d2ab 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out @@ -22,412 +22,6 @@ 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(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> 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(s: bool, a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u16, b: u16, c: u16) -> 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(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> 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(s: bool, a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u16, b: u16, c: u16) -> 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(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> 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(s: bool, a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u16, b: u16, c: u16) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U16 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: - IntegerType: U16 - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u16, b: u16, c: u16) -> bool {\n...\n}\n\n" + initial_theorem: f927dbe131a6f1be4cfc941aebdd4670591edd75215d54e2dc98a86f8dcfc3de + canonicalized_theorem: f927dbe131a6f1be4cfc941aebdd4670591edd75215d54e2dc98a86f8dcfc3de + type_inferenced_theorem: e4ca23e9cbea206e5c32d057ec7a93f5ef36d5745314f44f9467fa173fb7bf6f diff --git a/tests/expectations/compiler/compiler/integers/u32/add.leo.out b/tests/expectations/compiler/compiler/integers/u32/add.leo.out index 39071558d2..4866fdde7a 100644 --- a/tests/expectations/compiler/compiler/integers/u32/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/add.leo.out @@ -16,306 +16,6 @@ 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" - 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, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" - 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, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" - 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, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + initial_theorem: 3cdca25e10098f45cf439da379aed56b4fe78e35632cb1bac655c8478f51d9cd + canonicalized_theorem: 3cdca25e10098f45cf439da379aed56b4fe78e35632cb1bac655c8478f51d9cd + type_inferenced_theorem: 84e885f56b08587f875e94a570bf977844b511fb85f7689df660e6ce69b2706e diff --git a/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out index 3b2ff63fab..c63b14e286 100644 --- a/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out @@ -16,300 +16,6 @@ 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: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> bool {\\\"}\"}" - 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, b: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"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: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32) -> 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - - 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 == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 3 - line_stop: 6 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> bool {\\\"}\"}" - 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, b: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"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: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32) -> 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - - 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 == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 3 - line_stop: 6 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> bool {\\\"}\"}" - 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, b: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"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: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32) -> 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - - 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 == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 3 - line_stop: 6 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32) -> bool {\n...\n}\n" + initial_theorem: 76b7c73c53d4e59406ba165352d155bf05d5c3615c89ef53ddc2b8ae931bfb85 + canonicalized_theorem: 76b7c73c53d4e59406ba165352d155bf05d5c3615c89ef53ddc2b8ae931bfb85 + type_inferenced_theorem: ea4d79e6a2877efdc838d54fb7112dfef314b8e82369e91ebf102db9b393ab76 diff --git a/tests/expectations/compiler/compiler/integers/u32/div.leo.out b/tests/expectations/compiler/compiler/integers/u32/div.leo.out index c1bbf6cc1d..3a37d110a0 100644 --- a/tests/expectations/compiler/compiler/integers/u32/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/div.leo.out @@ -16,306 +16,6 @@ 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" - 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, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" - 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, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" - 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, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + initial_theorem: 0023392b04189309efb4fc89df4887595d3824e51cb2bf33c3159a88bcd3f7b5 + canonicalized_theorem: 0023392b04189309efb4fc89df4887595d3824e51cb2bf33c3159a88bcd3f7b5 + type_inferenced_theorem: 50641a3a2bd7b33c4ff6698b185066cd3ecfcf52497ea39151c3d7d34ce12510 diff --git a/tests/expectations/compiler/compiler/integers/u32/eq.leo.out b/tests/expectations/compiler/compiler/integers/u32/eq.leo.out index 850c9555a3..50859d1945 100644 --- a/tests/expectations/compiler/compiler/integers/u32/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/eq.leo.out @@ -22,303 +22,6 @@ 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" - 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, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" - 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, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" - 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, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + initial_theorem: bb0bb3d8085da2fbffe1982b31452a8d8f5c442fc80313e4123eb9bcfd9280c7 + canonicalized_theorem: bb0bb3d8085da2fbffe1982b31452a8d8f5c442fc80313e4123eb9bcfd9280c7 + type_inferenced_theorem: 36c871ce90092fa7123b5eefd31232386955559f421cc5f21250ce89988e5463 diff --git a/tests/expectations/compiler/compiler/integers/u32/ge.leo.out b/tests/expectations/compiler/compiler/integers/u32/ge.leo.out index d1dbabc5fc..b2b8b5d01c 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ge.leo.out @@ -28,303 +28,6 @@ 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" - 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, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" - 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, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" - 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, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + initial_theorem: d53d5822cea427e9892561559b8a7fe3a3a4ee92f5dfc07e52dd554bec2e0812 + canonicalized_theorem: d53d5822cea427e9892561559b8a7fe3a3a4ee92f5dfc07e52dd554bec2e0812 + type_inferenced_theorem: 89b7a155fdf0333d66156431437983de4d818b754a18ed00693697e7dc71277a diff --git a/tests/expectations/compiler/compiler/integers/u32/gt.leo.out b/tests/expectations/compiler/compiler/integers/u32/gt.leo.out index 9d941f1982..210e340dae 100644 --- a/tests/expectations/compiler/compiler/integers/u32/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/gt.leo.out @@ -16,308 +16,6 @@ outputs: - input_file: u32_f.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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) {\\\"}\"}" - 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, b: u32, c: bool) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) {" - output: ~ - block: - statements: - - Console: - function: - Assert: - Binary: - left: - 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 > b == c);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Gt - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " console.assert(a > b == c);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 3 - line_stop: 5 - col_start: 40 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) {\\\"}\"}" - 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, b: u32, c: bool) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) {" - output: - Tuple: [] - block: - statements: - - Console: - function: - Assert: - Binary: - left: - 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 > b == c);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Gt - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " console.assert(a > b == c);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 3 - line_stop: 5 - col_start: 40 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) {\\\"}\"}" - 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, b: u32, c: bool) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) {" - output: - Tuple: [] - block: - statements: - - Console: - function: - Assert: - Binary: - left: - 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 > b == c);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Gt - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " console.assert(a > b == c);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 3 - line_stop: 5 - col_start: 40 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) {\n...\n}" + initial_theorem: f6b0f84faf3d622d320ea867bf9bd76485633dfae6a41158e0e265880b5fb750 + canonicalized_theorem: 5e63641393a51590ce9940712bd01ddb445cf3af3b5c5ffa02d9ca1dddccf03e + type_inferenced_theorem: 79dc9917db6925b4d5a1f5aaa15362b55172133be5d088eb73cd7e8029ff710c diff --git a/tests/expectations/compiler/compiler/integers/u32/input.leo.out b/tests/expectations/compiler/compiler/integers/u32/input.leo.out index ef7c7c6221..5813d8dd3c 100644 --- a/tests/expectations/compiler/compiler/integers/u32/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/input.leo.out @@ -16,231 +16,6 @@ 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: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> bool {\\\"}\"}" - 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, b: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"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: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32) -> 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: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> bool {\\\"}\"}" - 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, b: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"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: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32) -> 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: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> 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: u32, b: u32) -> bool {\\\"}\"}" - 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, b: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"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: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32) -> 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: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32) -> bool {\n...\n}" + initial_theorem: 7f3c18f7e6aa4bf261d1778234a885ff1da3627e74e45498f059c4e616847f5b + canonicalized_theorem: 7f3c18f7e6aa4bf261d1778234a885ff1da3627e74e45498f059c4e616847f5b + type_inferenced_theorem: 8db8e90395fff2d51dbe280f9aa1825129eeaa45bd84d228017927d2f6bea467 diff --git a/tests/expectations/compiler/compiler/integers/u32/le.leo.out b/tests/expectations/compiler/compiler/integers/u32/le.leo.out index 86796171c1..e3bf63adc4 100644 --- a/tests/expectations/compiler/compiler/integers/u32/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/le.leo.out @@ -28,303 +28,6 @@ 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" - 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, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" - 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, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" - 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, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + initial_theorem: 18af75f75099b7ed0d8337cbc39602d0276d9be538b27f07931e3310e6b674a0 + canonicalized_theorem: 18af75f75099b7ed0d8337cbc39602d0276d9be538b27f07931e3310e6b674a0 + type_inferenced_theorem: 9da02a49544ec4496d6189199c628b313d4b3d2b792627a71bf11015380cae38 diff --git a/tests/expectations/compiler/compiler/integers/u32/lt.leo.out b/tests/expectations/compiler/compiler/integers/u32/lt.leo.out index 92796478c6..a4bff6b705 100644 --- a/tests/expectations/compiler/compiler/integers/u32/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/lt.leo.out @@ -22,303 +22,6 @@ 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" - 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, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> 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: Lt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" - 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, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> 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: Lt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" - 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, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> 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: Lt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + initial_theorem: 75eaf809a1c09171ebc028382936ee07c942774f2b20c143590049afe7474c4f + canonicalized_theorem: 75eaf809a1c09171ebc028382936ee07c942774f2b20c143590049afe7474c4f + type_inferenced_theorem: ac0f96eae8db0d2820c9fa737a9a5571fda10507f3f5f7a50cf989c797d181c3 diff --git a/tests/expectations/compiler/compiler/integers/u32/max.leo.out b/tests/expectations/compiler/compiler/integers/u32/max.leo.out index 5ac693012d..ce19241ecf 100644 --- a/tests/expectations/compiler/compiler/integers/u32/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/max.leo.out @@ -16,307 +16,6 @@ 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: u32 = 4294967295;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u32 = 4294967295;" - type_: - IntegerType: U32 - value: - Value: - Implicit: - - "4294967295" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " const a: u32 = 4294967295;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " const a: u32 = 4294967295;" - - 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: - - 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: u32 = 4294967295;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u32 = 4294967295;" - type_: - IntegerType: U32 - value: - Value: - Implicit: - - "4294967295" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " const a: u32 = 4294967295;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " const a: u32 = 4294967295;" - - 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: - - 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: u32 = 4294967295;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u32 = 4294967295;" - type_: - IntegerType: U32 - value: - Value: - Integer: - - U32 - - "4294967295" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " const a: u32 = 4294967295;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " const a: u32 = 4294967295;" - - 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" + initial_theorem: 86fb7cf305725e7fe097d418ce22135a3e5385bfc6b8d31701aef7d5dad25282 + canonicalized_theorem: 86fb7cf305725e7fe097d418ce22135a3e5385bfc6b8d31701aef7d5dad25282 + type_inferenced_theorem: b369199bcd968cc175d6f634bc2de4cb8c73b0addc64ac7b457216bfc955e8fa diff --git a/tests/expectations/compiler/compiler/integers/u32/min.leo.out b/tests/expectations/compiler/compiler/integers/u32/min.leo.out index 904e4e5f98..797eec3523 100644 --- a/tests/expectations/compiler/compiler/integers/u32/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/min.leo.out @@ -16,307 +16,6 @@ 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: u32 = 0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u32 = 0;" - type_: - IntegerType: U32 - value: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " const a: u32 = 0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " const a: u32 = 0;" - - 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: - - 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: u32 = 0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u32 = 0;" - type_: - IntegerType: U32 - value: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " const a: u32 = 0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " const a: u32 = 0;" - - 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: - - 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: u32 = 0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u32 = 0;" - type_: - IntegerType: U32 - value: - Value: - Integer: - - U32 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " const a: u32 = 0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " const a: u32 = 0;" - - 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" + initial_theorem: 0f47e2dde68637ea7d0c54a8fcbd2b0cd767e4c35c646154e5519287d3f015ef + canonicalized_theorem: 0f47e2dde68637ea7d0c54a8fcbd2b0cd767e4c35c646154e5519287d3f015ef + type_inferenced_theorem: a94c8bd9f0535c2c705cb6124179a9106c9e75d2a29ef5b704096e37e58b0878 diff --git a/tests/expectations/compiler/compiler/integers/u32/mul.leo.out b/tests/expectations/compiler/compiler/integers/u32/mul.leo.out index 4710034e1d..6213226fed 100644 --- a/tests/expectations/compiler/compiler/integers/u32/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/mul.leo.out @@ -16,306 +16,6 @@ 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" - 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, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" - 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, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" - 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, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + initial_theorem: ac19676e4ebd9d5aefb5d5baa0fa477a6b4783efc6b1a599c8128259fa7aa55f + canonicalized_theorem: ac19676e4ebd9d5aefb5d5baa0fa477a6b4783efc6b1a599c8128259fa7aa55f + type_inferenced_theorem: 34d947a7132f4fd5693babadabb9c05cab523a6d2bce9dbd7da41ad435ac9702 diff --git a/tests/expectations/compiler/compiler/integers/u32/ne.leo.out b/tests/expectations/compiler/compiler/integers/u32/ne.leo.out index accd226aa3..f427ff1115 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ne.leo.out @@ -16,303 +16,6 @@ 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" - 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, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" - 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, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: 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: u32, b: u32, c: bool) -> bool {\\\"}\"}" - 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, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: bool) -> bool {\n...\n}" + initial_theorem: fb7abac0ceaebcc4f63ab26965fc3a13516faade4b1e0310d69cd8b4deec71a0 + canonicalized_theorem: fb7abac0ceaebcc4f63ab26965fc3a13516faade4b1e0310d69cd8b4deec71a0 + type_inferenced_theorem: 1032259782493fc5d09794722283c912b7c3e7ed2bcf660830e2d5de9f227979 diff --git a/tests/expectations/compiler/compiler/integers/u32/sub.leo.out b/tests/expectations/compiler/compiler/integers/u32/sub.leo.out index d07e7cc98b..a066f655b7 100644 --- a/tests/expectations/compiler/compiler/integers/u32/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/sub.leo.out @@ -16,306 +16,6 @@ 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" - 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, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" - 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, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> 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: u32, b: u32, c: u32) -> bool {\\\"}\"}" - 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, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u32, b: u32, c: u32) -> bool {\n...\n}" + initial_theorem: f55fe0801c2e593e2599fffd34a89073ff85f9aa462cbfbcd20c0e38e42eaa4d + canonicalized_theorem: f55fe0801c2e593e2599fffd34a89073ff85f9aa462cbfbcd20c0e38e42eaa4d + type_inferenced_theorem: 8640b596fc3d7e4b3999808a51eff9a72422fc02f2ea3b690b62a6ec56e215c0 diff --git a/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out index 990e98153f..d621b38051 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out @@ -22,412 +22,6 @@ 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(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> 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(s: bool, a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u32, b: u32, c: u32) -> 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(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> 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(s: bool, a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u32, b: u32, c: u32) -> 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(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> 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(s: bool, a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u32, b: u32, c: u32) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: - IntegerType: U32 - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u32, b: u32, c: u32) -> bool {\n...\n}\n\n" + initial_theorem: 348ad049a3930eb4f477d98447b8172cca5d163e320e9774111d739d95017c83 + canonicalized_theorem: 348ad049a3930eb4f477d98447b8172cca5d163e320e9774111d739d95017c83 + type_inferenced_theorem: 7daa91267c1c26560e7e557d7f14d473283c40bf86ffcbff6944d251fb0e1fc5 diff --git a/tests/expectations/compiler/compiler/integers/u64/add.leo.out b/tests/expectations/compiler/compiler/integers/u64/add.leo.out index 9895fac112..82d9498853 100644 --- a/tests/expectations/compiler/compiler/integers/u64/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/add.leo.out @@ -16,306 +16,6 @@ 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: Add - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + initial_theorem: d95c70849974223610dd12a4f9f19e2bb8f5c4e1420cae873a6c49043b7cc9ae + canonicalized_theorem: d95c70849974223610dd12a4f9f19e2bb8f5c4e1420cae873a6c49043b7cc9ae + type_inferenced_theorem: e8eaafd43cafab1cb14addae2196b1d21fc66ce46bedd84580f4654d646bd5de diff --git a/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out index c05d98c094..0d6d530fe0 100644 --- a/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out @@ -16,300 +16,6 @@ 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: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64) -> 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - - 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 == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 3 - line_stop: 6 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64) -> 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - - 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 == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 3 - line_stop: 6 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64) -> 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - - 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 == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 3 - line_stop: 6 - col_start: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64) -> bool {\n...\n}\n" + initial_theorem: 1253b2000d11aaa4395514ee30cefe4027f5cda72bf58cc45a4f873ef4832ea3 + canonicalized_theorem: 1253b2000d11aaa4395514ee30cefe4027f5cda72bf58cc45a4f873ef4832ea3 + type_inferenced_theorem: 778f30fa8a0cf65b670c1365a71090c4360bad18d4d7f4e65d60d014c9bf6f44 diff --git a/tests/expectations/compiler/compiler/integers/u64/div.leo.out b/tests/expectations/compiler/compiler/integers/u64/div.leo.out index c47efdde38..7091715331 100644 --- a/tests/expectations/compiler/compiler/integers/u64/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/div.leo.out @@ -16,306 +16,6 @@ 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + initial_theorem: e303c8ef226f3d7681188a7b97762123b0a4e6bb420a6b26cd4edba8ba068538 + canonicalized_theorem: e303c8ef226f3d7681188a7b97762123b0a4e6bb420a6b26cd4edba8ba068538 + type_inferenced_theorem: 5f16462ba03f7c86f94bc47e8b0f6996cd72e22a538ac2adc5db52f68162aa40 diff --git a/tests/expectations/compiler/compiler/integers/u64/eq.leo.out b/tests/expectations/compiler/compiler/integers/u64/eq.leo.out index 3cfeab198b..6446910fea 100644 --- a/tests/expectations/compiler/compiler/integers/u64/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/eq.leo.out @@ -22,303 +22,6 @@ 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + initial_theorem: af0deffc16ff4e1b3d07d3e1160e48788ecb1b80563fc43a28d9c89fd85f40b9 + canonicalized_theorem: af0deffc16ff4e1b3d07d3e1160e48788ecb1b80563fc43a28d9c89fd85f40b9 + type_inferenced_theorem: a8fe2f4d446fb7eff91d9f77b638806be0454ae732d6608276f3151a8d4e4921 diff --git a/tests/expectations/compiler/compiler/integers/u64/ge.leo.out b/tests/expectations/compiler/compiler/integers/u64/ge.leo.out index ea06d2f9ca..0d10014816 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ge.leo.out @@ -28,303 +28,6 @@ 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + initial_theorem: c6293b8d2605a06f84a32975756d8a7ae7ad6537fc6ed0dedf01c9046f159331 + canonicalized_theorem: c6293b8d2605a06f84a32975756d8a7ae7ad6537fc6ed0dedf01c9046f159331 + type_inferenced_theorem: b594f5f48db0a85abdf9fd0b0f76ca69b5405558e1382dfdaa24fce91513c744 diff --git a/tests/expectations/compiler/compiler/integers/u64/gt.leo.out b/tests/expectations/compiler/compiler/integers/u64/gt.leo.out index a1e1b1eeec..4ee35f41bc 100644 --- a/tests/expectations/compiler/compiler/integers/u64/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/gt.leo.out @@ -16,308 +16,6 @@ outputs: - input_file: u64_f.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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) {" - output: ~ - block: - statements: - - Console: - function: - Assert: - Binary: - left: - 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 > b == c);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Gt - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " console.assert(a > b == c);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 3 - line_stop: 5 - col_start: 40 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) {" - output: - Tuple: [] - block: - statements: - - Console: - function: - Assert: - Binary: - left: - 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 > b == c);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Gt - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " console.assert(a > b == c);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 3 - line_stop: 5 - col_start: 40 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) {" - output: - Tuple: [] - block: - statements: - - Console: - function: - Assert: - Binary: - left: - 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 > b == c);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Gt - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " console.assert(a > b == c);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 3 - line_stop: 5 - col_start: 40 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) {\n...\n}" + initial_theorem: 524f0311db9ed25bfbd275b2b8432619759d34e1e7d3fcdee179fbb6748a03e1 + canonicalized_theorem: cd942d4aa34b649b89e03c308dc28d17e6fbae052382b6e50989b4c6ce600c96 + type_inferenced_theorem: f61e2cdef40c057d782467f2b9ad84e7b2163de25af72c6ed2498e5d4b9517cd diff --git a/tests/expectations/compiler/compiler/integers/u64/input.leo.out b/tests/expectations/compiler/compiler/integers/u64/input.leo.out index 22e44458d9..a9f278da01 100644 --- a/tests/expectations/compiler/compiler/integers/u64/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/input.leo.out @@ -16,231 +16,6 @@ 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: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64) -> 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: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64) -> 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: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> 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: u64, b: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64) -> 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: 39 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64) -> bool {\n...\n}" + initial_theorem: f2efb64bbf451e4e1c7c1e9b24ceb40894b72f1769604c62314b729a9fc75a6e + canonicalized_theorem: f2efb64bbf451e4e1c7c1e9b24ceb40894b72f1769604c62314b729a9fc75a6e + type_inferenced_theorem: bf576998fff80ab652bbcc2aaba9f374650d94c9327d19bc436957360505024b diff --git a/tests/expectations/compiler/compiler/integers/u64/le.leo.out b/tests/expectations/compiler/compiler/integers/u64/le.leo.out index 6ebcc79e1e..1349cf3349 100644 --- a/tests/expectations/compiler/compiler/integers/u64/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/le.leo.out @@ -28,303 +28,6 @@ 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + initial_theorem: 3b6aa21f4293ef2b0557303f8ba98a62a72afda56be36f9feff58ede48c87aae + canonicalized_theorem: 3b6aa21f4293ef2b0557303f8ba98a62a72afda56be36f9feff58ede48c87aae + type_inferenced_theorem: 854beacb056af4a0e44c2f824467105a8ac4334efd0d2b51e7e09b44ff300d79 diff --git a/tests/expectations/compiler/compiler/integers/u64/lt.leo.out b/tests/expectations/compiler/compiler/integers/u64/lt.leo.out index 04b8744bc5..cbe9599c32 100644 --- a/tests/expectations/compiler/compiler/integers/u64/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/lt.leo.out @@ -22,303 +22,6 @@ 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> 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: Lt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> 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: Lt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> 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: Lt - 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: Eq - 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: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + initial_theorem: 1ed483794437131fc09605e7032fecb72d3e3f9534ff26cd4e5b8ac3017609fe + canonicalized_theorem: 1ed483794437131fc09605e7032fecb72d3e3f9534ff26cd4e5b8ac3017609fe + type_inferenced_theorem: eb1c5645868ccde01d29ac0c07986cbb95e021879228d8e14330851de369090c diff --git a/tests/expectations/compiler/compiler/integers/u64/max.leo.out b/tests/expectations/compiler/compiler/integers/u64/max.leo.out index 1bf1ccf8b6..31b06230a3 100644 --- a/tests/expectations/compiler/compiler/integers/u64/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/max.leo.out @@ -16,307 +16,6 @@ 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: u64 = 18446744073709551615;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u64 = 18446744073709551615;" - type_: - IntegerType: U64 - value: - Value: - Implicit: - - "18446744073709551615" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 40 - path: compiler-test - content: " const a: u64 = 18446744073709551615;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 40 - path: compiler-test - content: " const a: u64 = 18446744073709551615;" - - 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: - - 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: u64 = 18446744073709551615;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u64 = 18446744073709551615;" - type_: - IntegerType: U64 - value: - Value: - Implicit: - - "18446744073709551615" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 40 - path: compiler-test - content: " const a: u64 = 18446744073709551615;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 40 - path: compiler-test - content: " const a: u64 = 18446744073709551615;" - - 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: - - 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: u64 = 18446744073709551615;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u64 = 18446744073709551615;" - type_: - IntegerType: U64 - value: - Value: - Integer: - - U64 - - "18446744073709551615" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 40 - path: compiler-test - content: " const a: u64 = 18446744073709551615;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 40 - path: compiler-test - content: " const a: u64 = 18446744073709551615;" - - 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" + initial_theorem: b49c4593620c14da622903ba513c21a1d6111c001fb424b7d96be11b354917eb + canonicalized_theorem: b49c4593620c14da622903ba513c21a1d6111c001fb424b7d96be11b354917eb + type_inferenced_theorem: 8b3f84f71975ef760fe9d6eeff136fd8512472ad3abc996adf690d3878b74648 diff --git a/tests/expectations/compiler/compiler/integers/u64/min.leo.out b/tests/expectations/compiler/compiler/integers/u64/min.leo.out index a05f62e186..f206485879 100644 --- a/tests/expectations/compiler/compiler/integers/u64/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/min.leo.out @@ -16,307 +16,6 @@ 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: u64 = 0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u64 = 0;" - type_: - IntegerType: U64 - value: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " const a: u64 = 0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " const a: u64 = 0;" - - 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: - - 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: u64 = 0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u64 = 0;" - type_: - IntegerType: U64 - value: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " const a: u64 = 0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " const a: u64 = 0;" - - 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: - - 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: u64 = 0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u64 = 0;" - type_: - IntegerType: U64 - value: - Value: - Integer: - - U64 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " const a: u64 = 0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " const a: u64 = 0;" - - 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" + initial_theorem: e47e8d39fbf56125e94cd55a805a9bbe8c9fbc5098703f4996cd98e693fccd1e + canonicalized_theorem: e47e8d39fbf56125e94cd55a805a9bbe8c9fbc5098703f4996cd98e693fccd1e + type_inferenced_theorem: 6231c1ee6ec45f84e45f21b304beadc0cff11ef5865609e0d495cc6f4bf674df diff --git a/tests/expectations/compiler/compiler/integers/u64/mul.leo.out b/tests/expectations/compiler/compiler/integers/u64/mul.leo.out index 4411b65023..f57946f4e9 100644 --- a/tests/expectations/compiler/compiler/integers/u64/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/mul.leo.out @@ -16,306 +16,6 @@ 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: Mul - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + initial_theorem: 065d2d9b6131ac01f764c77939c52ee25cd43f3d770d99662bb02c534ecb4bab + canonicalized_theorem: 065d2d9b6131ac01f764c77939c52ee25cd43f3d770d99662bb02c534ecb4bab + type_inferenced_theorem: aad04434079abde88be6fa0e2cd2426a66f75c2f3c25d6805bb229ab9f94319e diff --git a/tests/expectations/compiler/compiler/integers/u64/ne.leo.out b/tests/expectations/compiler/compiler/integers/u64/ne.leo.out index 3d1d897952..52df4b58f4 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ne.leo.out @@ -16,303 +16,6 @@ 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: 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: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: bool) -> bool {\n...\n}" + initial_theorem: 61c78cb5e1dca4b8136778b1d937e6468ebbd8e99714c94243640b20053a48f2 + canonicalized_theorem: 61c78cb5e1dca4b8136778b1d937e6468ebbd8e99714c94243640b20053a48f2 + type_inferenced_theorem: bdde4f012730d3fa17cb1708ae04ac483ea8d3b8ecb4b4cef04081bb4a36e277 diff --git a/tests/expectations/compiler/compiler/integers/u64/sub.leo.out b/tests/expectations/compiler/compiler/integers/u64/sub.leo.out index a95299a078..4b051b27f7 100644 --- a/tests/expectations/compiler/compiler/integers/u64/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/sub.leo.out @@ -16,306 +16,6 @@ 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> 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: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> 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: Sub - 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: Eq - 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: 47 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u64, b: u64, c: u64) -> bool {\n...\n}" + initial_theorem: 51ea52d83e589316bb16309f9422ad9949832077bd036c61ac1f3de873bb2b62 + canonicalized_theorem: 51ea52d83e589316bb16309f9422ad9949832077bd036c61ac1f3de873bb2b62 + type_inferenced_theorem: 3409439c9ba061104e4aa8df5d70283bc7f87fa92076f8a0459660dc8f7f1aed diff --git a/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out index a531339f29..ede0e73d16 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out @@ -22,412 +22,6 @@ 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(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> 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(s: bool, a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u64, b: u64, c: u64) -> 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(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> 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(s: bool, a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u64, b: u64, c: u64) -> 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(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> 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(s: bool, a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":32,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 32 - col_stop: 33 - path: compiler-test - content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u64, b: u64, c: u64) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U64 - span: - line_start: 3 - line_stop: 3 - col_start: 40 - col_stop: 41 - path: compiler-test - content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: - IntegerType: U64 - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 56 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u64, b: u64, c: u64) -> bool {\n...\n}\n\n" + initial_theorem: 9522a94841df58a5171753bc8ca01db576432511995dc5841107314293af41e1 + canonicalized_theorem: 9522a94841df58a5171753bc8ca01db576432511995dc5841107314293af41e1 + type_inferenced_theorem: 8759d4926622054977f1171605a87ff6a1b42fd9ff04c4154f01251bb928834e diff --git a/tests/expectations/compiler/compiler/integers/u8/add.leo.out b/tests/expectations/compiler/compiler/integers/u8/add.leo.out index 804724c31d..465b5edc33 100644 --- a/tests/expectations/compiler/compiler/integers/u8/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/add.leo.out @@ -16,306 +16,6 @@ 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: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> 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: Add - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> 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: Add - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> 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: Add - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + initial_theorem: 46143561de12f971f373f582a5d89ab12cbf3b2e4f05c1f748f9b42a004cd783 + canonicalized_theorem: 46143561de12f971f373f582a5d89ab12cbf3b2e4f05c1f748f9b42a004cd783 + type_inferenced_theorem: e18f8efbb8b287363a35743db48e443093c3e8528da6bdb59769d93272bce295 diff --git a/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out index a307c40d52..92223bcd37 100644 --- a/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out @@ -16,300 +16,6 @@ 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: u8, b: 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(a: u8, b: u8) -> 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, b: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8) -> 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - - 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 == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 3 - line_stop: 6 - col_start: 37 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8) -> 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, b: 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(a: u8, b: u8) -> 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, b: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8) -> 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - - 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 == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 3 - line_stop: 6 - col_start: 37 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8) -> 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, b: 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(a: u8, b: u8) -> 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, b: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8) -> 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 == b);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == b);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " console.assert(a == b);" - - 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 == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}" - op: Eq - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return a == b;" - span: - line_start: 3 - line_stop: 6 - col_start: 37 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8) -> bool {\n...\n}\n" + initial_theorem: 0fd5c6b2d0a72defe0e73199cc66c2602cecb5bab6432afb11a5cff0da574fac + canonicalized_theorem: 0fd5c6b2d0a72defe0e73199cc66c2602cecb5bab6432afb11a5cff0da574fac + type_inferenced_theorem: 35cd62b7d5e5848a87a7702ca3574b1e525ec44b57a203042ebf2371f6577eb5 diff --git a/tests/expectations/compiler/compiler/integers/u8/div.leo.out b/tests/expectations/compiler/compiler/integers/u8/div.leo.out index e295937640..4a63eda82e 100644 --- a/tests/expectations/compiler/compiler/integers/u8/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/div.leo.out @@ -16,306 +16,6 @@ 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: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + initial_theorem: 14e39ff28ecd780e1cac8d6f6b4d1225837f014233130ad709550fc7771a3191 + canonicalized_theorem: 14e39ff28ecd780e1cac8d6f6b4d1225837f014233130ad709550fc7771a3191 + type_inferenced_theorem: 9773336c82e254fc8bb0df35b41d06ce3cc112dc625bb1f913a2ab712d50336c diff --git a/tests/expectations/compiler/compiler/integers/u8/eq.leo.out b/tests/expectations/compiler/compiler/integers/u8/eq.leo.out index ce8f6ad88c..906231a422 100644 --- a/tests/expectations/compiler/compiler/integers/u8/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/eq.leo.out @@ -22,303 +22,6 @@ 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a == b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a == b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + initial_theorem: 132aa07033dcffd3e2e834e1dcfe34e6b3f1ff80012a9142c39b7fc88aa99174 + canonicalized_theorem: 132aa07033dcffd3e2e834e1dcfe34e6b3f1ff80012a9142c39b7fc88aa99174 + type_inferenced_theorem: 88354ad0bdb4d2f6b762c4cd5545ea532bb545928ad7c15f3f091ca468d809f4 diff --git a/tests/expectations/compiler/compiler/integers/u8/ge.leo.out b/tests/expectations/compiler/compiler/integers/u8/ge.leo.out index 8f2d6d2bb4..2b9d3e322e 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ge.leo.out @@ -28,303 +28,6 @@ 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Ge - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a >= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a >= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a >= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + initial_theorem: 2fbb4f0e49def7c8576b9201a8b0880cdbc7a84cb101ad717b69b49d0cdd69a9 + canonicalized_theorem: 2fbb4f0e49def7c8576b9201a8b0880cdbc7a84cb101ad717b69b49d0cdd69a9 + type_inferenced_theorem: 820a374b48ec40e6c7b27321007465fc235c679dc49c01e383acecb1b64d2574 diff --git a/tests/expectations/compiler/compiler/integers/u8/gt.leo.out b/tests/expectations/compiler/compiler/integers/u8/gt.leo.out index edc743fead..8422eff2c7 100644 --- a/tests/expectations/compiler/compiler/integers/u8/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/gt.leo.out @@ -16,308 +16,6 @@ outputs: - input_file: u8_f.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: u8, b: u8, c: 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, b: u8, c: 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, b: u8, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) {" - output: ~ - block: - statements: - - Console: - function: - Assert: - Binary: - left: - 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 > b == c);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Gt - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " console.assert(a > b == c);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 3 - line_stop: 5 - col_start: 38 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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, b: u8, c: 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, b: u8, c: 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, b: u8, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) {" - output: - Tuple: [] - block: - statements: - - Console: - function: - Assert: - Binary: - left: - 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 > b == c);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Gt - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " console.assert(a > b == c);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 3 - line_stop: 5 - col_start: 38 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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, b: u8, c: 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, b: u8, c: 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, b: u8, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) {" - output: - Tuple: [] - block: - statements: - - Console: - function: - Assert: - Binary: - left: - 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 > b == c);\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Gt - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " console.assert(a > b == c);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a > b == c);\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 30 - path: compiler-test - content: " console.assert(a > b == c);" - span: - line_start: 3 - line_stop: 5 - col_start: 38 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) {\n...\n}" + initial_theorem: c5690d672e1ed1d36f698ee7f2cdd39d3dbb190c899435de7b4a71eb2f3d125c + canonicalized_theorem: 6eb02fba96f74190b7aacdea8da5eb00964cb25d93e89aff4b0f047d7239a704 + type_inferenced_theorem: 446a1de27bf2d3927b4bfcfcd65817cecf8a95c9e09b17901fb283e05ce9a82f diff --git a/tests/expectations/compiler/compiler/integers/u8/input.leo.out b/tests/expectations/compiler/compiler/integers/u8/input.leo.out index 6447bae75f..83e360bd40 100644 --- a/tests/expectations/compiler/compiler/integers/u8/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/input.leo.out @@ -16,231 +16,6 @@ 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: u8, b: 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(a: u8, b: u8) -> 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, b: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8) -> 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: 37 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: 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(a: u8, b: 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(a: u8, b: u8) -> 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, b: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8) -> 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: 37 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: 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(a: u8, b: 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(a: u8, b: u8) -> 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, b: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8) -> 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: 37 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8) -> bool {\n...\n}" + initial_theorem: 41cd9d639298b0dd1c84b8fdcb624a12b6fabade022c97738d19e8cdd4796956 + canonicalized_theorem: 41cd9d639298b0dd1c84b8fdcb624a12b6fabade022c97738d19e8cdd4796956 + type_inferenced_theorem: ed93dbc932db00cbbf765f2908bc27860780102a3a884c6684c91abc3d1ca4d0 diff --git a/tests/expectations/compiler/compiler/integers/u8/le.leo.out b/tests/expectations/compiler/compiler/integers/u8/le.leo.out index daad236bce..66928ce408 100644 --- a/tests/expectations/compiler/compiler/integers/u8/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/le.leo.out @@ -28,303 +28,6 @@ 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Le - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a <= b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a <= b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a <= b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + initial_theorem: aeaa0daf3457c8c5425b98f0ee5ce1818062b3e319237a1a2f3060f5f76593d9 + canonicalized_theorem: aeaa0daf3457c8c5425b98f0ee5ce1818062b3e319237a1a2f3060f5f76593d9 + type_inferenced_theorem: 670d28a03f291083985c74c5f5e6aab6dff9e481443ceae2fce033dc9df03c83 diff --git a/tests/expectations/compiler/compiler/integers/u8/lt.leo.out b/tests/expectations/compiler/compiler/integers/u8/lt.leo.out index aeeb4a7769..5cf8f28621 100644 --- a/tests/expectations/compiler/compiler/integers/u8/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/lt.leo.out @@ -22,303 +22,6 @@ 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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: Lt - 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: Eq - 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: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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: Lt - 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: Eq - 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: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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: Lt - 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: Eq - 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: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + initial_theorem: 6053db7befe79c361e783fdf841d7955b78b0b5cea6aa82de8ba15de73943927 + canonicalized_theorem: 6053db7befe79c361e783fdf841d7955b78b0b5cea6aa82de8ba15de73943927 + type_inferenced_theorem: 097e4cc4579f4298a73e5f65283dc92792b75c4c1a542456523d949344cb17f6 diff --git a/tests/expectations/compiler/compiler/integers/u8/max.leo.out b/tests/expectations/compiler/compiler/integers/u8/max.leo.out index 25e3b6e8da..826d22a626 100644 --- a/tests/expectations/compiler/compiler/integers/u8/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/max.leo.out @@ -16,307 +16,6 @@ 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 = 255;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u8 = 255;" - type_: - IntegerType: U8 - value: - Value: - Implicit: - - "255" - - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " const a: u8 = 255;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a: u8 = 255;" - - 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: - - 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 = 255;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u8 = 255;" - type_: - IntegerType: U8 - value: - Value: - Implicit: - - "255" - - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " const a: u8 = 255;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a: u8 = 255;" - - 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: - - 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 = 255;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u8 = 255;" - type_: - IntegerType: U8 - value: - Value: - Integer: - - U8 - - "255" - - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " const a: u8 = 255;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " const a: u8 = 255;" - - 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" + initial_theorem: c76876fb75e6a86c9f75dee04598fd43dc6ab73e62c92fd4ae8cb0f58d4eaf35 + canonicalized_theorem: c76876fb75e6a86c9f75dee04598fd43dc6ab73e62c92fd4ae8cb0f58d4eaf35 + type_inferenced_theorem: 3bd166f8a614dca66a55c11e8a88e45c8ec836746fdb18c2b28cd8c19a98fd6f diff --git a/tests/expectations/compiler/compiler/integers/u8/min.leo.out b/tests/expectations/compiler/compiler/integers/u8/min.leo.out index ade802b62f..edff17f4b1 100644 --- a/tests/expectations/compiler/compiler/integers/u8/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/min.leo.out @@ -16,307 +16,6 @@ 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 = 0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u8 = 0;" - type_: - IntegerType: U8 - value: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " const a: u8 = 0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 20 - path: compiler-test - content: " const a: u8 = 0;" - - 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: - - 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 = 0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u8 = 0;" - type_: - IntegerType: U8 - value: - Value: - Implicit: - - "0" - - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " const a: u8 = 0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 20 - path: compiler-test - content: " const a: u8 = 0;" - - 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: - - 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 = 0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a: u8 = 0;" - type_: - IntegerType: U8 - value: - Value: - Integer: - - U8 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " const a: u8 = 0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 20 - path: compiler-test - content: " const a: u8 = 0;" - - 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" + initial_theorem: 88343847b6fce997c39196a99ea382fdd560e804a04363efa75fff7aa9632550 + canonicalized_theorem: 88343847b6fce997c39196a99ea382fdd560e804a04363efa75fff7aa9632550 + type_inferenced_theorem: 2ab03d470fda1fb7747fd1868113bf107f90ad4a5e578763475d08d0127df37f diff --git a/tests/expectations/compiler/compiler/integers/u8/mul.leo.out b/tests/expectations/compiler/compiler/integers/u8/mul.leo.out index 3c7cee275e..c70819519c 100644 --- a/tests/expectations/compiler/compiler/integers/u8/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/mul.leo.out @@ -16,306 +16,6 @@ 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: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> 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: Mul - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> 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: Mul - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> 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: Mul - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + initial_theorem: bd3039edc007709bcb436aa637183ad209cfe911e664630a51164fb816e0457c + canonicalized_theorem: bd3039edc007709bcb436aa637183ad209cfe911e664630a51164fb816e0457c + type_inferenced_theorem: bd4154abb8f63cc329ca278d8d1d881396439f9fc0e0b1824b453b648a9a95a8 diff --git a/tests/expectations/compiler/compiler/integers/u8/ne.leo.out b/tests/expectations/compiler/compiler/integers/u8/ne.leo.out index 61a464a427..37cfd4ceb6 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ne.leo.out @@ -16,303 +16,6 @@ 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: 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: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: 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: u8, b: u8, c: bool) -> 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\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Ne - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return a != b == c;" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b == c;\\\"}\"}" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return a != b == c;" - span: - line_start: 3 - line_stop: 5 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: bool) -> bool {\n...\n}" + initial_theorem: 0ab5c6b9b456638bc02751352328eddb194c0823c5d2861fbef8b4bc5c15d2cd + canonicalized_theorem: 0ab5c6b9b456638bc02751352328eddb194c0823c5d2861fbef8b4bc5c15d2cd + type_inferenced_theorem: 03cb77b44cd5a28632d0f203c9354af48f104390262dd58fe2ef10929f3a1e5d diff --git a/tests/expectations/compiler/compiler/integers/u8/sub.leo.out b/tests/expectations/compiler/compiler/integers/u8/sub.leo.out index 1abb40cf35..b9f8488d36 100644 --- a/tests/expectations/compiler/compiler/integers/u8/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/sub.leo.out @@ -16,306 +16,6 @@ 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: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> 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: Sub - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> 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: Sub - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: 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(a: u8, b: u8, c: 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(a: u8, b: u8, c: u8) -> 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, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 22 - col_stop: 23 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 29 - col_stop: 30 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> 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: Sub - 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: Eq - 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: 44 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: u8, b: u8, c: u8) -> bool {\n...\n}" + initial_theorem: 8ff67855790ac3e64c77531a999f06a2546567754204428dfb3d8519f9575678 + canonicalized_theorem: 8ff67855790ac3e64c77531a999f06a2546567754204428dfb3d8519f9575678 + type_inferenced_theorem: 6ad282b40daaae8a4b96531c8a467f189157270bffb31ed07f7ba786b5543ab9 diff --git a/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out index 659b3553f8..fac3dacd24 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out @@ -22,412 +22,6 @@ 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(s: bool, a: u8, b: u8, c: 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(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> 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(s: bool, a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 38 - col_stop: 39 - path: compiler-test - content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 53 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u8, b: u8, c: u8) -> 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(s: bool, a: u8, b: u8, c: 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(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> 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(s: bool, a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 38 - col_stop: 39 - path: compiler-test - content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: ~ - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 53 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u8, b: u8, c: u8) -> 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(s: bool, a: u8, b: u8, c: 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(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> 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(s: bool, a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 24 - col_stop: 25 - path: compiler-test - content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 32 - path: compiler-test - content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" - - Variable: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s: bool, a: u8, b: u8, c: u8) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U8 - span: - line_start: 3 - line_stop: 3 - col_start: 38 - col_stop: 39 - path: compiler-test - content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r = s ? a : b;" - type_: - IntegerType: U8 - value: - Ternary: - condition: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_true: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - if_false: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r = s ? a : b;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " let r = s ? a : b;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == c;\\\"}\"}" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == c;" - span: - line_start: 3 - line_stop: 7 - col_start: 53 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s: bool, a: u8, b: u8, c: u8) -> bool {\n...\n}\n\n" + initial_theorem: 3a52d53376039a10517157e2c8f25287b85b50f9c46b59b914e417186e8fb245 + canonicalized_theorem: 3a52d53376039a10517157e2c8f25287b85b50f9c46b59b914e417186e8fb245 + type_inferenced_theorem: 643e93414412b4d6a5b20cc6490f119d277ce6afaedb948247ce028cf9f9b68b diff --git a/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out index e42dfd179d..b5b9a2b97c 100644 --- a/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out @@ -22,701 +22,6 @@ outputs: r0: type: "[u32; 3]" value: "\"150\"" - 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(i: u32) -> [u32; 3] {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [u32; 3] {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [u32; 3] {\\\"}\"}" - 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(i: u32) -> [u32; 3] {" - output: - Array: - - IntegerType: U32 - - - value: "3" - 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 = [1u32, 2u32, 3u32];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - type_: ~ - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Expression: - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Expression: - Value: - Integer: - - U32 - - "3" - - line_start: 4 - line_stop: 4 - col_start: 26 - col_stop: 30 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 31 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 31 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Assign: - operation: Add - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - accesses: - - ArrayIndex: - Binary: - left: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[i - 1] += a[i];" - op: Sub - span: - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 12 - path: compiler-test - content: " a[i - 1] += a[i];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " a[i - 1] += a[i];" - value: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - index: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " a[i - 1] += a[i];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " a[i - 1] += a[i];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = 0;\\\"}\"}" - accesses: - - ArrayIndex: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = 0;\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " a[i] = 0;" - value: - Value: - Implicit: - - "0" - - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 13 - path: compiler-test - content: " a[i] = 0;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " a[i] = 0;" - - Return: - expression: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " return a;" - span: - line_start: 3 - line_stop: 9 - col_start: 35 - col_stop: 2 - path: compiler-test - content: "function main(i: u32) -> [u32; 3] {\n...\n}" - span: - line_start: 3 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(i: u32) -> [u32; 3] {\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(i: u32) -> [u32; 3] {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [u32; 3] {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [u32; 3] {\\\"}\"}" - 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(i: u32) -> [u32; 3] {" - output: - Array: - - IntegerType: U32 - - - value: "3" - 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 = [1u32, 2u32, 3u32];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - type_: ~ - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Expression: - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Expression: - Value: - Integer: - - U32 - - "3" - - line_start: 4 - line_stop: 4 - col_start: 26 - col_stop: 30 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 31 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 31 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - accesses: - - ArrayIndex: - Binary: - left: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[i - 1] += a[i];" - op: Sub - span: - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 12 - path: compiler-test - content: " a[i - 1] += a[i];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " a[i - 1] += a[i];" - value: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - index: - Binary: - left: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[i - 1] += a[i];" - op: Sub - span: - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 12 - path: compiler-test - content: " a[i - 1] += a[i];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " a[i - 1] += a[i];" - right: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - index: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " a[i - 1] += a[i];" - op: Add - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " a[i - 1] += a[i];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " a[i - 1] += a[i];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = 0;\\\"}\"}" - accesses: - - ArrayIndex: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = 0;\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " a[i] = 0;" - value: - Value: - Implicit: - - "0" - - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 13 - path: compiler-test - content: " a[i] = 0;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " a[i] = 0;" - - Return: - expression: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " return a;" - span: - line_start: 3 - line_stop: 9 - col_start: 35 - col_stop: 2 - path: compiler-test - content: "function main(i: u32) -> [u32; 3] {\n...\n}" - span: - line_start: 3 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(i: u32) -> [u32; 3] {\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(i: u32) -> [u32; 3] {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [u32; 3] {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [u32; 3] {\\\"}\"}" - 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(i: u32) -> [u32; 3] {" - output: - Array: - - IntegerType: U32 - - - value: "3" - 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 = [1u32, 2u32, 3u32];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - type_: - Array: - - IntegerType: U32 - - - value: "3" - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Expression: - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Expression: - Value: - Integer: - - U32 - - "3" - - line_start: 4 - line_stop: 4 - col_start: 26 - col_stop: 30 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 31 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 31 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - accesses: - - ArrayIndex: - Binary: - left: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[i - 1] += a[i];" - op: Sub - span: - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 12 - path: compiler-test - content: " a[i - 1] += a[i];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " a[i - 1] += a[i];" - value: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - index: - Binary: - left: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 5 - line_stop: 5 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a[i - 1] += a[i];" - op: Sub - span: - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 12 - path: compiler-test - content: " a[i - 1] += a[i];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " a[i - 1] += a[i];" - right: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - index: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i - 1] += a[i];\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " a[i - 1] += a[i];" - op: Add - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " a[i - 1] += a[i];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " a[i - 1] += a[i];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = 0;\\\"}\"}" - accesses: - - ArrayIndex: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = 0;\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " a[i] = 0;" - value: - Value: - Integer: - - U32 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 13 - path: compiler-test - content: " a[i] = 0;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " a[i] = 0;" - - Return: - expression: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " return a;" - span: - line_start: 3 - line_stop: 9 - col_start: 35 - col_stop: 2 - path: compiler-test - content: "function main(i: u32) -> [u32; 3] {\n...\n}" - span: - line_start: 3 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(i: u32) -> [u32; 3] {\n...\n}\n\n\n\n" + initial_theorem: e040115f45af0248976ed3dfbf9c3440d73005c2fa62ee12199298f5e375c14f + canonicalized_theorem: 9b095b10f8f9c8538cfa8a371cd23e1abbac7385df1ef3ef9b4d0a13ae122335 + type_inferenced_theorem: eb4f4325a50b1c5a5e3ab7b89ec2a19a6dd9e3cab55005540ed61206e439b737 diff --git a/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out b/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out index c140aedd21..68294e3dee 100644 --- a/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out @@ -22,772 +22,6 @@ outputs: r0: type: "[(u32, u32); 3]" value: "\"(1, 1)(2, 2)(0, 1)\"" - 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(i: u32) -> [(u32, u32); 3] {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [(u32, u32); 3] {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [(u32, u32); 3] {\\\"}\"}" - 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(i: u32) -> [(u32, u32); 3] {" - output: - Array: - - Tuple: - - IntegerType: U32 - - IntegerType: U32 - - - value: "3" - 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 = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - type_: ~ - value: - ArrayInline: - elements: - - Expression: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 25 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 26 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Expression: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 33 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 39 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 28 - col_stop: 40 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Expression: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "3" - - line_start: 4 - line_stop: 4 - col_start: 43 - col_stop: 47 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Value: - Integer: - - U32 - - "3" - - line_start: 4 - line_stop: 4 - col_start: 49 - col_stop: 53 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 54 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 55 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 55 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].0 = 0;\\\"}\"}" - accesses: - - ArrayIndex: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].0 = 0;\\\"}\"}" - - Tuple: - - value: "0" - - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 11 - path: compiler-test - content: " a[i].0 = 0;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 11 - path: compiler-test - content: " a[i].0 = 0;" - value: - Value: - Implicit: - - "0" - - line_start: 5 - line_stop: 5 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " a[i].0 = 0;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 15 - path: compiler-test - content: " a[i].0 = 0;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].1 = 1;\\\"}\"}" - accesses: - - ArrayIndex: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].1 = 1;\\\"}\"}" - - Tuple: - - value: "1" - - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 11 - path: compiler-test - content: " a[i].1 = 1;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 11 - path: compiler-test - content: " a[i].1 = 1;" - value: - Value: - Implicit: - - "1" - - line_start: 6 - line_stop: 6 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " a[i].1 = 1;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 15 - path: compiler-test - content: " a[i].1 = 1;" - - Return: - expression: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " return a;" - span: - line_start: 3 - line_stop: 9 - col_start: 42 - col_stop: 2 - path: compiler-test - content: "function main(i: u32) -> [(u32, u32); 3] {\n...\n}" - span: - line_start: 3 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(i: u32) -> [(u32, u32); 3] {\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(i: u32) -> [(u32, u32); 3] {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [(u32, u32); 3] {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [(u32, u32); 3] {\\\"}\"}" - 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(i: u32) -> [(u32, u32); 3] {" - output: - Array: - - Tuple: - - IntegerType: U32 - - IntegerType: U32 - - - value: "3" - 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 = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - type_: ~ - value: - ArrayInline: - elements: - - Expression: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 25 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 26 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Expression: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 33 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 39 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 28 - col_stop: 40 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Expression: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "3" - - line_start: 4 - line_stop: 4 - col_start: 43 - col_stop: 47 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Value: - Integer: - - U32 - - "3" - - line_start: 4 - line_stop: 4 - col_start: 49 - col_stop: 53 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 54 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 55 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 55 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].0 = 0;\\\"}\"}" - accesses: - - ArrayIndex: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].0 = 0;\\\"}\"}" - - Tuple: - - value: "0" - - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 11 - path: compiler-test - content: " a[i].0 = 0;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 11 - path: compiler-test - content: " a[i].0 = 0;" - value: - Value: - Implicit: - - "0" - - line_start: 5 - line_stop: 5 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " a[i].0 = 0;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 15 - path: compiler-test - content: " a[i].0 = 0;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].1 = 1;\\\"}\"}" - accesses: - - ArrayIndex: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].1 = 1;\\\"}\"}" - - Tuple: - - value: "1" - - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 11 - path: compiler-test - content: " a[i].1 = 1;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 11 - path: compiler-test - content: " a[i].1 = 1;" - value: - Value: - Implicit: - - "1" - - line_start: 6 - line_stop: 6 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " a[i].1 = 1;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 15 - path: compiler-test - content: " a[i].1 = 1;" - - Return: - expression: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " return a;" - span: - line_start: 3 - line_stop: 9 - col_start: 42 - col_stop: 2 - path: compiler-test - content: "function main(i: u32) -> [(u32, u32); 3] {\n...\n}" - span: - line_start: 3 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(i: u32) -> [(u32, u32); 3] {\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(i: u32) -> [(u32, u32); 3] {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [(u32, u32); 3] {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(i: u32) -> [(u32, u32); 3] {\\\"}\"}" - 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(i: u32) -> [(u32, u32); 3] {" - output: - Array: - - Tuple: - - IntegerType: U32 - - IntegerType: U32 - - - value: "3" - 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 = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - type_: - Array: - - Tuple: - - IntegerType: U32 - - IntegerType: U32 - - - value: "3" - value: - ArrayInline: - elements: - - Expression: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 25 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 26 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Expression: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 33 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 39 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 28 - col_stop: 40 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Expression: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "3" - - line_start: 4 - line_stop: 4 - col_start: 43 - col_stop: 47 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Value: - Integer: - - U32 - - "3" - - line_start: 4 - line_stop: 4 - col_start: 49 - col_stop: 53 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 54 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 55 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 55 - path: compiler-test - content: " let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].0 = 0;\\\"}\"}" - accesses: - - ArrayIndex: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].0 = 0;\\\"}\"}" - - Tuple: - - value: "0" - - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 11 - path: compiler-test - content: " a[i].0 = 0;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 11 - path: compiler-test - content: " a[i].0 = 0;" - value: - Value: - Integer: - - U32 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " a[i].0 = 0;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 15 - path: compiler-test - content: " a[i].0 = 0;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].1 = 1;\\\"}\"}" - accesses: - - ArrayIndex: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i].1 = 1;\\\"}\"}" - - Tuple: - - value: "1" - - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 11 - path: compiler-test - content: " a[i].1 = 1;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 11 - path: compiler-test - content: " a[i].1 = 1;" - value: - Value: - Integer: - - U32 - - "1" - - line_start: 6 - line_stop: 6 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " a[i].1 = 1;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 15 - path: compiler-test - content: " a[i].1 = 1;" - - Return: - expression: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " return a;" - span: - line_start: 3 - line_stop: 9 - col_start: 42 - col_stop: 2 - path: compiler-test - content: "function main(i: u32) -> [(u32, u32); 3] {\n...\n}" - span: - line_start: 3 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(i: u32) -> [(u32, u32); 3] {\n...\n}\n\n\n\n" + initial_theorem: fb18710f2c196b07de8bf83e68dfe03d41241ddf7c407bc10780dd1fa19c4cc2 + canonicalized_theorem: fb18710f2c196b07de8bf83e68dfe03d41241ddf7c407bc10780dd1fa19c4cc2 + type_inferenced_theorem: 65df378f0e3f7b77b83d197dd2d8bfc78b9091a2f1d92629e6956d0f4e96ef06 diff --git a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out index 71318242c9..16fc82dc0c 100644 --- a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out @@ -16,555 +16,6 @@ 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: 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 = [1u32];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = [1u32];" - type_: ~ - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " let a = [1u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " let a = [1u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " let a = [1u32];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0] = 0;\\\"}\"}" - accesses: - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 8 - path: compiler-test - content: " a[0] = 0;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " a[0] = 0;" - value: - Value: - Implicit: - - "0" - - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 13 - path: compiler-test - content: " a[0] = 0;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " a[0] = 0;" - - Return: - expression: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 0u32 == y;\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " return a[0] == 0u32 == y;" - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return a[0] == 0u32 == y;" - right: - Value: - Integer: - - U32 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " return a[0] == 0u32 == y;" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return a[0] == 0u32 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 0u32 == y;\\\"}\"}" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 29 - path: compiler-test - content: " return a[0] == 0u32 == y;" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 29 - path: compiler-test - content: " return a[0] == 0u32 == 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: 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 = [1u32];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = [1u32];" - type_: ~ - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " let a = [1u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " let a = [1u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " let a = [1u32];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0] = 0;\\\"}\"}" - accesses: - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 8 - path: compiler-test - content: " a[0] = 0;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " a[0] = 0;" - value: - Value: - Implicit: - - "0" - - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 13 - path: compiler-test - content: " a[0] = 0;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " a[0] = 0;" - - Return: - expression: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 0u32 == y;\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " return a[0] == 0u32 == y;" - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return a[0] == 0u32 == y;" - right: - Value: - Integer: - - U32 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " return a[0] == 0u32 == y;" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return a[0] == 0u32 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 0u32 == y;\\\"}\"}" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 29 - path: compiler-test - content: " return a[0] == 0u32 == y;" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 29 - path: compiler-test - content: " return a[0] == 0u32 == 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: 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 = [1u32];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = [1u32];" - type_: - Array: - - IntegerType: U32 - - - value: "1" - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " let a = [1u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " let a = [1u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 19 - path: compiler-test - content: " let a = [1u32];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0] = 0;\\\"}\"}" - accesses: - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 8 - path: compiler-test - content: " a[0] = 0;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " a[0] = 0;" - value: - Value: - Integer: - - U32 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 13 - path: compiler-test - content: " a[0] = 0;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " a[0] = 0;" - - Return: - expression: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 0u32 == y;\\\"}\"}" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " return a[0] == 0u32 == y;" - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return a[0] == 0u32 == y;" - right: - Value: - Integer: - - U32 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " return a[0] == 0u32 == y;" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return a[0] == 0u32 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 0u32 == y;\\\"}\"}" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 29 - path: compiler-test - content: " return a[0] == 0u32 == y;" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 29 - path: compiler-test - content: " return a[0] == 0u32 == 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" + initial_theorem: 9f12a9096f69d21c58c4605d81f237d47e45b31cd76e0e774d952861223b6ce5 + canonicalized_theorem: 9f12a9096f69d21c58c4605d81f237d47e45b31cd76e0e774d952861223b6ce5 + type_inferenced_theorem: e938979bb8701986dec52ecca670054ddeb988500ec62018f36e2f9db23b7e3f diff --git a/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out index 0333dead54..d416f58f76 100644 --- a/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out @@ -16,1092 +16,6 @@ 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: 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 = [1u32, 2u32, 3u32];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - type_: ~ - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Expression: - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Expression: - Value: - Integer: - - U32 - - "3" - - line_start: 4 - line_stop: 4 - col_start: 26 - col_stop: 30 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 31 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 31 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0u32..2u32] = [4u32, 5u32];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Integer: - - U32 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 11 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - - Value: - Integer: - - U32 - - "2" - - line_start: 5 - line_stop: 5 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U32 - - "4" - - line_start: 5 - line_stop: 5 - col_start: 22 - col_stop: 26 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - - Expression: - Value: - Integer: - - U32 - - "5" - - line_start: 5 - line_stop: 5 - col_start: 28 - col_stop: 32 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - span: - line_start: 5 - line_stop: 5 - col_start: 21 - col_stop: 33 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 33 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - - Return: - expression: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 4u32\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " return a[0] == 4u32" - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return a[0] == 4u32" - right: - Value: - Integer: - - U32 - - "4" - - line_start: 7 - line_stop: 7 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " return a[0] == 4u32" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return a[0] == 4u32" - right: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[1] == 5u32\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 8 - line_stop: 8 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " && a[1] == 5u32" - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " && a[1] == 5u32" - right: - Value: - Integer: - - U32 - - "5" - - line_start: 8 - line_stop: 8 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " && a[1] == 5u32" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " && a[1] == 5u32" - op: And - span: - line_start: 7 - line_stop: 8 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return a[0] == 4u32\n && a[1] == 5u32" - right: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[2] == 3u32\\\"}\"}" - index: - Value: - Implicit: - - "2" - - line_start: 9 - line_stop: 9 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " && a[2] == 3u32" - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " && a[2] == 3u32" - right: - Value: - Integer: - - U32 - - "3" - - line_start: 9 - line_stop: 9 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " && a[2] == 3u32" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " && a[2] == 3u32" - op: And - span: - line_start: 7 - line_stop: 9 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32" - right: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == true;\\\"}\"}" - right: - Value: - Boolean: - - "true" - - line_start: 10 - line_stop: 10 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && y == true;" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && y == true;" - op: And - span: - line_start: 7 - line_stop: 10 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32\n && y == true;" - span: - line_start: 7 - line_stop: 10 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32\n && y == true;" - span: - line_start: 3 - line_stop: 11 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 11 - 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\":\"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\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = [1u32, 2u32, 3u32];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - type_: ~ - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Expression: - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Expression: - Value: - Integer: - - U32 - - "3" - - line_start: 4 - line_stop: 4 - col_start: 26 - col_stop: 30 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 31 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 31 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0u32..2u32] = [4u32, 5u32];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Integer: - - U32 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 11 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - - Value: - Integer: - - U32 - - "2" - - line_start: 5 - line_stop: 5 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U32 - - "4" - - line_start: 5 - line_stop: 5 - col_start: 22 - col_stop: 26 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - - Expression: - Value: - Integer: - - U32 - - "5" - - line_start: 5 - line_stop: 5 - col_start: 28 - col_stop: 32 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - span: - line_start: 5 - line_stop: 5 - col_start: 21 - col_stop: 33 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 33 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - - Return: - expression: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 4u32\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " return a[0] == 4u32" - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return a[0] == 4u32" - right: - Value: - Integer: - - U32 - - "4" - - line_start: 7 - line_stop: 7 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " return a[0] == 4u32" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return a[0] == 4u32" - right: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[1] == 5u32\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 8 - line_stop: 8 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " && a[1] == 5u32" - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " && a[1] == 5u32" - right: - Value: - Integer: - - U32 - - "5" - - line_start: 8 - line_stop: 8 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " && a[1] == 5u32" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " && a[1] == 5u32" - op: And - span: - line_start: 7 - line_stop: 8 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return a[0] == 4u32\n && a[1] == 5u32" - right: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[2] == 3u32\\\"}\"}" - index: - Value: - Implicit: - - "2" - - line_start: 9 - line_stop: 9 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " && a[2] == 3u32" - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " && a[2] == 3u32" - right: - Value: - Integer: - - U32 - - "3" - - line_start: 9 - line_stop: 9 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " && a[2] == 3u32" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " && a[2] == 3u32" - op: And - span: - line_start: 7 - line_stop: 9 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32" - right: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == true;\\\"}\"}" - right: - Value: - Boolean: - - "true" - - line_start: 10 - line_stop: 10 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && y == true;" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && y == true;" - op: And - span: - line_start: 7 - line_stop: 10 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32\n && y == true;" - span: - line_start: 7 - line_stop: 10 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32\n && y == true;" - span: - line_start: 3 - line_stop: 11 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 11 - 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\":\"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\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = [1u32, 2u32, 3u32];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - type_: - Array: - - IntegerType: U32 - - - value: "3" - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Expression: - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Expression: - Value: - Integer: - - U32 - - "3" - - line_start: 4 - line_stop: 4 - col_start: 26 - col_stop: 30 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 31 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 31 - path: compiler-test - content: " let a = [1u32, 2u32, 3u32];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0u32..2u32] = [4u32, 5u32];\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Integer: - - U32 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 11 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - - Value: - Integer: - - U32 - - "2" - - line_start: 5 - line_stop: 5 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U32 - - "4" - - line_start: 5 - line_stop: 5 - col_start: 22 - col_stop: 26 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - - Expression: - Value: - Integer: - - U32 - - "5" - - line_start: 5 - line_stop: 5 - col_start: 28 - col_stop: 32 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - span: - line_start: 5 - line_stop: 5 - col_start: 21 - col_stop: 33 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 33 - path: compiler-test - content: " a[0u32..2u32] = [4u32, 5u32];" - - Return: - expression: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0] == 4u32\\\"}\"}" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " return a[0] == 4u32" - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " return a[0] == 4u32" - right: - Value: - Integer: - - U32 - - "4" - - line_start: 7 - line_stop: 7 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " return a[0] == 4u32" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return a[0] == 4u32" - right: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[1] == 5u32\\\"}\"}" - index: - Value: - Integer: - - U32 - - "1" - - line_start: 8 - line_stop: 8 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " && a[1] == 5u32" - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " && a[1] == 5u32" - right: - Value: - Integer: - - U32 - - "5" - - line_start: 8 - line_stop: 8 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " && a[1] == 5u32" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " && a[1] == 5u32" - op: And - span: - line_start: 7 - line_stop: 8 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return a[0] == 4u32\n && a[1] == 5u32" - right: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[2] == 3u32\\\"}\"}" - index: - Value: - Integer: - - U32 - - "2" - - line_start: 9 - line_stop: 9 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " && a[2] == 3u32" - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " && a[2] == 3u32" - right: - Value: - Integer: - - U32 - - "3" - - line_start: 9 - line_stop: 9 - col_start: 20 - col_stop: 24 - path: compiler-test - content: " && a[2] == 3u32" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " && a[2] == 3u32" - op: And - span: - line_start: 7 - line_stop: 9 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32" - right: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == true;\\\"}\"}" - right: - Value: - Boolean: - - "true" - - line_start: 10 - line_stop: 10 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && y == true;" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && y == true;" - op: And - span: - line_start: 7 - line_stop: 10 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32\n && y == true;" - span: - line_start: 7 - line_stop: 10 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " return a[0] == 4u32\n && a[1] == 5u32\n && a[2] == 3u32\n && y == true;" - span: - line_start: 3 - line_stop: 11 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 11 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n" + initial_theorem: 87d5f27ec3dd5c4f9a338186e40021725b7b55b70447164dcb85452b06e2afdb + canonicalized_theorem: 87d5f27ec3dd5c4f9a338186e40021725b7b55b70447164dcb85452b06e2afdb + type_inferenced_theorem: 257f0fe5d7f985ed49cbc0e8b7501d71433d4dbc401cf746d30e7fde337771a2 diff --git a/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out index 6f34aecebd..4cb2ef663a 100644 --- a/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out @@ -16,929 +16,6 @@ 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: 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 = [(1u32, 2u32)];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - type_: ~ - value: - ArrayInline: - elements: - - Expression: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 25 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 26 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 27 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0u32].1 = 3u32;\\\"}\"}" - accesses: - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 11 - path: compiler-test - content: " a[0u32].1 = 3u32;" - - Tuple: - - value: "1" - - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " a[0u32].1 = 3u32;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " a[0u32].1 = 3u32;" - value: - Value: - Integer: - - U32 - - "3" - - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " a[0u32].1 = 3u32;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " a[0u32].1 = 3u32;" - - Return: - expression: - Binary: - left: - Binary: - left: - Binary: - left: - TupleAccess: - tuple: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0u32].0 == 1u32\\\"}\"}" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " return a[0u32].0 == 1u32" - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return a[0u32].0 == 1u32" - index: - value: "0" - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a[0u32].0 == 1u32" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 7 - line_stop: 7 - col_start: 25 - col_stop: 29 - path: compiler-test - content: " return a[0u32].0 == 1u32" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 29 - path: compiler-test - content: " return a[0u32].0 == 1u32" - right: - Binary: - left: - TupleAccess: - tuple: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[0u32].1 == 3u32\\\"}\"}" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 8 - line_stop: 8 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " && a[0u32].1 == 3u32" - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " && a[0u32].1 == 3u32" - index: - value: "1" - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && a[0u32].1 == 3u32" - right: - Value: - Integer: - - U32 - - "3" - - line_start: 8 - line_stop: 8 - col_start: 25 - col_stop: 29 - path: compiler-test - content: " && a[0u32].1 == 3u32" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 29 - path: compiler-test - content: " && a[0u32].1 == 3u32" - op: And - span: - line_start: 7 - line_stop: 8 - col_start: 12 - col_stop: 29 - path: compiler-test - content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32" - right: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == true;\\\"}\"}" - right: - Value: - Boolean: - - "true" - - line_start: 9 - line_stop: 9 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && y == true;" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && y == true;" - op: And - span: - line_start: 7 - line_stop: 9 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32\n && y == true;" - span: - line_start: 7 - line_stop: 9 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32\n && y == true;" - 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: 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 = [(1u32, 2u32)];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - type_: ~ - value: - ArrayInline: - elements: - - Expression: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 25 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 26 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 27 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0u32].1 = 3u32;\\\"}\"}" - accesses: - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 11 - path: compiler-test - content: " a[0u32].1 = 3u32;" - - Tuple: - - value: "1" - - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " a[0u32].1 = 3u32;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " a[0u32].1 = 3u32;" - value: - Value: - Integer: - - U32 - - "3" - - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " a[0u32].1 = 3u32;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " a[0u32].1 = 3u32;" - - Return: - expression: - Binary: - left: - Binary: - left: - Binary: - left: - TupleAccess: - tuple: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0u32].0 == 1u32\\\"}\"}" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " return a[0u32].0 == 1u32" - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return a[0u32].0 == 1u32" - index: - value: "0" - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a[0u32].0 == 1u32" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 7 - line_stop: 7 - col_start: 25 - col_stop: 29 - path: compiler-test - content: " return a[0u32].0 == 1u32" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 29 - path: compiler-test - content: " return a[0u32].0 == 1u32" - right: - Binary: - left: - TupleAccess: - tuple: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[0u32].1 == 3u32\\\"}\"}" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 8 - line_stop: 8 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " && a[0u32].1 == 3u32" - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " && a[0u32].1 == 3u32" - index: - value: "1" - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && a[0u32].1 == 3u32" - right: - Value: - Integer: - - U32 - - "3" - - line_start: 8 - line_stop: 8 - col_start: 25 - col_stop: 29 - path: compiler-test - content: " && a[0u32].1 == 3u32" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 29 - path: compiler-test - content: " && a[0u32].1 == 3u32" - op: And - span: - line_start: 7 - line_stop: 8 - col_start: 12 - col_stop: 29 - path: compiler-test - content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32" - right: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == true;\\\"}\"}" - right: - Value: - Boolean: - - "true" - - line_start: 9 - line_stop: 9 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && y == true;" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && y == true;" - op: And - span: - line_start: 7 - line_stop: 9 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32\n && y == true;" - span: - line_start: 7 - line_stop: 9 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32\n && y == true;" - 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: 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 = [(1u32, 2u32)];\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - type_: - Array: - - Tuple: - - IntegerType: U32 - - IntegerType: U32 - - - value: "1" - value: - ArrayInline: - elements: - - Expression: - TupleInit: - elements: - - Value: - Integer: - - U32 - - "1" - - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 19 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 25 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 26 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 27 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " let a = [(1u32, 2u32)];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[0u32].1 = 3u32;\\\"}\"}" - accesses: - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 5 - line_stop: 5 - col_start: 7 - col_stop: 11 - path: compiler-test - content: " a[0u32].1 = 3u32;" - - Tuple: - - value: "1" - - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " a[0u32].1 = 3u32;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " a[0u32].1 = 3u32;" - value: - Value: - Integer: - - U32 - - "3" - - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " a[0u32].1 = 3u32;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " a[0u32].1 = 3u32;" - - Return: - expression: - Binary: - left: - Binary: - left: - Binary: - left: - TupleAccess: - tuple: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a[0u32].0 == 1u32\\\"}\"}" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " return a[0u32].0 == 1u32" - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " return a[0u32].0 == 1u32" - index: - value: "0" - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a[0u32].0 == 1u32" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 7 - line_stop: 7 - col_start: 25 - col_stop: 29 - path: compiler-test - content: " return a[0u32].0 == 1u32" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 29 - path: compiler-test - content: " return a[0u32].0 == 1u32" - right: - Binary: - left: - TupleAccess: - tuple: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && a[0u32].1 == 3u32\\\"}\"}" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 8 - line_stop: 8 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " && a[0u32].1 == 3u32" - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 19 - path: compiler-test - content: " && a[0u32].1 == 3u32" - index: - value: "1" - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && a[0u32].1 == 3u32" - right: - Value: - Integer: - - U32 - - "3" - - line_start: 8 - line_stop: 8 - col_start: 25 - col_stop: 29 - path: compiler-test - content: " && a[0u32].1 == 3u32" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 29 - path: compiler-test - content: " && a[0u32].1 == 3u32" - op: And - span: - line_start: 7 - line_stop: 8 - col_start: 12 - col_stop: 29 - path: compiler-test - content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32" - right: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && y == true;\\\"}\"}" - right: - Value: - Boolean: - - "true" - - line_start: 9 - line_stop: 9 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " && y == true;" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " && y == true;" - op: And - span: - line_start: 7 - line_stop: 9 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32\n && y == true;" - span: - line_start: 7 - line_stop: 9 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " return a[0u32].0 == 1u32\n && a[0u32].1 == 3u32\n && y == true;" - 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" + initial_theorem: a0bdf5a95e0938c0493418f2280d7d9a6c7f484f8c0a16bb262d06364ecedcf6 + canonicalized_theorem: a0bdf5a95e0938c0493418f2280d7d9a6c7f484f8c0a16bb262d06364ecedcf6 + type_inferenced_theorem: 463c1646c892aadb9b851fb8d73a749183a404ff74c4c7470718b9a4fb95e1a4 diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out index f786bc6196..1215071588 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out @@ -16,677 +16,6 @@ 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\":\"foo\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function foo(mut self) {\\\"}\"}" - input: - - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function foo(mut self) {\\\"}\"}" - 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.x = 10;\\\"}\"}" - accesses: - - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x = 10;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " self.x = 10;" - value: - Value: - Implicit: - - "10" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 20 - path: compiler-test - content: " self.x = 10;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 20 - path: compiler-test - content: " self.x = 10;" - span: - line_start: 6 - line_stop: 8 - col_start: 28 - col_stop: 6 - path: compiler-test - content: " function foo(mut self) {\n...\n }" - span: - line_start: 6 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function foo(mut self) {\n...\n }" - global_consts: {} - functions: - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 12 - line_stop: 12 - 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\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = Foo { x: 1 };" - type_: ~ - value: - CircuitInit: - name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - members: - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - expression: - Value: - Implicit: - - "1" - - line_start: 13 - line_stop: 13 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " let a = Foo { x: 1 };" - span: - line_start: 13 - line_stop: 13 - col_start: 13 - col_stop: 25 - path: compiler-test - content: " let a = Foo { x: 1 };" - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " let a = Foo { x: 1 };" - - Expression: - expression: - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.foo();\\\"}\"}" - name: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.foo();\\\"}\"}" - span: - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 10 - path: compiler-test - content: " a.foo();" - arguments: [] - span: - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " a.foo();" - span: - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " a.foo();" - - Return: - expression: - Binary: - left: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" - span: - line_start: 17 - line_stop: 17 - col_start: 12 - col_stop: 15 - path: compiler-test - content: " return a.x == 10u32 == y;" - right: - Value: - Integer: - - U32 - - "10" - - line_start: 17 - line_stop: 17 - col_start: 19 - col_stop: 24 - path: compiler-test - content: " return a.x == 10u32 == y;" - op: Eq - span: - line_start: 17 - line_stop: 17 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return a.x == 10u32 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" - op: Eq - span: - line_start: 17 - line_stop: 17 - col_start: 12 - col_stop: 29 - path: compiler-test - content: " return a.x == 10u32 == y;" - span: - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 29 - path: compiler-test - content: " return a.x == 10u32 == y;" - span: - line_start: 12 - line_stop: 18 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 12 - line_stop: 18 - 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\\\":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\":\"foo\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function foo(mut self) {\\\"}\"}" - input: - - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function foo(mut self) {\\\"}\"}" - 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.x = 10;\\\"}\"}" - accesses: - - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x = 10;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " self.x = 10;" - value: - Value: - Implicit: - - "10" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 20 - path: compiler-test - content: " self.x = 10;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 20 - path: compiler-test - content: " self.x = 10;" - span: - line_start: 6 - line_stop: 8 - col_start: 28 - col_stop: 6 - path: compiler-test - content: " function foo(mut self) {\n...\n }" - span: - line_start: 6 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function foo(mut self) {\n...\n }" - global_consts: {} - functions: - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 12 - line_stop: 12 - 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\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = Foo { x: 1 };" - type_: ~ - value: - CircuitInit: - name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - members: - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - expression: - Value: - Implicit: - - "1" - - line_start: 13 - line_stop: 13 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " let a = Foo { x: 1 };" - span: - line_start: 13 - line_stop: 13 - col_start: 13 - col_stop: 25 - path: compiler-test - content: " let a = Foo { x: 1 };" - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " let a = Foo { x: 1 };" - - Expression: - expression: - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.foo();\\\"}\"}" - name: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.foo();\\\"}\"}" - span: - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 10 - path: compiler-test - content: " a.foo();" - arguments: [] - span: - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " a.foo();" - span: - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " a.foo();" - - Return: - expression: - Binary: - left: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" - span: - line_start: 17 - line_stop: 17 - col_start: 12 - col_stop: 15 - path: compiler-test - content: " return a.x == 10u32 == y;" - right: - Value: - Integer: - - U32 - - "10" - - line_start: 17 - line_stop: 17 - col_start: 19 - col_stop: 24 - path: compiler-test - content: " return a.x == 10u32 == y;" - op: Eq - span: - line_start: 17 - line_stop: 17 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return a.x == 10u32 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" - op: Eq - span: - line_start: 17 - line_stop: 17 - col_start: 12 - col_stop: 29 - path: compiler-test - content: " return a.x == 10u32 == y;" - span: - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 29 - path: compiler-test - content: " return a.x == 10u32 == y;" - span: - line_start: 12 - line_stop: 18 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 12 - line_stop: 18 - 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\\\":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\":\"foo\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function foo(mut self) {\\\"}\"}" - input: - - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function foo(mut self) {\\\"}\"}" - 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.x = 10;\\\"}\"}" - accesses: - - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.x = 10;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " self.x = 10;" - value: - Value: - Integer: - - U32 - - "10" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 20 - path: compiler-test - content: " self.x = 10;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 20 - path: compiler-test - content: " self.x = 10;" - span: - line_start: 6 - line_stop: 8 - col_start: 28 - col_stop: 6 - path: compiler-test - content: " function foo(mut self) {\n...\n }" - span: - line_start: 6 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " function foo(mut self) {\n...\n }" - global_consts: {} - functions: - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 12 - line_stop: 12 - 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\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = Foo { x: 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\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - members: - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - expression: - Value: - Integer: - - U32 - - "1" - - line_start: 13 - line_stop: 13 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " let a = Foo { x: 1 };" - span: - line_start: 13 - line_stop: 13 - col_start: 13 - col_stop: 25 - path: compiler-test - content: " let a = Foo { x: 1 };" - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " let a = Foo { x: 1 };" - - Expression: - expression: - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.foo();\\\"}\"}" - name: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.foo();\\\"}\"}" - span: - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 10 - path: compiler-test - content: " a.foo();" - arguments: [] - span: - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " a.foo();" - span: - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " a.foo();" - - Return: - expression: - Binary: - left: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" - span: - line_start: 17 - line_stop: 17 - col_start: 12 - col_stop: 15 - path: compiler-test - content: " return a.x == 10u32 == y;" - right: - Value: - Integer: - - U32 - - "10" - - line_start: 17 - line_stop: 17 - col_start: 19 - col_stop: 24 - path: compiler-test - content: " return a.x == 10u32 == y;" - op: Eq - span: - line_start: 17 - line_stop: 17 - col_start: 12 - col_stop: 24 - path: compiler-test - content: " return a.x == 10u32 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 10u32 == y;\\\"}\"}" - op: Eq - span: - line_start: 17 - line_stop: 17 - col_start: 12 - col_stop: 29 - path: compiler-test - content: " return a.x == 10u32 == y;" - span: - line_start: 17 - line_stop: 17 - col_start: 5 - col_stop: 29 - path: compiler-test - content: " return a.x == 10u32 == y;" - span: - line_start: 12 - line_stop: 18 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 12 - line_stop: 18 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n" + initial_theorem: 09811b7139b1e3d054587ec093048299a1f7d9788b0231d933a357a8cb2074d2 + canonicalized_theorem: 884e0994056c967adad5f7ffbd296836ecd2628ab74b68bd2702269afab56177 + type_inferenced_theorem: 90820536767ea35ea4ce32dcbee1c7d290deb14475ef019a8c6c690df21f8dc1 diff --git a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out index ed52135684..9f96a4f0b7 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out @@ -16,519 +16,6 @@ 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\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 8 - line_stop: 8 - 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\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = Foo { x: 1 };" - type_: ~ - value: - CircuitInit: - name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - members: - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - expression: - Value: - Implicit: - - "1" - - line_start: 9 - line_stop: 9 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " let a = Foo { x: 1 };" - span: - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 25 - path: compiler-test - content: " let a = Foo { x: 1 };" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " let a = Foo { x: 1 };" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.x = 0;\\\"}\"}" - accesses: - - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.x = 0;\\\"}\"}" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " a.x = 0;" - value: - Value: - Implicit: - - "0" - - line_start: 10 - line_stop: 10 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a.x = 0;" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " a.x = 0;" - - Return: - expression: - Binary: - left: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" - span: - line_start: 12 - line_stop: 12 - col_start: 12 - col_stop: 15 - path: compiler-test - content: " return a.x == 0u32 == y;" - right: - Value: - Integer: - - U32 - - "0" - - line_start: 12 - line_stop: 12 - col_start: 19 - col_stop: 23 - path: compiler-test - content: " return a.x == 0u32 == y;" - op: Eq - span: - line_start: 12 - line_stop: 12 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a.x == 0u32 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" - op: Eq - span: - line_start: 12 - line_stop: 12 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return a.x == 0u32 == y;" - span: - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 28 - path: compiler-test - content: " return a.x == 0u32 == y;" - span: - line_start: 8 - line_stop: 13 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}" - span: - line_start: 8 - line_stop: 13 - 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\":\"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\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 8 - line_stop: 8 - 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\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = Foo { x: 1 };" - type_: ~ - value: - CircuitInit: - name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - members: - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - expression: - Value: - Implicit: - - "1" - - line_start: 9 - line_stop: 9 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " let a = Foo { x: 1 };" - span: - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 25 - path: compiler-test - content: " let a = Foo { x: 1 };" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " let a = Foo { x: 1 };" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.x = 0;\\\"}\"}" - accesses: - - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.x = 0;\\\"}\"}" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " a.x = 0;" - value: - Value: - Implicit: - - "0" - - line_start: 10 - line_stop: 10 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a.x = 0;" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " a.x = 0;" - - Return: - expression: - Binary: - left: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" - span: - line_start: 12 - line_stop: 12 - col_start: 12 - col_stop: 15 - path: compiler-test - content: " return a.x == 0u32 == y;" - right: - Value: - Integer: - - U32 - - "0" - - line_start: 12 - line_stop: 12 - col_start: 19 - col_stop: 23 - path: compiler-test - content: " return a.x == 0u32 == y;" - op: Eq - span: - line_start: 12 - line_stop: 12 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a.x == 0u32 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" - op: Eq - span: - line_start: 12 - line_stop: 12 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return a.x == 0u32 == y;" - span: - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 28 - path: compiler-test - content: " return a.x == 0u32 == y;" - span: - line_start: 8 - line_stop: 13 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}" - span: - line_start: 8 - line_stop: 13 - 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\":\"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\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool{\\\"}\"}" - const_: false - mutable: true - type_: Boolean - span: - line_start: 8 - line_stop: 8 - 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\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = Foo { x: 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\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - members: - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: 1 };\\\"}\"}" - expression: - Value: - Integer: - - U32 - - "1" - - line_start: 9 - line_stop: 9 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " let a = Foo { x: 1 };" - span: - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 25 - path: compiler-test - content: " let a = Foo { x: 1 };" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " let a = Foo { x: 1 };" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.x = 0;\\\"}\"}" - accesses: - - Member: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a.x = 0;\\\"}\"}" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 8 - path: compiler-test - content: " a.x = 0;" - value: - Value: - Integer: - - U32 - - "0" - - line_start: 10 - line_stop: 10 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " a.x = 0;" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " a.x = 0;" - - Return: - expression: - Binary: - left: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" - span: - line_start: 12 - line_stop: 12 - col_start: 12 - col_stop: 15 - path: compiler-test - content: " return a.x == 0u32 == y;" - right: - Value: - Integer: - - U32 - - "0" - - line_start: 12 - line_stop: 12 - col_start: 19 - col_stop: 23 - path: compiler-test - content: " return a.x == 0u32 == y;" - op: Eq - span: - line_start: 12 - line_stop: 12 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return a.x == 0u32 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 0u32 == y;\\\"}\"}" - op: Eq - span: - line_start: 12 - line_stop: 12 - col_start: 12 - col_stop: 28 - path: compiler-test - content: " return a.x == 0u32 == y;" - span: - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 28 - path: compiler-test - content: " return a.x == 0u32 == y;" - span: - line_start: 8 - line_stop: 13 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}" - span: - line_start: 8 - line_stop: 13 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool{\n...\n}\n\n\n" + initial_theorem: ddc8a4de9bd1763a20e5b54638eeb794e8f7d21d3f7f1be7ebaf9fcdc1cddf5a + canonicalized_theorem: ddc8a4de9bd1763a20e5b54638eeb794e8f7d21d3f7f1be7ebaf9fcdc1cddf5a + type_inferenced_theorem: 99c9a07da06e125a6fc44693772a5d9aacbd38319c9f44e37b47f4e2e1b65c56 diff --git a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out index 5ef955cba7..2902194b6c 100644 --- a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out @@ -16,634 +16,6 @@ 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: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = 100i8;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let x = 100i8;" - type_: ~ - value: - Value: - Integer: - - I8 - - "100" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 18 - path: compiler-test - content: " let x = 100i8;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " let x = 100i8;" - - Conditional: - condition: - Value: - Boolean: - - "false" - - line_start: 5 - line_stop: 5 - col_start: 8 - col_stop: 13 - path: compiler-test - content: " if false {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x = 1i8;\\\"}\"}" - accesses: [] - span: - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " x = 1i8;" - value: - Value: - Integer: - - I8 - - "1" - - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " x = 1i8;" - span: - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 16 - path: compiler-test - content: " x = 1i8;" - - Assign: - operation: Mul - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x *= 100i8;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " x *= 100i8;" - value: - Value: - Integer: - - I8 - - "100" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 19 - path: compiler-test - content: " x *= 100i8;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 19 - path: compiler-test - content: " x *= 100i8;" - span: - line_start: 5 - line_stop: 8 - col_start: 14 - col_stop: 6 - path: compiler-test - content: " if false {\n...\n }" - next: ~ - span: - line_start: 5 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if false {\n...\n }\n" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == 100i8 == y;\\\"}\"}" - right: - Value: - Integer: - - I8 - - "100" - - line_start: 10 - line_stop: 10 - col_start: 17 - col_stop: 22 - path: compiler-test - content: " return x == 100i8 == y;" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return x == 100i8 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == 100i8 == y;\\\"}\"}" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 27 - path: compiler-test - content: " return x == 100i8 == y;" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " return x == 100i8 == y;" - span: - line_start: 3 - line_stop: 11 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 11 - 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\":\"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\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = 100i8;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let x = 100i8;" - type_: ~ - value: - Value: - Integer: - - I8 - - "100" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 18 - path: compiler-test - content: " let x = 100i8;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " let x = 100i8;" - - Conditional: - condition: - Value: - Boolean: - - "false" - - line_start: 5 - line_stop: 5 - col_start: 8 - col_stop: 13 - path: compiler-test - content: " if false {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x = 1i8;\\\"}\"}" - accesses: [] - span: - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " x = 1i8;" - value: - Value: - Integer: - - I8 - - "1" - - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " x = 1i8;" - span: - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 16 - path: compiler-test - content: " x = 1i8;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x *= 100i8;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " x *= 100i8;" - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x *= 100i8;\\\"}\"}" - right: - Value: - Integer: - - I8 - - "100" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 19 - path: compiler-test - content: " x *= 100i8;" - op: Mul - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 19 - path: compiler-test - content: " x *= 100i8;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 19 - path: compiler-test - content: " x *= 100i8;" - span: - line_start: 5 - line_stop: 8 - col_start: 14 - col_stop: 6 - path: compiler-test - content: " if false {\n...\n }" - next: ~ - span: - line_start: 5 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if false {\n...\n }\n" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == 100i8 == y;\\\"}\"}" - right: - Value: - Integer: - - I8 - - "100" - - line_start: 10 - line_stop: 10 - col_start: 17 - col_stop: 22 - path: compiler-test - content: " return x == 100i8 == y;" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return x == 100i8 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == 100i8 == y;\\\"}\"}" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 27 - path: compiler-test - content: " return x == 100i8 == y;" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " return x == 100i8 == y;" - span: - line_start: 3 - line_stop: 11 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 11 - 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\":\"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\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = 100i8;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let x = 100i8;" - type_: - IntegerType: I8 - value: - Value: - Integer: - - I8 - - "100" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 18 - path: compiler-test - content: " let x = 100i8;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " let x = 100i8;" - - Conditional: - condition: - Value: - Boolean: - - "false" - - line_start: 5 - line_stop: 5 - col_start: 8 - col_stop: 13 - path: compiler-test - content: " if false {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x = 1i8;\\\"}\"}" - accesses: [] - span: - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " x = 1i8;" - value: - Value: - Integer: - - I8 - - "1" - - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " x = 1i8;" - span: - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 16 - path: compiler-test - content: " x = 1i8;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x *= 100i8;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " x *= 100i8;" - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x *= 100i8;\\\"}\"}" - right: - Value: - Integer: - - I8 - - "100" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 19 - path: compiler-test - content: " x *= 100i8;" - op: Mul - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 19 - path: compiler-test - content: " x *= 100i8;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 19 - path: compiler-test - content: " x *= 100i8;" - span: - line_start: 5 - line_stop: 8 - col_start: 14 - col_stop: 6 - path: compiler-test - content: " if false {\n...\n }" - next: ~ - span: - line_start: 5 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if false {\n...\n }\n" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == 100i8 == y;\\\"}\"}" - right: - Value: - Integer: - - I8 - - "100" - - line_start: 10 - line_stop: 10 - col_start: 17 - col_stop: 22 - path: compiler-test - content: " return x == 100i8 == y;" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return x == 100i8 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == 100i8 == y;\\\"}\"}" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 27 - path: compiler-test - content: " return x == 100i8 == y;" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " return x == 100i8 == y;" - span: - line_start: 3 - line_stop: 11 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 11 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n" + initial_theorem: a9207ae29648b97abbe861a05cd15c12ab0172f9e603d5a1a456cd8fa58ffa58 + canonicalized_theorem: 355e3102cfb3505224a3bebb9b45e592c7bc63cb192f3252d2797019f2a98b55 + type_inferenced_theorem: ab2e29b1be43c0eded824789ecf869308ef3a88fa4a9c88dabf321f66b3793f4 diff --git a/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out b/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out index 8d67dea046..c23c0093fe 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out @@ -16,300 +16,6 @@ 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: 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(a: bool) -> 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: 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(a: bool) -> bool {" - output: Boolean - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a = true;\\\"}\"}" - accesses: [] - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a = true;" - value: - Value: - Boolean: - - "true" - - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 13 - path: compiler-test - content: " a = true;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " a = true;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true;\\\"}\"}" - right: - Value: - Boolean: - - "true" - - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " return a == true;" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == true;" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " return a == true;" - span: - line_start: 4 - line_stop: 8 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(a: bool) -> bool {\n...\n}" - span: - line_start: 4 - line_stop: 8 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: bool) -> bool {\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: 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(a: bool) -> 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: 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(a: bool) -> bool {" - output: Boolean - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a = true;\\\"}\"}" - accesses: [] - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a = true;" - value: - Value: - Boolean: - - "true" - - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 13 - path: compiler-test - content: " a = true;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " a = true;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true;\\\"}\"}" - right: - Value: - Boolean: - - "true" - - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " return a == true;" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == true;" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " return a == true;" - span: - line_start: 4 - line_stop: 8 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(a: bool) -> bool {\n...\n}" - span: - line_start: 4 - line_stop: 8 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: bool) -> bool {\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: 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(a: bool) -> 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: 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(a: bool) -> bool {" - output: Boolean - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a = true;\\\"}\"}" - accesses: [] - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a = true;" - value: - Value: - Boolean: - - "true" - - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 13 - path: compiler-test - content: " a = true;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " a = true;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true;\\\"}\"}" - right: - Value: - Boolean: - - "true" - - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " return a == true;" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == true;" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 21 - path: compiler-test - content: " return a == true;" - span: - line_start: 4 - line_stop: 8 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(a: bool) -> bool {\n...\n}" - span: - line_start: 4 - line_stop: 8 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: bool) -> bool {\n...\n}\n\n" + initial_theorem: e56a274a8a6081b07198b7562c14249df37e45aac1ed6c122da737325282b8ff + canonicalized_theorem: e56a274a8a6081b07198b7562c14249df37e45aac1ed6c122da737325282b8ff + type_inferenced_theorem: 6777bfacec09af0204e90fc2a071172451ff22dfbdadbf0854c593f18adb04f7 diff --git a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out index d4a6667259..7ca5fae992 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out @@ -16,434 +16,6 @@ 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: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = 1u32;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = 1u32;" - type_: ~ - value: - Value: - Integer: - - U32 - - "1" - - line_start: 5 - line_stop: 5 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " let a = 1u32;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " let a = 1u32;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a = 0;\\\"}\"}" - accesses: [] - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a = 0;" - value: - Value: - Implicit: - - "0" - - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " a = 0;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 10 - path: compiler-test - content: " a = 0;" - - 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 == 0u32 == y;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "0" - - line_start: 8 - line_stop: 8 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " return a == 0u32 == y;" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == 0u32 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 0u32 == y;\\\"}\"}" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 26 - path: compiler-test - content: " return a == 0u32 == y;" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " return a == 0u32 == 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: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = 1u32;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = 1u32;" - type_: ~ - value: - Value: - Integer: - - U32 - - "1" - - line_start: 5 - line_stop: 5 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " let a = 1u32;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " let a = 1u32;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a = 0;\\\"}\"}" - accesses: [] - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a = 0;" - value: - Value: - Implicit: - - "0" - - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " a = 0;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 10 - path: compiler-test - content: " a = 0;" - - 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 == 0u32 == y;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "0" - - line_start: 8 - line_stop: 8 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " return a == 0u32 == y;" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == 0u32 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 0u32 == y;\\\"}\"}" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 26 - path: compiler-test - content: " return a == 0u32 == y;" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " return a == 0u32 == 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: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = 1u32;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = 1u32;" - type_: - IntegerType: U32 - value: - Value: - Integer: - - U32 - - "1" - - line_start: 5 - line_stop: 5 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " let a = 1u32;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " let a = 1u32;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a = 0;\\\"}\"}" - accesses: [] - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " a = 0;" - value: - Value: - Integer: - - U32 - - "0" - - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " a = 0;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 10 - path: compiler-test - content: " a = 0;" - - 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 == 0u32 == y;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "0" - - line_start: 8 - line_stop: 8 - col_start: 17 - col_stop: 21 - path: compiler-test - content: " return a == 0u32 == y;" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 21 - path: compiler-test - content: " return a == 0u32 == y;" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 0u32 == y;\\\"}\"}" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 26 - path: compiler-test - content: " return a == 0u32 == y;" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 26 - path: compiler-test - content: " return a == 0u32 == 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" + initial_theorem: b61356db00ef2217c5c933775a7084d14ace8a2217711dea31f787ec2ab6d556 + canonicalized_theorem: b61356db00ef2217c5c933775a7084d14ace8a2217711dea31f787ec2ab6d556 + type_inferenced_theorem: 17602e0e37607962b5551471e898481671ac1771e6aa5993cf2e0959617f5397 diff --git a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out index 95f6bef0b2..5a45a3689e 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out @@ -16,541 +16,6 @@ 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: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = 2u8;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let x = 2u8;" - type_: ~ - value: - Value: - Integer: - - U8 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " let x = 2u8;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 16 - path: compiler-test - content: " let x = 2u8;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let y = x;" - type_: ~ - value: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " let y = x;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let z = y / 2u8;\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let z = y / 2u8;" - type_: ~ - value: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let z = y / 2u8;\\\"}\"}" - right: - Value: - Integer: - - U8 - - "2" - - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 20 - path: compiler-test - content: " let z = y / 2u8;" - op: Div - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 20 - path: compiler-test - content: " let z = y / 2u8;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 20 - path: compiler-test - content: " let z = y / 2u8;" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return z == 1 == a;\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return z == 1 == a;" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return z == 1 == a;" - right: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return z == 1 == a;\\\"}\"}" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return z == 1 == a;" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return z == 1 == a;" - span: - line_start: 3 - line_stop: 8 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(a: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 8 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: 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(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: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = 2u8;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let x = 2u8;" - type_: ~ - value: - Value: - Integer: - - U8 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " let x = 2u8;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 16 - path: compiler-test - content: " let x = 2u8;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let y = x;" - type_: ~ - value: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " let y = x;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let z = y / 2u8;\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let z = y / 2u8;" - type_: ~ - value: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let z = y / 2u8;\\\"}\"}" - right: - Value: - Integer: - - U8 - - "2" - - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 20 - path: compiler-test - content: " let z = y / 2u8;" - op: Div - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 20 - path: compiler-test - content: " let z = y / 2u8;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 20 - path: compiler-test - content: " let z = y / 2u8;" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return z == 1 == a;\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return z == 1 == a;" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return z == 1 == a;" - right: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return z == 1 == a;\\\"}\"}" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return z == 1 == a;" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return z == 1 == a;" - span: - line_start: 3 - line_stop: 8 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(a: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 8 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: 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(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: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = 2u8;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let x = 2u8;" - type_: - IntegerType: U8 - value: - Value: - Integer: - - U8 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " let x = 2u8;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 16 - path: compiler-test - content: " let x = 2u8;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let y = x;" - type_: - IntegerType: U8 - value: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " let y = x;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let z = y / 2u8;\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let z = y / 2u8;" - type_: - IntegerType: U8 - value: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let z = y / 2u8;\\\"}\"}" - right: - Value: - Integer: - - U8 - - "2" - - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 20 - path: compiler-test - content: " let z = y / 2u8;" - op: Div - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 20 - path: compiler-test - content: " let z = y / 2u8;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 20 - path: compiler-test - content: " let z = y / 2u8;" - - Return: - expression: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return z == 1 == a;\\\"}\"}" - right: - Value: - Integer: - - U8 - - "1" - - line_start: 7 - line_stop: 7 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return z == 1 == a;" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return z == 1 == a;" - right: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return z == 1 == a;\\\"}\"}" - op: Eq - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return z == 1 == a;" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " return z == 1 == a;" - span: - line_start: 3 - line_stop: 8 - col_start: 32 - col_stop: 2 - path: compiler-test - content: "function main(a: bool) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 8 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: bool) -> bool {\n...\n}\n\n\n" + initial_theorem: f061374b47c64a1f6649d5d64d3b8a64bb295d396912bade8bfd2cc2f609c442 + canonicalized_theorem: f061374b47c64a1f6649d5d64d3b8a64bb295d396912bade8bfd2cc2f609c442 + type_inferenced_theorem: 8f4dd4f3e9fd63f3ef225a58252d97591f753ffef71bb21c7d6e8596ad0f5a15 diff --git a/tests/expectations/compiler/compiler/mutability/swap.leo.out b/tests/expectations/compiler/compiler/mutability/swap.leo.out index 9c8c58d0ec..0661cd7dee 100644 --- a/tests/expectations/compiler/compiler/mutability/swap.leo.out +++ b/tests/expectations/compiler/compiler/mutability/swap.leo.out @@ -16,1317 +16,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: U32 - - - value: "2" - span: - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" - - Variable: - identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" - const_: true - mutable: false - type_: - IntegerType: U32 - span: - line_start: 4 - line_stop: 4 - col_start: 34 - col_stop: 35 - path: compiler-test - content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" - - Variable: - identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":48,\\\"col_stop\\\":49,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" - const_: true - mutable: false - type_: - IntegerType: U32 - span: - line_start: 4 - line_stop: 4 - col_start: 48 - col_stop: 49 - path: compiler-test - content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" - output: - Array: - - IntegerType: U32 - - - value: "2" - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"t\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let t = a[i];" - type_: ~ - value: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" - index: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " let t = a[i];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " let t = a[i];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" - accesses: - - ArrayIndex: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " a[i] = a[j];" - value: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" - index: - Identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " a[i] = a[j];" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 16 - path: compiler-test - content: " a[i] = a[j];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" - accesses: - - ArrayIndex: - Identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " a[j] = t;" - value: - Identifier: "{\"name\":\"t\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " a[j] = t;" - - Return: - expression: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " return a;" - span: - line_start: 4 - line_stop: 9 - col_start: 68 - col_stop: 2 - path: compiler-test - content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\n...\n}" - span: - line_start: 4 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\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(arr: [u32; 2]) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(arr: [u32; 2]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(arr: [u32; 2]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: U32 - - - value: "2" - span: - line_start: 11 - line_stop: 11 - col_start: 15 - col_stop: 18 - path: compiler-test - content: "function main(arr: [u32; 2]) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const expected: [u32; 2] = [1, 0];\\\"}\"}" - span: - line_start: 12 - line_stop: 12 - col_start: 11 - col_stop: 19 - path: compiler-test - content: " const expected: [u32; 2] = [1, 0];" - type_: - Array: - - IntegerType: U32 - - - value: "2" - value: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "1" - - line_start: 12 - line_stop: 12 - col_start: 33 - col_stop: 34 - path: compiler-test - content: " const expected: [u32; 2] = [1, 0];" - - Expression: - Value: - Implicit: - - "0" - - line_start: 12 - line_stop: 12 - col_start: 36 - col_stop: 37 - path: compiler-test - content: " const expected: [u32; 2] = [1, 0];" - span: - line_start: 12 - line_stop: 12 - col_start: 32 - col_stop: 38 - path: compiler-test - content: " const expected: [u32; 2] = [1, 0];" - span: - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 38 - path: compiler-test - content: " const expected: [u32; 2] = [1, 0];" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " let actual = swap(arr, 0, 1);" - type_: ~ - value: - Call: - function: - Identifier: "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" - arguments: - - Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" - - Value: - Implicit: - - "0" - - line_start: 13 - line_stop: 13 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " let actual = swap(arr, 0, 1);" - - Value: - Implicit: - - "1" - - line_start: 13 - line_stop: 13 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " let actual = swap(arr, 0, 1);" - span: - line_start: 13 - line_stop: 13 - col_start: 18 - col_stop: 33 - path: compiler-test - content: " let actual = swap(arr, 0, 1);" - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 33 - path: compiler-test - content: " let actual = swap(arr, 0, 1);" - - Return: - expression: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 16 - line_stop: 16 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 16 - line_stop: 16 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - right: - ArrayAccess: - array: - Identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":27,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 16 - line_stop: 16 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 16 - line_stop: 16 - col_start: 27 - col_stop: 36 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - op: Eq - span: - line_start: 16 - line_stop: 16 - col_start: 12 - col_stop: 36 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - right: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":40,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 16 - line_stop: 16 - col_start: 49 - col_stop: 50 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 16 - line_stop: 16 - col_start: 40 - col_stop: 51 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - right: - ArrayAccess: - array: - Identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":55,\\\"col_stop\\\":61,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 16 - line_stop: 16 - col_start: 62 - col_stop: 63 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 16 - line_stop: 16 - col_start: 55 - col_stop: 64 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - op: Eq - span: - line_start: 16 - line_stop: 16 - col_start: 40 - col_stop: 64 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - op: And - span: - line_start: 16 - line_stop: 16 - col_start: 12 - col_stop: 64 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 64 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 11 - line_stop: 17 - col_start: 38 - col_stop: 2 - path: compiler-test - content: "function main(arr: [u32; 2]) -> bool {\n...\n}" - span: - line_start: 11 - line_stop: 17 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(arr: [u32; 2]) -> bool {\n...\n}\n\n\n\n" - canonicalized_theorem: - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: U32 - - - value: "2" - span: - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" - - Variable: - identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" - const_: true - mutable: false - type_: - IntegerType: U32 - span: - line_start: 4 - line_stop: 4 - col_start: 34 - col_stop: 35 - path: compiler-test - content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" - - Variable: - identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":48,\\\"col_stop\\\":49,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" - const_: true - mutable: false - type_: - IntegerType: U32 - span: - line_start: 4 - line_stop: 4 - col_start: 48 - col_stop: 49 - path: compiler-test - content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" - output: - Array: - - IntegerType: U32 - - - value: "2" - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"t\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let t = a[i];" - type_: ~ - value: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" - index: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " let t = a[i];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " let t = a[i];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" - accesses: - - ArrayIndex: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " a[i] = a[j];" - value: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" - index: - Identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " a[i] = a[j];" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 16 - path: compiler-test - content: " a[i] = a[j];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" - accesses: - - ArrayIndex: - Identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " a[j] = t;" - value: - Identifier: "{\"name\":\"t\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " a[j] = t;" - - Return: - expression: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " return a;" - span: - line_start: 4 - line_stop: 9 - col_start: 68 - col_stop: 2 - path: compiler-test - content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\n...\n}" - span: - line_start: 4 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\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(arr: [u32; 2]) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(arr: [u32; 2]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(arr: [u32; 2]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: U32 - - - value: "2" - span: - line_start: 11 - line_stop: 11 - col_start: 15 - col_stop: 18 - path: compiler-test - content: "function main(arr: [u32; 2]) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const expected: [u32; 2] = [1, 0];\\\"}\"}" - span: - line_start: 12 - line_stop: 12 - col_start: 11 - col_stop: 19 - path: compiler-test - content: " const expected: [u32; 2] = [1, 0];" - type_: - Array: - - IntegerType: U32 - - - value: "2" - value: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "1" - - line_start: 12 - line_stop: 12 - col_start: 33 - col_stop: 34 - path: compiler-test - content: " const expected: [u32; 2] = [1, 0];" - - Expression: - Value: - Implicit: - - "0" - - line_start: 12 - line_stop: 12 - col_start: 36 - col_stop: 37 - path: compiler-test - content: " const expected: [u32; 2] = [1, 0];" - span: - line_start: 12 - line_stop: 12 - col_start: 32 - col_stop: 38 - path: compiler-test - content: " const expected: [u32; 2] = [1, 0];" - span: - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 38 - path: compiler-test - content: " const expected: [u32; 2] = [1, 0];" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " let actual = swap(arr, 0, 1);" - type_: ~ - value: - Call: - function: - Identifier: "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" - arguments: - - Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" - - Value: - Implicit: - - "0" - - line_start: 13 - line_stop: 13 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " let actual = swap(arr, 0, 1);" - - Value: - Implicit: - - "1" - - line_start: 13 - line_stop: 13 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " let actual = swap(arr, 0, 1);" - span: - line_start: 13 - line_stop: 13 - col_start: 18 - col_stop: 33 - path: compiler-test - content: " let actual = swap(arr, 0, 1);" - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 33 - path: compiler-test - content: " let actual = swap(arr, 0, 1);" - - Return: - expression: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 16 - line_stop: 16 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 16 - line_stop: 16 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - right: - ArrayAccess: - array: - Identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":27,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 16 - line_stop: 16 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 16 - line_stop: 16 - col_start: 27 - col_stop: 36 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - op: Eq - span: - line_start: 16 - line_stop: 16 - col_start: 12 - col_stop: 36 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - right: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":40,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 16 - line_stop: 16 - col_start: 49 - col_stop: 50 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 16 - line_stop: 16 - col_start: 40 - col_stop: 51 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - right: - ArrayAccess: - array: - Identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":55,\\\"col_stop\\\":61,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 16 - line_stop: 16 - col_start: 62 - col_stop: 63 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 16 - line_stop: 16 - col_start: 55 - col_stop: 64 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - op: Eq - span: - line_start: 16 - line_stop: 16 - col_start: 40 - col_stop: 64 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - op: And - span: - line_start: 16 - line_stop: 16 - col_start: 12 - col_stop: 64 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 64 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 11 - line_stop: 17 - col_start: 38 - col_stop: 2 - path: compiler-test - content: "function main(arr: [u32; 2]) -> bool {\n...\n}" - span: - line_start: 11 - line_stop: 17 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(arr: [u32; 2]) -> bool {\n...\n}\n\n\n\n" - type_inferenced_theorem: - name: test - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: U32 - - - value: "2" - span: - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" - - Variable: - identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" - const_: true - mutable: false - type_: - IntegerType: U32 - span: - line_start: 4 - line_stop: 4 - col_start: 34 - col_stop: 35 - path: compiler-test - content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" - - Variable: - identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":48,\\\"col_stop\\\":49,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\\\"}\"}" - const_: true - mutable: false - type_: - IntegerType: U32 - span: - line_start: 4 - line_stop: 4 - col_start: 48 - col_stop: 49 - path: compiler-test - content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {" - output: - Array: - - IntegerType: U32 - - - value: "2" - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"t\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let t = a[i];" - type_: - IntegerType: U32 - value: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" - index: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let t = a[i];\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " let t = a[i];" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " let t = a[i];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" - accesses: - - ArrayIndex: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " a[i] = a[j];" - value: - ArrayAccess: - array: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" - index: - Identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[i] = a[j];\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 16 - path: compiler-test - content: " a[i] = a[j];" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 16 - path: compiler-test - content: " a[i] = a[j];" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" - accesses: - - ArrayIndex: - Identifier: "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 9 - path: compiler-test - content: " a[j] = t;" - value: - Identifier: "{\"name\":\"t\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a[j] = t;\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " a[j] = t;" - - Return: - expression: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 13 - path: compiler-test - content: " return a;" - span: - line_start: 4 - line_stop: 9 - col_start: 68 - col_stop: 2 - path: compiler-test - content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\n...\n}" - span: - line_start: 4 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] {\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(arr: [u32; 2]) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(arr: [u32; 2]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(arr: [u32; 2]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: U32 - - - value: "2" - span: - line_start: 11 - line_stop: 11 - col_start: 15 - col_stop: 18 - path: compiler-test - content: "function main(arr: [u32; 2]) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const expected: [u32; 2] = [1, 0];\\\"}\"}" - span: - line_start: 12 - line_stop: 12 - col_start: 11 - col_stop: 19 - path: compiler-test - content: " const expected: [u32; 2] = [1, 0];" - type_: - Array: - - IntegerType: U32 - - - value: "2" - value: - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U32 - - "1" - - line_start: 12 - line_stop: 12 - col_start: 33 - col_stop: 34 - path: compiler-test - content: " const expected: [u32; 2] = [1, 0];" - - Expression: - Value: - Integer: - - U32 - - "0" - - line_start: 12 - line_stop: 12 - col_start: 36 - col_stop: 37 - path: compiler-test - content: " const expected: [u32; 2] = [1, 0];" - span: - line_start: 12 - line_stop: 12 - col_start: 32 - col_stop: 38 - path: compiler-test - content: " const expected: [u32; 2] = [1, 0];" - span: - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 38 - path: compiler-test - content: " const expected: [u32; 2] = [1, 0];" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " let actual = swap(arr, 0, 1);" - type_: - Array: - - IntegerType: U32 - - - value: "2" - value: - Call: - function: - Identifier: "{\"name\":\"swap\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" - arguments: - - Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let actual = swap(arr, 0, 1);\\\"}\"}" - - Value: - Integer: - - U32 - - "0" - - line_start: 13 - line_stop: 13 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " let actual = swap(arr, 0, 1);" - - Value: - Integer: - - U32 - - "1" - - line_start: 13 - line_stop: 13 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " let actual = swap(arr, 0, 1);" - span: - line_start: 13 - line_stop: 13 - col_start: 18 - col_stop: 33 - path: compiler-test - content: " let actual = swap(arr, 0, 1);" - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 33 - path: compiler-test - content: " let actual = swap(arr, 0, 1);" - - Return: - expression: - Binary: - left: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 16 - line_stop: 16 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 16 - line_stop: 16 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - right: - ArrayAccess: - array: - Identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":27,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" - index: - Value: - Integer: - - U32 - - "0" - - line_start: 16 - line_stop: 16 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 16 - line_stop: 16 - col_start: 27 - col_stop: 36 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - op: Eq - span: - line_start: 16 - line_stop: 16 - col_start: 12 - col_stop: 36 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - right: - Binary: - left: - ArrayAccess: - array: - Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":40,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" - index: - Value: - Integer: - - U32 - - "1" - - line_start: 16 - line_stop: 16 - col_start: 49 - col_stop: 50 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 16 - line_stop: 16 - col_start: 40 - col_stop: 51 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - right: - ArrayAccess: - array: - Identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":55,\\\"col_stop\\\":61,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected[0] == actual[0] && expected[1] == actual[1];\\\"}\"}" - index: - Value: - Integer: - - U32 - - "1" - - line_start: 16 - line_stop: 16 - col_start: 62 - col_stop: 63 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 16 - line_stop: 16 - col_start: 55 - col_stop: 64 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - op: Eq - span: - line_start: 16 - line_stop: 16 - col_start: 40 - col_stop: 64 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - op: And - span: - line_start: 16 - line_stop: 16 - col_start: 12 - col_stop: 64 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 64 - path: compiler-test - content: " return expected[0] == actual[0] && expected[1] == actual[1];" - span: - line_start: 11 - line_stop: 17 - col_start: 38 - col_stop: 2 - path: compiler-test - content: "function main(arr: [u32; 2]) -> bool {\n...\n}" - span: - line_start: 11 - line_stop: 17 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(arr: [u32; 2]) -> bool {\n...\n}\n\n\n\n" + initial_theorem: 17828ff8ffc7902cfe67b7816477cf3099c248f7fde312a9792dd311814340c6 + canonicalized_theorem: 17828ff8ffc7902cfe67b7816477cf3099c248f7fde312a9792dd311814340c6 + type_inferenced_theorem: be55144bf090bcfc6d49170844c89b067b224b241fd953b0b683c70b91baaad4 diff --git a/tests/expectations/compiler/compiler/statements/block.leo.out b/tests/expectations/compiler/compiler/statements/block.leo.out index 5b3d59b5d3..e127588d65 100644 --- a/tests/expectations/compiler/compiler/statements/block.leo.out +++ b/tests/expectations/compiler/compiler/statements/block.leo.out @@ -16,425 +16,6 @@ outputs: a: 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> 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 = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let y = x;" - type_: ~ - value: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " let y = x;" - - Block: - statements: - - Assign: - operation: Add - assignee: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y += 5u32;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " y += 5u32;" - value: - Value: - Integer: - - U32 - - "5" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " y += 5u32;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 18 - path: compiler-test - content: " y += 5u32;" - span: - line_start: 6 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " {\n...\n }" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 8;\\\"}\"}" - right: - Value: - Implicit: - - "8" - - line_start: 10 - line_stop: 10 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return y == 8;" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return y == 8;" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return y == 8;" - span: - line_start: 3 - line_stop: 11 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 11 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> 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 = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let y = x;" - type_: ~ - value: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " let y = x;" - - Block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y += 5u32;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " y += 5u32;" - value: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y += 5u32;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "5" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " y += 5u32;" - op: Add - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 18 - path: compiler-test - content: " y += 5u32;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 18 - path: compiler-test - content: " y += 5u32;" - span: - line_start: 6 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " {\n...\n }" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 8;\\\"}\"}" - right: - Value: - Implicit: - - "8" - - line_start: 10 - line_stop: 10 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return y == 8;" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return y == 8;" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return y == 8;" - span: - line_start: 3 - line_stop: 11 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 11 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> 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 = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let y = x;" - type_: - IntegerType: U32 - value: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " let y = x;" - - Block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y += 5u32;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " y += 5u32;" - value: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y += 5u32;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "5" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " y += 5u32;" - op: Add - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 18 - path: compiler-test - content: " y += 5u32;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 18 - path: compiler-test - content: " y += 5u32;" - span: - line_start: 6 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " {\n...\n }" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 8;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "8" - - line_start: 10 - line_stop: 10 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return y == 8;" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return y == 8;" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return y == 8;" - span: - line_start: 3 - line_stop: 11 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 11 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\n" + initial_theorem: e5ab0d37ae2e0839f9f513f018e8f05fe6f6141962724fb0d84768abb4f155f2 + canonicalized_theorem: 931832fc13e7bbb57ce4a867681cd5c746a5d6bec1eea051e1464b4030f746f4 + type_inferenced_theorem: 932fe676b3460ab2a209d0b5e40359f8fd5e1d603bac1de5a2254eb83b2e1b39 diff --git a/tests/expectations/compiler/compiler/statements/chain.leo.out b/tests/expectations/compiler/compiler/statements/chain.leo.out index 1d31265608..18f6c1efa5 100644 --- a/tests/expectations/compiler/compiler/statements/chain.leo.out +++ b/tests/expectations/compiler/compiler/statements/chain.leo.out @@ -28,819 +28,6 @@ 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let c = 0u32;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let c = 0u32;" - type_: ~ - value: - Value: - Integer: - - U32 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " let c = 0u32;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " let c = 0u32;" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 1 {\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 1 {" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 1 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 1;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " c = 1;" - value: - Value: - Implicit: - - "1" - - line_start: 7 - line_stop: 7 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " c = 1;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " c = 1;" - span: - line_start: 6 - line_stop: 8 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " if x == 1 {\n...\n } else if x == 2 {" - next: - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" } else if x == 2 {\\\"}\"}" - right: - Value: - Implicit: - - "2" - - line_start: 8 - line_stop: 8 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " } else if x == 2 {" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 15 - col_stop: 21 - path: compiler-test - content: " } else if x == 2 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 2;\\\"}\"}" - accesses: [] - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " c = 2;" - value: - Value: - Implicit: - - "2" - - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " c = 2;" - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " c = 2;" - span: - line_start: 8 - line_stop: 10 - col_start: 22 - col_stop: 6 - path: compiler-test - content: " } else if x == 2 {\n...\n } else {" - next: - Block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 3;\\\"}\"}" - accesses: [] - span: - line_start: 11 - line_stop: 11 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " c = 3;" - value: - Value: - Implicit: - - "3" - - line_start: 11 - line_stop: 11 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " c = 3;" - span: - line_start: 11 - line_stop: 11 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " c = 3;" - 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: 12 - col_stop: 6 - path: compiler-test - content: " } else if x == 2 {\n...\n } else {\n...\n }" - span: - line_start: 6 - line_stop: 12 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if x == 1 {\n...\n } else if x == 2 {\n...\n } else {\n...\n }" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return c == x;\\\"}\"}" - right: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return c == x;\\\"}\"}" - op: Eq - span: - line_start: 13 - line_stop: 13 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return c == x;" - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return c == x;" - span: - line_start: 3 - line_stop: 14 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 14 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let c = 0u32;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let c = 0u32;" - type_: ~ - value: - Value: - Integer: - - U32 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " let c = 0u32;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " let c = 0u32;" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 1 {\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 1 {" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 1 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 1;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " c = 1;" - value: - Value: - Implicit: - - "1" - - line_start: 7 - line_stop: 7 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " c = 1;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " c = 1;" - span: - line_start: 6 - line_stop: 8 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " if x == 1 {\n...\n } else if x == 2 {" - next: - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" } else if x == 2 {\\\"}\"}" - right: - Value: - Implicit: - - "2" - - line_start: 8 - line_stop: 8 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " } else if x == 2 {" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 15 - col_stop: 21 - path: compiler-test - content: " } else if x == 2 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 2;\\\"}\"}" - accesses: [] - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " c = 2;" - value: - Value: - Implicit: - - "2" - - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " c = 2;" - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " c = 2;" - span: - line_start: 8 - line_stop: 10 - col_start: 22 - col_stop: 6 - path: compiler-test - content: " } else if x == 2 {\n...\n } else {" - next: - Block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 3;\\\"}\"}" - accesses: [] - span: - line_start: 11 - line_stop: 11 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " c = 3;" - value: - Value: - Implicit: - - "3" - - line_start: 11 - line_stop: 11 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " c = 3;" - span: - line_start: 11 - line_stop: 11 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " c = 3;" - 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: 12 - col_stop: 6 - path: compiler-test - content: " } else if x == 2 {\n...\n } else {\n...\n }" - span: - line_start: 6 - line_stop: 12 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if x == 1 {\n...\n } else if x == 2 {\n...\n } else {\n...\n }" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return c == x;\\\"}\"}" - right: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return c == x;\\\"}\"}" - op: Eq - span: - line_start: 13 - line_stop: 13 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return c == x;" - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return c == x;" - span: - line_start: 3 - line_stop: 14 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 14 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let c = 0u32;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let c = 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 c = 0u32;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " let c = 0u32;" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 1 {\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 1 {" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 1 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 1;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " c = 1;" - value: - Value: - Integer: - - U32 - - "1" - - line_start: 7 - line_stop: 7 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " c = 1;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " c = 1;" - span: - line_start: 6 - line_stop: 8 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " if x == 1 {\n...\n } else if x == 2 {" - next: - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" } else if x == 2 {\\\"}\"}" - right: - Value: - Integer: - - U32 - - "2" - - line_start: 8 - line_stop: 8 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " } else if x == 2 {" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 15 - col_stop: 21 - path: compiler-test - content: " } else if x == 2 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 2;\\\"}\"}" - accesses: [] - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " c = 2;" - value: - Value: - Integer: - - U32 - - "2" - - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " c = 2;" - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " c = 2;" - span: - line_start: 8 - line_stop: 10 - col_start: 22 - col_stop: 6 - path: compiler-test - content: " } else if x == 2 {\n...\n } else {" - next: - Block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" c = 3;\\\"}\"}" - accesses: [] - span: - line_start: 11 - line_stop: 11 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " c = 3;" - value: - Value: - Integer: - - U32 - - "3" - - line_start: 11 - line_stop: 11 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " c = 3;" - span: - line_start: 11 - line_stop: 11 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " c = 3;" - 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: 12 - col_stop: 6 - path: compiler-test - content: " } else if x == 2 {\n...\n } else {\n...\n }" - span: - line_start: 6 - line_stop: 12 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if x == 1 {\n...\n } else if x == 2 {\n...\n } else {\n...\n }" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return c == x;\\\"}\"}" - right: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return c == x;\\\"}\"}" - op: Eq - span: - line_start: 13 - line_stop: 13 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return c == x;" - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return c == x;" - span: - line_start: 3 - line_stop: 14 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 14 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n" + initial_theorem: 2f84a632ff69e9e18a46b5b8f82b9b3fa66d63c5ceab6edbf034c9388ea0f787 + canonicalized_theorem: 2f84a632ff69e9e18a46b5b8f82b9b3fa66d63c5ceab6edbf034c9388ea0f787 + type_inferenced_theorem: feaa875ce4b50aa1d73b92c9bbada7f048bf5db7e0653f46507baacea68a7e30 diff --git a/tests/expectations/compiler/compiler/statements/for_loop.leo.out b/tests/expectations/compiler/compiler/statements/for_loop.leo.out index 6d396482ba..b0140ed1e3 100644 --- a/tests/expectations/compiler/compiler/statements/for_loop.leo.out +++ b/tests/expectations/compiler/compiler/statements/for_loop.leo.out @@ -16,829 +16,6 @@ outputs: a: 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = 0u32;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let b = 0u32;" - type_: ~ - value: - Value: - Integer: - - U32 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " let b = 0u32;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " let b = 0u32;" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" - right: - Value: - Implicit: - - "3" - - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - block: - statements: - - Iteration: - variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..4 {\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " for i in 0..4 {" - stop: - Value: - Implicit: - - "4" - - line_start: 7 - line_stop: 7 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " for i in 0..4 {" - block: - statements: - - Assign: - operation: Add - assignee: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" - accesses: [] - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " b += i;" - value: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " b += i;" - span: - line_start: 7 - line_stop: 9 - col_start: 23 - col_stop: 10 - path: compiler-test - content: " for i in 0..4 {\n...\n }" - span: - line_start: 7 - line_stop: 9 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " for i in 0..4 {\n...\n }" - span: - line_start: 6 - line_stop: 10 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n }" - next: ~ - span: - line_start: 6 - line_stop: 10 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n }\n\n" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r: u32 = x == 3 ? 6 : 0;\\\"}\"}" - span: - line_start: 12 - line_stop: 12 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - type_: - IntegerType: U32 - value: - Ternary: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r: u32 = x == 3 ? 6 : 0;\\\"}\"}" - right: - Value: - Implicit: - - "3" - - line_start: 12 - line_stop: 12 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - op: Eq - span: - line_start: 12 - line_stop: 12 - col_start: 18 - col_stop: 24 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - if_true: - Value: - Implicit: - - "6" - - line_start: 12 - line_stop: 12 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - if_false: - Value: - Implicit: - - "0" - - line_start: 12 - line_stop: 12 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - span: - line_start: 12 - line_stop: 12 - col_start: 18 - col_stop: 32 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - span: - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 32 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == b;\\\"}\"}" - op: Eq - span: - line_start: 14 - line_stop: 14 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == b;" - span: - line_start: 14 - line_stop: 14 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == b;" - span: - line_start: 3 - line_stop: 15 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 15 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = 0u32;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let b = 0u32;" - type_: ~ - value: - Value: - Integer: - - U32 - - "0" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " let b = 0u32;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " let b = 0u32;" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" - right: - Value: - Implicit: - - "3" - - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - block: - statements: - - Iteration: - variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..4 {\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " for i in 0..4 {" - stop: - Value: - Implicit: - - "4" - - line_start: 7 - line_stop: 7 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " for i in 0..4 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" - accesses: [] - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " b += i;" - value: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" - right: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" - op: Add - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " b += i;" - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " b += i;" - span: - line_start: 7 - line_stop: 9 - col_start: 23 - col_stop: 10 - path: compiler-test - content: " for i in 0..4 {\n...\n }" - span: - line_start: 7 - line_stop: 9 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " for i in 0..4 {\n...\n }" - span: - line_start: 6 - line_stop: 10 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n }" - next: ~ - span: - line_start: 6 - line_stop: 10 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n }\n\n" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r: u32 = x == 3 ? 6 : 0;\\\"}\"}" - span: - line_start: 12 - line_stop: 12 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - type_: - IntegerType: U32 - value: - Ternary: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r: u32 = x == 3 ? 6 : 0;\\\"}\"}" - right: - Value: - Implicit: - - "3" - - line_start: 12 - line_stop: 12 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - op: Eq - span: - line_start: 12 - line_stop: 12 - col_start: 18 - col_stop: 24 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - if_true: - Value: - Implicit: - - "6" - - line_start: 12 - line_stop: 12 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - if_false: - Value: - Implicit: - - "0" - - line_start: 12 - line_stop: 12 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - span: - line_start: 12 - line_stop: 12 - col_start: 18 - col_stop: 32 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - span: - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 32 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == b;\\\"}\"}" - op: Eq - span: - line_start: 14 - line_stop: 14 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == b;" - span: - line_start: 14 - line_stop: 14 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == b;" - span: - line_start: 3 - line_stop: 15 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 15 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = 0u32;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let b = 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 b = 0u32;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " let b = 0u32;" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" - right: - Value: - Integer: - - U32 - - "3" - - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - block: - statements: - - Iteration: - variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..4 {\\\"}\"}" - start: - Value: - Integer: - - U32 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " for i in 0..4 {" - stop: - Value: - Integer: - - U32 - - "4" - - line_start: 7 - line_stop: 7 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " for i in 0..4 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" - accesses: [] - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " b += i;" - value: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" - right: - Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b += i;\\\"}\"}" - op: Add - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " b += i;" - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " b += i;" - span: - line_start: 7 - line_stop: 9 - col_start: 23 - col_stop: 10 - path: compiler-test - content: " for i in 0..4 {\n...\n }" - span: - line_start: 7 - line_stop: 9 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " for i in 0..4 {\n...\n }" - span: - line_start: 6 - line_stop: 10 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n }" - next: ~ - span: - line_start: 6 - line_stop: 10 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n }\n\n" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r: u32 = x == 3 ? 6 : 0;\\\"}\"}" - span: - line_start: 12 - line_stop: 12 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - type_: - IntegerType: U32 - value: - Ternary: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let r: u32 = x == 3 ? 6 : 0;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "3" - - line_start: 12 - line_stop: 12 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - op: Eq - span: - line_start: 12 - line_stop: 12 - col_start: 18 - col_stop: 24 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - if_true: - Value: - Integer: - - U32 - - "6" - - line_start: 12 - line_stop: 12 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - if_false: - Value: - Integer: - - U32 - - "0" - - line_start: 12 - line_stop: 12 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - span: - line_start: 12 - line_stop: 12 - col_start: 18 - col_stop: 32 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - span: - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 32 - path: compiler-test - content: " let r: u32 = x == 3 ? 6 : 0;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == b;\\\"}\"}" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return r == b;\\\"}\"}" - op: Eq - span: - line_start: 14 - line_stop: 14 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return r == b;" - span: - line_start: 14 - line_stop: 14 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return r == b;" - span: - line_start: 3 - line_stop: 15 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 15 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n" + initial_theorem: 8374ac96fbf6d918998ebe6ccb88842f2141efbc721314ff1b98a6e57c30ac8c + canonicalized_theorem: 031149b98d685b26166d621c2206142438479414eeae8db5f92927aabca5d684 + type_inferenced_theorem: 94959ec2fc0be13f8943a54261f6c23c6585773bc14936ee68a3f7289cc8bd26 diff --git a/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out b/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out index d1ce78a026..d12ed2d8a0 100644 --- a/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out +++ b/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out @@ -16,512 +16,6 @@ outputs: a: 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> 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 = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let y = x;" - type_: ~ - value: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " let y = x;" - - 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..3 {\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 6 - line_stop: 6 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " for i in 0..3 {" - stop: - Value: - Implicit: - - "3" - - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " for i in 0..3 {" - block: - statements: - - Assign: - operation: Sub - assignee: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " y -= 1;" - value: - Value: - Implicit: - - "1" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - span: - line_start: 6 - line_stop: 8 - col_start: 19 - col_stop: 6 - path: compiler-test - content: " for i in 0..3 {\n...\n }" - span: - line_start: 6 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " for i in 0..3 {\n...\n }" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 0;\\\"}\"}" - right: - Value: - Implicit: - - "0" - - line_start: 10 - line_stop: 10 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return y == 0;" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return y == 0;" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return y == 0;" - span: - line_start: 3 - line_stop: 11 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 11 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> 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 = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let y = x;" - type_: ~ - value: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " let y = x;" - - 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..3 {\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 6 - line_stop: 6 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " for i in 0..3 {" - stop: - Value: - Implicit: - - "3" - - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " for i in 0..3 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " y -= 1;" - value: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - op: Sub - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - span: - line_start: 6 - line_stop: 8 - col_start: 19 - col_stop: 6 - path: compiler-test - content: " for i in 0..3 {\n...\n }" - span: - line_start: 6 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " for i in 0..3 {\n...\n }" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 0;\\\"}\"}" - right: - Value: - Implicit: - - "0" - - line_start: 10 - line_stop: 10 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return y == 0;" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return y == 0;" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return y == 0;" - span: - line_start: 3 - line_stop: 11 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 11 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> 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 = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let y = x;" - type_: - IntegerType: U32 - value: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " let y = x;" - - 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..3 {\\\"}\"}" - 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..3 {" - stop: - Value: - Integer: - - U32 - - "3" - - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " for i in 0..3 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " y -= 1;" - value: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - op: Sub - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - span: - line_start: 6 - line_stop: 8 - col_start: 19 - col_stop: 6 - path: compiler-test - content: " for i in 0..3 {\n...\n }" - span: - line_start: 6 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " for i in 0..3 {\n...\n }" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 0;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "0" - - line_start: 10 - line_stop: 10 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return y == 0;" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return y == 0;" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return y == 0;" - span: - line_start: 3 - line_stop: 11 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 11 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\n" + initial_theorem: 2af258377cc5af8e1bed75bed8dd57d2ecb969f71b8081a321a946df782ead97 + canonicalized_theorem: 8733ab382dd7d3d506f999dd6b34442200e447cb530cc6d8115da6267b176f2e + type_inferenced_theorem: 6f4c12b70f5fb244fbca65cb32e68c88ced6bf289afb7b1639257bb8de9a4bbb diff --git a/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out b/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out index 57647316b5..053c6caeae 100644 --- a/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out +++ b/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out @@ -16,581 +16,6 @@ outputs: a: 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"COUNT\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const COUNT: u32 = 2;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 16 - path: compiler-test - content: " const COUNT: u32 = 2;" - type_: - IntegerType: U32 - value: - Value: - Implicit: - - "2" - - line_start: 4 - line_stop: 4 - col_start: 24 - col_stop: 25 - path: compiler-test - content: " const COUNT: u32 = 2;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " const COUNT: u32 = 2;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let y = x;" - type_: ~ - value: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " let y = x;" - - Iteration: - variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..COUNT {\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " for i in 0..COUNT {" - stop: - Identifier: "{\"name\":\"COUNT\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..COUNT {\\\"}\"}" - block: - statements: - - Assign: - operation: Sub - assignee: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" - accesses: [] - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " y -= 1;" - value: - Value: - Implicit: - - "1" - - line_start: 8 - line_stop: 8 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - span: - line_start: 7 - line_stop: 9 - col_start: 23 - col_stop: 6 - path: compiler-test - content: " for i in 0..COUNT {\n...\n }" - span: - line_start: 7 - line_stop: 9 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " for i in 0..COUNT {\n...\n }" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 1;\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 11 - line_stop: 11 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return y == 1;" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return y == 1;" - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return y == 1;" - span: - line_start: 3 - line_stop: 12 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 12 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"COUNT\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const COUNT: u32 = 2;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 16 - path: compiler-test - content: " const COUNT: u32 = 2;" - type_: - IntegerType: U32 - value: - Value: - Implicit: - - "2" - - line_start: 4 - line_stop: 4 - col_start: 24 - col_stop: 25 - path: compiler-test - content: " const COUNT: u32 = 2;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " const COUNT: u32 = 2;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let y = x;" - type_: ~ - value: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " let y = x;" - - Iteration: - variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..COUNT {\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " for i in 0..COUNT {" - stop: - Identifier: "{\"name\":\"COUNT\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..COUNT {\\\"}\"}" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" - accesses: [] - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " y -= 1;" - value: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 8 - line_stop: 8 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - op: Sub - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - span: - line_start: 7 - line_stop: 9 - col_start: 23 - col_stop: 6 - path: compiler-test - content: " for i in 0..COUNT {\n...\n }" - span: - line_start: 7 - line_stop: 9 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " for i in 0..COUNT {\n...\n }" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 1;\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 11 - line_stop: 11 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return y == 1;" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return y == 1;" - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return y == 1;" - span: - line_start: 3 - line_stop: 12 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 12 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"COUNT\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const COUNT: u32 = 2;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 16 - path: compiler-test - content: " const COUNT: u32 = 2;" - type_: - IntegerType: U32 - value: - Value: - Integer: - - U32 - - "2" - - line_start: 4 - line_stop: 4 - col_start: 24 - col_stop: 25 - path: compiler-test - content: " const COUNT: u32 = 2;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 25 - path: compiler-test - content: " const COUNT: u32 = 2;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let y = x;" - type_: - IntegerType: U32 - value: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = x;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " let y = x;" - - Iteration: - variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..COUNT {\\\"}\"}" - start: - Value: - Integer: - - U32 - - "0" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " for i in 0..COUNT {" - stop: - Identifier: "{\"name\":\"COUNT\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..COUNT {\\\"}\"}" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" - accesses: [] - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " y -= 1;" - value: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" y -= 1;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 8 - line_stop: 8 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - op: Sub - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " y -= 1;" - span: - line_start: 7 - line_stop: 9 - col_start: 23 - col_stop: 6 - path: compiler-test - content: " for i in 0..COUNT {\n...\n }" - span: - line_start: 7 - line_stop: 9 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " for i in 0..COUNT {\n...\n }" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == 1;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 11 - line_stop: 11 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " return y == 1;" - op: Eq - span: - line_start: 11 - line_stop: 11 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return y == 1;" - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return y == 1;" - span: - line_start: 3 - line_stop: 12 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 12 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\n\n" + initial_theorem: 5223011087228b526071851038df390424ca442c4b21e0001cdf14bf8c63cf2c + canonicalized_theorem: ab0a3a3caa5250c522c9eaa4b4bee5e36c179f856b02c2cdf94b4798344daf3d + type_inferenced_theorem: 5825d1694362e1dab8710cbfa4feb608f968a98052a01fa36c152e06c1bd2cc4 diff --git a/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out b/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out index 469bb6ddc6..f9450b88cc 100644 --- a/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out +++ b/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out @@ -22,382 +22,6 @@ 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" - right: - Value: - Implicit: - - "3" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - block: - statements: - - Return: - expression: - Value: - Boolean: - - "true" - - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 20 - path: compiler-test - content: " return true;" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 20 - path: compiler-test - content: " return true;" - span: - line_start: 4 - line_stop: 6 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n } else {" - next: - Block: - statements: - - Return: - expression: - Value: - Boolean: - - "false" - - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 21 - path: compiler-test - content: " return false;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 21 - path: compiler-test - content: " return 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 x == 3 {\n...\n } else {\n...\n }" - span: - line_start: 3 - line_stop: 9 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> 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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" - right: - Value: - Implicit: - - "3" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - block: - statements: - - Return: - expression: - Value: - Boolean: - - "true" - - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 20 - path: compiler-test - content: " return true;" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 20 - path: compiler-test - content: " return true;" - span: - line_start: 4 - line_stop: 6 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n } else {" - next: - Block: - statements: - - Return: - expression: - Value: - Boolean: - - "false" - - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 21 - path: compiler-test - content: " return false;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 21 - path: compiler-test - content: " return 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 x == 3 {\n...\n } else {\n...\n }" - span: - line_start: 3 - line_stop: 9 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: 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\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" - right: - Value: - Integer: - - U32 - - "3" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - op: Eq - span: - line_start: 4 - line_stop: 4 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - block: - statements: - - Return: - expression: - Value: - Boolean: - - "true" - - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 20 - path: compiler-test - content: " return true;" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 20 - path: compiler-test - content: " return true;" - span: - line_start: 4 - line_stop: 6 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n } else {" - next: - Block: - statements: - - Return: - expression: - Value: - Boolean: - - "false" - - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 21 - path: compiler-test - content: " return false;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 21 - path: compiler-test - content: " return 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 x == 3 {\n...\n } else {\n...\n }" - span: - line_start: 3 - line_stop: 9 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n" + initial_theorem: e4b9f8c53d1d5cce1f00b2674448d42cd5bfb229a2544df0f2e996da2847e27e + canonicalized_theorem: e4b9f8c53d1d5cce1f00b2674448d42cd5bfb229a2544df0f2e996da2847e27e + type_inferenced_theorem: 3d4a4e67e5ad7adcd189537ed085a4d894115cfaa0f0afb0cd764f2d28355f81 diff --git a/tests/expectations/compiler/compiler/statements/mutate.leo.out b/tests/expectations/compiler/compiler/statements/mutate.leo.out index e13189d265..423bd46171 100644 --- a/tests/expectations/compiler/compiler/statements/mutate.leo.out +++ b/tests/expectations/compiler/compiler/statements/mutate.leo.out @@ -22,874 +22,6 @@ outputs: a: 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = 5u32;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let b = 5u32;" - type_: ~ - value: - Value: - Integer: - - U32 - - "5" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " let b = 5u32;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " let b = 5u32;" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" - right: - Value: - Implicit: - - "3" - - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b = 1;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " b = 1;" - value: - Value: - Implicit: - - "1" - - line_start: 7 - line_stop: 7 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " b = 1;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " b = 1;" - span: - line_start: 6 - line_stop: 8 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n } else {" - next: - Block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b = 0;\\\"}\"}" - accesses: [] - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " b = 0;" - value: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " b = 0;" - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " b = 0;" - span: - line_start: 8 - line_stop: 10 - col_start: 12 - col_stop: 6 - path: compiler-test - content: " } else {\n...\n }" - span: - line_start: 6 - line_stop: 10 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n } else {\n...\n }" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" - right: - Value: - Implicit: - - "3" - - line_start: 12 - line_stop: 12 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - op: Eq - span: - line_start: 12 - line_stop: 12 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - block: - statements: - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b == 1);\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 13 - line_stop: 13 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " return (b == 1);" - op: Eq - span: - line_start: 13 - line_stop: 13 - col_start: 17 - col_stop: 23 - path: compiler-test - content: " return (b == 1);" - span: - line_start: 13 - line_stop: 13 - col_start: 9 - col_stop: 23 - path: compiler-test - content: " return (b == 1);" - span: - line_start: 12 - line_stop: 14 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n } else {" - next: - Block: - statements: - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b == 0);\\\"}\"}" - right: - Value: - Implicit: - - "0" - - line_start: 15 - line_stop: 15 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " return (b == 0);" - op: Eq - span: - line_start: 15 - line_stop: 15 - col_start: 17 - col_stop: 23 - path: compiler-test - content: " return (b == 0);" - span: - line_start: 15 - line_stop: 15 - col_start: 9 - col_stop: 23 - path: compiler-test - content: " return (b == 0);" - span: - line_start: 14 - line_stop: 16 - col_start: 12 - col_stop: 6 - path: compiler-test - content: " } else {\n...\n }" - span: - line_start: 12 - line_stop: 16 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n } else {\n...\n }" - span: - line_start: 3 - line_stop: 17 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 17 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = 5u32;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let b = 5u32;" - type_: ~ - value: - Value: - Integer: - - U32 - - "5" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " let b = 5u32;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " let b = 5u32;" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" - right: - Value: - Implicit: - - "3" - - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b = 1;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " b = 1;" - value: - Value: - Implicit: - - "1" - - line_start: 7 - line_stop: 7 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " b = 1;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " b = 1;" - span: - line_start: 6 - line_stop: 8 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n } else {" - next: - Block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b = 0;\\\"}\"}" - accesses: [] - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " b = 0;" - value: - Value: - Implicit: - - "0" - - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " b = 0;" - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " b = 0;" - span: - line_start: 8 - line_stop: 10 - col_start: 12 - col_stop: 6 - path: compiler-test - content: " } else {\n...\n }" - span: - line_start: 6 - line_stop: 10 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n } else {\n...\n }" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" - right: - Value: - Implicit: - - "3" - - line_start: 12 - line_stop: 12 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - op: Eq - span: - line_start: 12 - line_stop: 12 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - block: - statements: - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b == 1);\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 13 - line_stop: 13 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " return (b == 1);" - op: Eq - span: - line_start: 13 - line_stop: 13 - col_start: 17 - col_stop: 23 - path: compiler-test - content: " return (b == 1);" - span: - line_start: 13 - line_stop: 13 - col_start: 9 - col_stop: 23 - path: compiler-test - content: " return (b == 1);" - span: - line_start: 12 - line_stop: 14 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n } else {" - next: - Block: - statements: - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b == 0);\\\"}\"}" - right: - Value: - Implicit: - - "0" - - line_start: 15 - line_stop: 15 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " return (b == 0);" - op: Eq - span: - line_start: 15 - line_stop: 15 - col_start: 17 - col_stop: 23 - path: compiler-test - content: " return (b == 0);" - span: - line_start: 15 - line_stop: 15 - col_start: 9 - col_stop: 23 - path: compiler-test - content: " return (b == 0);" - span: - line_start: 14 - line_stop: 16 - col_start: 12 - col_stop: 6 - path: compiler-test - content: " } else {\n...\n }" - span: - line_start: 12 - line_stop: 16 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n } else {\n...\n }" - span: - line_start: 3 - line_stop: 17 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 17 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = 5u32;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let b = 5u32;" - type_: - IntegerType: U32 - value: - Value: - Integer: - - U32 - - "5" - - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 17 - path: compiler-test - content: " let b = 5u32;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " let b = 5u32;" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" - right: - Value: - Integer: - - U32 - - "3" - - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b = 1;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " b = 1;" - value: - Value: - Integer: - - U32 - - "1" - - line_start: 7 - line_stop: 7 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " b = 1;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " b = 1;" - span: - line_start: 6 - line_stop: 8 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n } else {" - next: - Block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b = 0;\\\"}\"}" - accesses: [] - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " b = 0;" - value: - Value: - Integer: - - U32 - - "0" - - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " b = 0;" - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " b = 0;" - span: - line_start: 8 - line_stop: 10 - col_start: 12 - col_stop: 6 - path: compiler-test - content: " } else {\n...\n }" - span: - line_start: 6 - line_stop: 10 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n } else {\n...\n }" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" - right: - Value: - Integer: - - U32 - - "3" - - line_start: 12 - line_stop: 12 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - op: Eq - span: - line_start: 12 - line_stop: 12 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 3 {" - block: - statements: - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b == 1);\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 13 - line_stop: 13 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " return (b == 1);" - op: Eq - span: - line_start: 13 - line_stop: 13 - col_start: 17 - col_stop: 23 - path: compiler-test - content: " return (b == 1);" - span: - line_start: 13 - line_stop: 13 - col_start: 9 - col_stop: 23 - path: compiler-test - content: " return (b == 1);" - span: - line_start: 12 - line_stop: 14 - col_start: 15 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n } else {" - next: - Block: - statements: - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b == 0);\\\"}\"}" - right: - Value: - Integer: - - U32 - - "0" - - line_start: 15 - line_stop: 15 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " return (b == 0);" - op: Eq - span: - line_start: 15 - line_stop: 15 - col_start: 17 - col_stop: 23 - path: compiler-test - content: " return (b == 0);" - span: - line_start: 15 - line_stop: 15 - col_start: 9 - col_stop: 23 - path: compiler-test - content: " return (b == 0);" - span: - line_start: 14 - line_stop: 16 - col_start: 12 - col_stop: 6 - path: compiler-test - content: " } else {\n...\n }" - span: - line_start: 12 - line_stop: 16 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if x == 3 {\n...\n } else {\n...\n }" - span: - line_start: 3 - line_stop: 17 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 17 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n" + initial_theorem: 5bc9151ccd030d4ae8248850c22ba9abef2d3b0c77c8b4658b595ce63a0e3461 + canonicalized_theorem: 5bc9151ccd030d4ae8248850c22ba9abef2d3b0c77c8b4658b595ce63a0e3461 + type_inferenced_theorem: 0aedd29433a0d5f90ec29a5b8571bf124d2cf98687e7ef11e0ae2576508540f3 diff --git a/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out b/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out index 5b4b72c742..8f9f607451 100644 --- a/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out +++ b/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out @@ -28,822 +28,6 @@ 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: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let d = x;" - type_: ~ - value: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " let d = x;" - - Conditional: - condition: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 || x == 5 {\\\"}\"}" - right: - Value: - Implicit: - - "3" - - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 3 || x == 5 {" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 3 || x == 5 {" - right: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 || x == 5 {\\\"}\"}" - right: - Value: - Implicit: - - "5" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " if x == 3 || x == 5 {" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 24 - path: compiler-test - content: " if x == 3 || x == 5 {" - op: Or - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 24 - path: compiler-test - content: " if x == 3 || x == 5 {" - block: - statements: - - Assign: - operation: Add - assignee: - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 1;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " d += 1;" - value: - Value: - Implicit: - - "1" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " d += 1;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " d += 1;" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" - right: - Value: - Implicit: - - "3" - - line_start: 8 - line_stop: 8 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " if x == 3 {" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " if x == 3 {" - block: - statements: - - Assign: - operation: Add - assignee: - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 2;\\\"}\"}" - accesses: [] - span: - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " d += 2;" - value: - Value: - Implicit: - - "2" - - line_start: 9 - line_stop: 9 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " d += 2;" - span: - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " d += 2;" - span: - line_start: 8 - line_stop: 10 - col_start: 19 - col_stop: 10 - path: compiler-test - content: " if x == 3 {\n...\n }" - next: ~ - span: - line_start: 8 - line_stop: 10 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " if x == 3 {\n...\n }" - span: - line_start: 6 - line_stop: 11 - col_start: 25 - col_stop: 6 - path: compiler-test - content: " if x == 3 || x == 5 {\n...\n }" - next: ~ - span: - line_start: 6 - line_stop: 11 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if x == 3 || x == 5 {\n...\n }\n\n\n" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return d > x;\\\"}\"}" - right: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return d > x;\\\"}\"}" - op: Gt - span: - line_start: 13 - line_stop: 13 - col_start: 12 - col_stop: 17 - path: compiler-test - content: " return d > x;" - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " return d > x;" - span: - line_start: 3 - line_stop: 14 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 14 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let d = x;" - type_: ~ - value: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " let d = x;" - - Conditional: - condition: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 || x == 5 {\\\"}\"}" - right: - Value: - Implicit: - - "3" - - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 3 || x == 5 {" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 3 || x == 5 {" - right: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 || x == 5 {\\\"}\"}" - right: - Value: - Implicit: - - "5" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " if x == 3 || x == 5 {" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 24 - path: compiler-test - content: " if x == 3 || x == 5 {" - op: Or - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 24 - path: compiler-test - content: " if x == 3 || x == 5 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 1;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " d += 1;" - value: - Binary: - left: - Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 1;\\\"}\"}" - right: - Value: - Implicit: - - "1" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " d += 1;" - op: Add - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " d += 1;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " d += 1;" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" - right: - Value: - Implicit: - - "3" - - line_start: 8 - line_stop: 8 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " if x == 3 {" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " if x == 3 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 2;\\\"}\"}" - accesses: [] - span: - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " d += 2;" - value: - Binary: - left: - Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 2;\\\"}\"}" - right: - Value: - Implicit: - - "2" - - line_start: 9 - line_stop: 9 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " d += 2;" - op: Add - span: - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " d += 2;" - span: - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " d += 2;" - span: - line_start: 8 - line_stop: 10 - col_start: 19 - col_stop: 10 - path: compiler-test - content: " if x == 3 {\n...\n }" - next: ~ - span: - line_start: 8 - line_stop: 10 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " if x == 3 {\n...\n }" - span: - line_start: 6 - line_stop: 11 - col_start: 25 - col_stop: 6 - path: compiler-test - content: " if x == 3 || x == 5 {\n...\n }" - next: ~ - span: - line_start: 6 - line_stop: 11 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if x == 3 || x == 5 {\n...\n }\n\n\n" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return d > x;\\\"}\"}" - right: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return d > x;\\\"}\"}" - op: Gt - span: - line_start: 13 - line_stop: 13 - col_start: 12 - col_stop: 17 - path: compiler-test - content: " return d > x;" - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " return d > x;" - span: - line_start: 3 - line_stop: 14 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 14 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\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(x: u32) -> 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: u32) -> 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: u32) -> bool {\\\"}\"}" - 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(x: u32) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let d = x;" - type_: - IntegerType: U32 - value: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = x;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: compiler-test - content: " let d = x;" - - Conditional: - condition: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 || x == 5 {\\\"}\"}" - right: - Value: - Integer: - - U32 - - "3" - - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " if x == 3 || x == 5 {" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 14 - path: compiler-test - content: " if x == 3 || x == 5 {" - right: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 || x == 5 {\\\"}\"}" - right: - Value: - Integer: - - U32 - - "5" - - line_start: 6 - line_stop: 6 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " if x == 3 || x == 5 {" - op: Eq - span: - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 24 - path: compiler-test - content: " if x == 3 || x == 5 {" - op: Or - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 24 - path: compiler-test - content: " if x == 3 || x == 5 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 1;\\\"}\"}" - accesses: [] - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " d += 1;" - value: - Binary: - left: - Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 1;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "1" - - line_start: 7 - line_stop: 7 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " d += 1;" - op: Add - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " d += 1;" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " d += 1;" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if x == 3 {\\\"}\"}" - right: - Value: - Integer: - - U32 - - "3" - - line_start: 8 - line_stop: 8 - col_start: 17 - col_stop: 18 - path: compiler-test - content: " if x == 3 {" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " if x == 3 {" - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 2;\\\"}\"}" - accesses: [] - span: - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " d += 2;" - value: - Binary: - left: - Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" d += 2;\\\"}\"}" - right: - Value: - Integer: - - U32 - - "2" - - line_start: 9 - line_stop: 9 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " d += 2;" - op: Add - span: - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " d += 2;" - span: - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 19 - path: compiler-test - content: " d += 2;" - span: - line_start: 8 - line_stop: 10 - col_start: 19 - col_stop: 10 - path: compiler-test - content: " if x == 3 {\n...\n }" - next: ~ - span: - line_start: 8 - line_stop: 10 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " if x == 3 {\n...\n }" - span: - line_start: 6 - line_stop: 11 - col_start: 25 - col_stop: 6 - path: compiler-test - content: " if x == 3 || x == 5 {\n...\n }" - next: ~ - span: - line_start: 6 - line_stop: 11 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " if x == 3 || x == 5 {\n...\n }\n\n\n" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return d > x;\\\"}\"}" - right: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return d > x;\\\"}\"}" - op: Gt - span: - line_start: 13 - line_stop: 13 - col_start: 12 - col_stop: 17 - path: compiler-test - content: " return d > x;" - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " return d > x;" - span: - line_start: 3 - line_stop: 14 - col_start: 31 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 14 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(x: u32) -> bool {\n...\n}\n\n\n\n\n\n\n\n\n" + initial_theorem: 72f7d405df7dc1f8a399bac21756cac5bad2bfa74d4cf508f385f6e6427cdc7e + canonicalized_theorem: 674f7e3c3389d726c338b9af92d7e9492a69573573a7e890e92a35696d7fd6da + type_inferenced_theorem: eb4035f253dd5c6f3d49aa6cf329d65e8cf7cee52bb12d673bae89fbd8e38dfa diff --git a/tests/expectations/compiler/compiler/string/circuit.leo.out b/tests/expectations/compiler/compiler/string/circuit.leo.out index 2f2ed3e9e9..c16f5c57b9 100644 --- a/tests/expectations/compiler/compiler/string/circuit.leo.out +++ b/tests/expectations/compiler/compiler/string/circuit.leo.out @@ -16,1786 +16,6 @@ outputs: out: type: "[char; 13]" value: "\"Hello, World!\"" - 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\":\"s1\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":7,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1: [char; 13];\\\"}\"}" - - Array: - - Char - - - value: "13" - global_consts: {} - functions: - "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "13" - span: - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function takes_string(s: [char; 13]) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return s == \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" - right: - Value: - String: - - - Scalar: 72 - - Scalar: 101 - - Scalar: 108 - - Scalar: 108 - - Scalar: 111 - - Scalar: 44 - - Scalar: 32 - - Scalar: 87 - - Scalar: 111 - - Scalar: 114 - - Scalar: 108 - - Scalar: 100 - - Scalar: 33 - - line_start: 8 - line_stop: 8 - col_start: 17 - col_stop: 32 - path: compiler-test - content: " return s == \"Hello, World!\";" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 32 - path: compiler-test - content: " return s == \"Hello, World!\";" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 32 - path: compiler-test - content: " return s == \"Hello, World!\";" - span: - line_start: 7 - line_stop: 9 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function takes_string(s: [char; 13]) -> bool {\n...\n}" - span: - line_start: 7 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function takes_string(s: [char; 13]) -> bool {\n...\n}" - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "13" - span: - line_start: 11 - line_stop: 11 - col_start: 15 - col_stop: 17 - path: compiler-test - content: "function main(s1: [char; 13]) -> [char; 13] {" - output: - Array: - - Char - - - value: "13" - 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 { s1 };\\\"}\"}" - span: - line_start: 12 - line_stop: 12 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let f = Foo { s1 };" - 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 { s1 };\\\"}\"}" - members: - - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":19,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { s1 };\\\"}\"}" - expression: ~ - span: - line_start: 12 - line_stop: 12 - col_start: 13 - col_stop: 23 - path: compiler-test - content: " let f = Foo { s1 };" - span: - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " let f = Foo { s1 };" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let b = takes_string(s1);" - type_: ~ - value: - Call: - function: - Identifier: "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" - arguments: - - Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":26,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 13 - col_stop: 29 - path: compiler-test - content: " let b = takes_string(s1);" - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 29 - path: compiler-test - content: " let b = takes_string(s1);" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" - span: - line_start: 15 - line_stop: 15 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - type_: ~ - value: - Ternary: - condition: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" - name: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":20,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" - span: - line_start: 15 - line_stop: 15 - col_start: 18 - col_stop: 22 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - right: - Value: - String: - - - Scalar: 72 - - Scalar: 101 - - Scalar: 108 - - Scalar: 108 - - Scalar: 111 - - Scalar: 44 - - Scalar: 32 - - Scalar: 87 - - Scalar: 111 - - Scalar: 114 - - Scalar: 108 - - Scalar: 100 - - Scalar: 33 - - line_start: 15 - line_stop: 15 - col_start: 26 - col_stop: 41 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - op: Eq - span: - line_start: 15 - line_stop: 15 - col_start: 18 - col_stop: 41 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - if_true: - Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":44,\\\"col_stop\\\":46,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" - if_false: - Value: - String: - - - Scalar: 97 - - Scalar: 98 - - Scalar: 99 - - Scalar: 100 - - Scalar: 101 - - Scalar: 102 - - Scalar: 103 - - Scalar: 104 - - Scalar: 106 - - Scalar: 107 - - Scalar: 108 - - Scalar: 109 - - Scalar: 110 - - line_start: 15 - line_stop: 15 - col_start: 49 - col_stop: 64 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - span: - line_start: 15 - line_stop: 15 - col_start: 18 - col_stop: 64 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - span: - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 64 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Return: - expression: - Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return result;\\\"}\"}" - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return result;" - span: - line_start: 11 - line_stop: 17 - col_start: 45 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13]) -> [char; 13] {\n...\n}" - span: - line_start: 11 - line_stop: 17 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13]) -> [char; 13] {\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\":\"s1\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":7,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1: [char; 13];\\\"}\"}" - - Array: - - Char - - - value: "13" - global_consts: {} - functions: - "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "13" - span: - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function takes_string(s: [char; 13]) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return s == \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 72 - span: - line_start: 8 - line_stop: 8 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 8 - line_stop: 8 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 8 - line_stop: 8 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 8 - line_stop: 8 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 8 - line_stop: 8 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 44 - span: - line_start: 8 - line_stop: 8 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 8 - line_stop: 8 - col_start: 24 - col_stop: 25 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 87 - span: - line_start: 8 - line_stop: 8 - col_start: 25 - col_stop: 26 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 8 - line_stop: 8 - col_start: 26 - col_stop: 27 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 114 - span: - line_start: 8 - line_stop: 8 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 8 - line_stop: 8 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 8 - line_stop: 8 - col_start: 29 - col_stop: 30 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 8 - line_stop: 8 - col_start: 30 - col_stop: 31 - path: compiler-test - content: " return s == \"Hello, World!\";" - span: - line_start: 8 - line_stop: 8 - col_start: 17 - col_stop: 32 - path: compiler-test - content: " return s == \"Hello, World!\";" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 32 - path: compiler-test - content: " return s == \"Hello, World!\";" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 32 - path: compiler-test - content: " return s == \"Hello, World!\";" - span: - line_start: 7 - line_stop: 9 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function takes_string(s: [char; 13]) -> bool {\n...\n}" - span: - line_start: 7 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function takes_string(s: [char; 13]) -> bool {\n...\n}" - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "13" - span: - line_start: 11 - line_stop: 11 - col_start: 15 - col_stop: 17 - path: compiler-test - content: "function main(s1: [char; 13]) -> [char; 13] {" - output: - Array: - - Char - - - value: "13" - 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 { s1 };\\\"}\"}" - span: - line_start: 12 - line_stop: 12 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let f = Foo { s1 };" - 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 { s1 };\\\"}\"}" - members: - - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":19,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { s1 };\\\"}\"}" - expression: ~ - span: - line_start: 12 - line_stop: 12 - col_start: 13 - col_stop: 23 - path: compiler-test - content: " let f = Foo { s1 };" - span: - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " let f = Foo { s1 };" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let b = takes_string(s1);" - type_: ~ - value: - Call: - function: - Identifier: "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" - arguments: - - Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":26,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 13 - col_stop: 29 - path: compiler-test - content: " let b = takes_string(s1);" - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 29 - path: compiler-test - content: " let b = takes_string(s1);" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" - span: - line_start: 15 - line_stop: 15 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - type_: ~ - value: - Ternary: - condition: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" - name: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":20,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" - span: - line_start: 15 - line_stop: 15 - col_start: 18 - col_stop: 22 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - right: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 72 - span: - line_start: 15 - line_stop: 15 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 15 - line_stop: 15 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 15 - line_stop: 15 - col_start: 29 - col_stop: 30 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 15 - line_stop: 15 - col_start: 30 - col_stop: 31 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 15 - line_stop: 15 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 44 - span: - line_start: 15 - line_stop: 15 - col_start: 32 - col_stop: 33 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 15 - line_stop: 15 - col_start: 33 - col_stop: 34 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 87 - span: - line_start: 15 - line_stop: 15 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 15 - line_stop: 15 - col_start: 35 - col_stop: 36 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 114 - span: - line_start: 15 - line_stop: 15 - col_start: 36 - col_stop: 37 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 15 - line_stop: 15 - col_start: 37 - col_stop: 38 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 15 - line_stop: 15 - col_start: 38 - col_stop: 39 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 15 - line_stop: 15 - col_start: 39 - col_stop: 40 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - span: - line_start: 15 - line_stop: 15 - col_start: 26 - col_stop: 41 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - op: Eq - span: - line_start: 15 - line_stop: 15 - col_start: 18 - col_stop: 41 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - if_true: - Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":44,\\\"col_stop\\\":46,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" - if_false: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 97 - span: - line_start: 15 - line_stop: 15 - col_start: 50 - col_stop: 51 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 98 - span: - line_start: 15 - line_stop: 15 - col_start: 51 - col_stop: 52 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 99 - span: - line_start: 15 - line_stop: 15 - col_start: 52 - col_stop: 53 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 15 - line_stop: 15 - col_start: 53 - col_stop: 54 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 15 - line_stop: 15 - col_start: 54 - col_stop: 55 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 102 - span: - line_start: 15 - line_stop: 15 - col_start: 55 - col_stop: 56 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 103 - span: - line_start: 15 - line_stop: 15 - col_start: 56 - col_stop: 57 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 104 - span: - line_start: 15 - line_stop: 15 - col_start: 57 - col_stop: 58 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 106 - span: - line_start: 15 - line_stop: 15 - col_start: 58 - col_stop: 59 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 107 - span: - line_start: 15 - line_stop: 15 - col_start: 59 - col_stop: 60 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 15 - line_stop: 15 - col_start: 60 - col_stop: 61 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 109 - span: - line_start: 15 - line_stop: 15 - col_start: 61 - col_stop: 62 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 110 - span: - line_start: 15 - line_stop: 15 - col_start: 62 - col_stop: 63 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - span: - line_start: 15 - line_stop: 15 - col_start: 49 - col_stop: 64 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - span: - line_start: 15 - line_stop: 15 - col_start: 18 - col_stop: 64 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - span: - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 64 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Return: - expression: - Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return result;\\\"}\"}" - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return result;" - span: - line_start: 11 - line_stop: 17 - col_start: 45 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13]) -> [char; 13] {\n...\n}" - span: - line_start: 11 - line_stop: 17 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13]) -> [char; 13] {\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\":\"s1\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":7,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1: [char; 13];\\\"}\"}" - - Array: - - Char - - - value: "13" - global_consts: {} - functions: - "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function takes_string(s: [char; 13]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "13" - span: - line_start: 7 - line_stop: 7 - col_start: 23 - col_stop: 24 - path: compiler-test - content: "function takes_string(s: [char; 13]) -> bool {" - output: Boolean - block: - statements: - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return s == \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 72 - span: - line_start: 8 - line_stop: 8 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 8 - line_stop: 8 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 8 - line_stop: 8 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 8 - line_stop: 8 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 8 - line_stop: 8 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 44 - span: - line_start: 8 - line_stop: 8 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 8 - line_stop: 8 - col_start: 24 - col_stop: 25 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 87 - span: - line_start: 8 - line_stop: 8 - col_start: 25 - col_stop: 26 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 8 - line_stop: 8 - col_start: 26 - col_stop: 27 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 114 - span: - line_start: 8 - line_stop: 8 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 8 - line_stop: 8 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 8 - line_stop: 8 - col_start: 29 - col_stop: 30 - path: compiler-test - content: " return s == \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 8 - line_stop: 8 - col_start: 30 - col_stop: 31 - path: compiler-test - content: " return s == \"Hello, World!\";" - span: - line_start: 8 - line_stop: 8 - col_start: 17 - col_stop: 32 - path: compiler-test - content: " return s == \"Hello, World!\";" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 32 - path: compiler-test - content: " return s == \"Hello, World!\";" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 32 - path: compiler-test - content: " return s == \"Hello, World!\";" - span: - line_start: 7 - line_stop: 9 - col_start: 46 - col_stop: 2 - path: compiler-test - content: "function takes_string(s: [char; 13]) -> bool {\n...\n}" - span: - line_start: 7 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function takes_string(s: [char; 13]) -> bool {\n...\n}" - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13]) -> [char; 13] {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "13" - span: - line_start: 11 - line_stop: 11 - col_start: 15 - col_stop: 17 - path: compiler-test - content: "function main(s1: [char; 13]) -> [char; 13] {" - output: - Array: - - Char - - - value: "13" - 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 { s1 };\\\"}\"}" - span: - line_start: 12 - line_stop: 12 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let f = Foo { s1 };" - 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 { s1 };\\\"}\"}" - members: - - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":19,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { s1 };\\\"}\"}" - expression: ~ - span: - line_start: 12 - line_stop: 12 - col_start: 13 - col_stop: 23 - path: compiler-test - content: " let f = Foo { s1 };" - span: - line_start: 12 - line_stop: 12 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " let f = Foo { s1 };" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let b = takes_string(s1);" - type_: Boolean - value: - Call: - function: - Identifier: "{\"name\":\"takes_string\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" - arguments: - - Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":26,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = takes_string(s1);\\\"}\"}" - span: - line_start: 13 - line_stop: 13 - col_start: 13 - col_stop: 29 - path: compiler-test - content: " let b = takes_string(s1);" - span: - line_start: 13 - line_stop: 13 - col_start: 5 - col_stop: 29 - path: compiler-test - content: " let b = takes_string(s1);" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" - span: - line_start: 15 - line_stop: 15 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - type_: - Array: - - Char - - - value: "13" - value: - Ternary: - condition: - Binary: - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" - name: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":20,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" - span: - line_start: 15 - line_stop: 15 - col_start: 18 - col_stop: 22 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - right: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 72 - span: - line_start: 15 - line_stop: 15 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 15 - line_stop: 15 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 15 - line_stop: 15 - col_start: 29 - col_stop: 30 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 15 - line_stop: 15 - col_start: 30 - col_stop: 31 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 15 - line_stop: 15 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 44 - span: - line_start: 15 - line_stop: 15 - col_start: 32 - col_stop: 33 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 15 - line_stop: 15 - col_start: 33 - col_stop: 34 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 87 - span: - line_start: 15 - line_stop: 15 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 15 - line_stop: 15 - col_start: 35 - col_stop: 36 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 114 - span: - line_start: 15 - line_stop: 15 - col_start: 36 - col_stop: 37 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 15 - line_stop: 15 - col_start: 37 - col_stop: 38 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 15 - line_stop: 15 - col_start: 38 - col_stop: 39 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 15 - line_stop: 15 - col_start: 39 - col_stop: 40 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - span: - line_start: 15 - line_stop: 15 - col_start: 26 - col_stop: 41 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - op: Eq - span: - line_start: 15 - line_stop: 15 - col_start: 18 - col_stop: 41 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - if_true: - Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":44,\\\"col_stop\\\":46,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let result = f.s1 == \\\\\\\"Hello, World!\\\\\\\" ? s1 : \\\\\\\"abcdefghjklmn\\\\\\\";\\\"}\"}" - if_false: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 97 - span: - line_start: 15 - line_stop: 15 - col_start: 50 - col_stop: 51 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 98 - span: - line_start: 15 - line_stop: 15 - col_start: 51 - col_stop: 52 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 99 - span: - line_start: 15 - line_stop: 15 - col_start: 52 - col_stop: 53 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 15 - line_stop: 15 - col_start: 53 - col_stop: 54 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 15 - line_stop: 15 - col_start: 54 - col_stop: 55 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 102 - span: - line_start: 15 - line_stop: 15 - col_start: 55 - col_stop: 56 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 103 - span: - line_start: 15 - line_stop: 15 - col_start: 56 - col_stop: 57 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 104 - span: - line_start: 15 - line_stop: 15 - col_start: 57 - col_stop: 58 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 106 - span: - line_start: 15 - line_stop: 15 - col_start: 58 - col_stop: 59 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 107 - span: - line_start: 15 - line_stop: 15 - col_start: 59 - col_stop: 60 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 15 - line_stop: 15 - col_start: 60 - col_stop: 61 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 109 - span: - line_start: 15 - line_stop: 15 - col_start: 61 - col_stop: 62 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Expression: - Value: - Char: - character: - Scalar: 110 - span: - line_start: 15 - line_stop: 15 - col_start: 62 - col_stop: 63 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - span: - line_start: 15 - line_stop: 15 - col_start: 49 - col_stop: 64 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - span: - line_start: 15 - line_stop: 15 - col_start: 18 - col_stop: 64 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - span: - line_start: 15 - line_stop: 15 - col_start: 5 - col_stop: 64 - path: compiler-test - content: " let result = f.s1 == \"Hello, World!\" ? s1 : \"abcdefghjklmn\";" - - Return: - expression: - Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return result;\\\"}\"}" - span: - line_start: 16 - line_stop: 16 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return result;" - span: - line_start: 11 - line_stop: 17 - col_start: 45 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13]) -> [char; 13] {\n...\n}" - span: - line_start: 11 - line_stop: 17 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13]) -> [char; 13] {\n...\n}\n\n\n\n" + initial_theorem: 69219c995852ced5fe06a4009c4d58a8b59cc23ed7144ab4f08d4e0d4a6c5798 + canonicalized_theorem: c099eab8cd118203aa297b200be1fd331f6e20ed1f19ff87efe16d406f5a0ce0 + type_inferenced_theorem: acef5428f299c6cdbd9ac4b644123cf17a379efe025656122e359abe06da7eb8 diff --git a/tests/expectations/compiler/compiler/string/equality.leo.out b/tests/expectations/compiler/compiler/string/equality.leo.out index b08167a29b..7901b0e24c 100644 --- a/tests/expectations/compiler/compiler/string/equality.leo.out +++ b/tests/expectations/compiler/compiler/string/equality.leo.out @@ -22,2420 +22,6 @@ outputs: out: 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(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "13" - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 17 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" - - Variable: - identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "4" - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 33 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let hello: [char; 13] = \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - type_: - Array: - - Char - - - value: "13" - value: - Value: - String: - - - Scalar: 72 - - Scalar: 101 - - Scalar: 108 - - Scalar: 108 - - Scalar: 111 - - Scalar: 44 - - Scalar: 32 - - Scalar: 87 - - Scalar: 111 - - Scalar: 114 - - Scalar: 108 - - Scalar: 100 - - Scalar: 33 - - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 44 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 44 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"part1\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let part1 = \\\\\\\"Good\\\\\\\";\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " let part1 = \"Good\";" - type_: ~ - value: - Value: - String: - - - Scalar: 71 - - Scalar: 111 - - Scalar: 111 - - Scalar: 100 - - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 23 - path: compiler-test - content: " let part1 = \"Good\";" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " let part1 = \"Good\";" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"part2\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let part2 = \\\\\\\" dog!\\\\\\\";\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " let part2 = \" dog!\";" - type_: ~ - value: - Value: - String: - - - Scalar: 32 - - Scalar: 100 - - Scalar: 111 - - Scalar: 103 - - Scalar: 33 - - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 24 - path: compiler-test - content: " let part2 = \" dog!\";" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " let part2 = \" dog!\";" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"concat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " let concat: [char; 9] = [...part1, ...part2];" - type_: - Array: - - Char - - - value: "9" - value: - ArrayInline: - elements: - - Spread: - Identifier: "{\"name\":\"part1\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":33,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" - - Spread: - Identifier: "{\"name\":\"part2\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":43,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 49 - path: compiler-test - content: " let concat: [char; 9] = [...part1, ...part2];" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 49 - path: compiler-test - content: " let concat: [char; 9] = [...part1, ...part2];" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = false;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let x = false;" - type_: ~ - value: - Value: - Boolean: - - "false" - - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 18 - path: compiler-test - content: " let x = false;" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " let x = false;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x = \\\\\\\"test1\\\\\\\" == \\\\\\\"test2\\\\\\\";\\\"}\"}" - accesses: [] - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - value: - Binary: - left: - Value: - String: - - - Scalar: 116 - - Scalar: 101 - - Scalar: 115 - - Scalar: 116 - - Scalar: 49 - - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 16 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - right: - Value: - String: - - - Scalar: 116 - - Scalar: 101 - - Scalar: 115 - - Scalar: 116 - - Scalar: 50 - - line_start: 9 - line_stop: 9 - col_start: 20 - col_stop: 27 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 27 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Return: - expression: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" - right: - Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":21,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - Binary: - left: - Value: - String: - - - Scalar: 110 - - Scalar: 111 - - Scalar: 112 - - Scalar: 101 - - line_start: 10 - line_stop: 10 - col_start: 27 - col_stop: 33 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":37,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" - op: Ne - span: - line_start: 10 - line_stop: 10 - col_start: 27 - col_stop: 39 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - op: And - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 39 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - Binary: - left: - Value: - String: - - - Scalar: 101 - - Scalar: 115 - - line_start: 10 - line_stop: 10 - col_start: 43 - col_stop: 47 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":51,\\\"col_stop\\\":53,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" - left: - Value: - Implicit: - - "1" - - line_start: 10 - line_stop: 10 - col_start: 54 - col_stop: 55 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - Value: - Implicit: - - "3" - - line_start: 10 - line_stop: 10 - col_start: 57 - col_stop: 58 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - span: - line_start: 10 - line_stop: 10 - col_start: 51 - col_stop: 59 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 43 - col_stop: 59 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - op: And - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 59 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - Binary: - left: - Identifier: "{\"name\":\"concat\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":63,\\\"col_stop\\\":69,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" - right: - Value: - String: - - - Scalar: 71 - - Scalar: 111 - - Scalar: 111 - - Scalar: 100 - - Scalar: 32 - - Scalar: 100 - - Scalar: 111 - - Scalar: 103 - - Scalar: 33 - - line_start: 10 - line_stop: 10 - col_start: 73 - col_stop: 84 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 63 - col_stop: 84 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - op: And - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 84 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 84 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - span: - line_start: 3 - line_stop: 11 - col_start: 54 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 11 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\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(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "13" - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 17 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" - - Variable: - identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "4" - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 33 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let hello: [char; 13] = \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - type_: - Array: - - Char - - - value: "13" - value: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 72 - span: - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 31 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 4 - line_stop: 4 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 4 - line_stop: 4 - col_start: 32 - col_stop: 33 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 4 - line_stop: 4 - col_start: 33 - col_stop: 34 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 4 - line_stop: 4 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 44 - span: - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 36 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 4 - line_stop: 4 - col_start: 36 - col_stop: 37 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 87 - span: - line_start: 4 - line_stop: 4 - col_start: 37 - col_stop: 38 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 4 - line_stop: 4 - col_start: 38 - col_stop: 39 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 114 - span: - line_start: 4 - line_stop: 4 - col_start: 39 - col_stop: 40 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 41 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 42 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 43 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 44 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 44 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"part1\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let part1 = \\\\\\\"Good\\\\\\\";\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " let part1 = \"Good\";" - type_: ~ - value: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 71 - span: - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " let part1 = \"Good\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 5 - line_stop: 5 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " let part1 = \"Good\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 5 - line_stop: 5 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " let part1 = \"Good\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 5 - line_stop: 5 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " let part1 = \"Good\";" - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 23 - path: compiler-test - content: " let part1 = \"Good\";" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " let part1 = \"Good\";" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"part2\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let part2 = \\\\\\\" dog!\\\\\\\";\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " let part2 = \" dog!\";" - type_: ~ - value: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " let part2 = \" dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 6 - line_stop: 6 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " let part2 = \" dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 6 - line_stop: 6 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " let part2 = \" dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 103 - span: - line_start: 6 - line_stop: 6 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " let part2 = \" dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 6 - line_stop: 6 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " let part2 = \" dog!\";" - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 24 - path: compiler-test - content: " let part2 = \" dog!\";" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " let part2 = \" dog!\";" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"concat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " let concat: [char; 9] = [...part1, ...part2];" - type_: - Array: - - Char - - - value: "9" - value: - ArrayInline: - elements: - - Spread: - Identifier: "{\"name\":\"part1\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":33,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" - - Spread: - Identifier: "{\"name\":\"part2\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":43,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 49 - path: compiler-test - content: " let concat: [char; 9] = [...part1, ...part2];" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 49 - path: compiler-test - content: " let concat: [char; 9] = [...part1, ...part2];" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = false;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let x = false;" - type_: ~ - value: - Value: - Boolean: - - "false" - - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 18 - path: compiler-test - content: " let x = false;" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " let x = false;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x = \\\\\\\"test1\\\\\\\" == \\\\\\\"test2\\\\\\\";\\\"}\"}" - accesses: [] - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - value: - Binary: - left: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 116 - span: - line_start: 9 - line_stop: 9 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 115 - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 13 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 116 - span: - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 49 - span: - line_start: 9 - line_stop: 9 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 16 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - right: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 116 - span: - line_start: 9 - line_stop: 9 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 9 - line_stop: 9 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 115 - span: - line_start: 9 - line_stop: 9 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 116 - span: - line_start: 9 - line_stop: 9 - col_start: 24 - col_stop: 25 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 50 - span: - line_start: 9 - line_stop: 9 - col_start: 25 - col_stop: 26 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - span: - line_start: 9 - line_stop: 9 - col_start: 20 - col_stop: 27 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 27 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Return: - expression: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" - right: - Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":21,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - Binary: - left: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 110 - span: - line_start: 10 - line_stop: 10 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 10 - line_stop: 10 - col_start: 29 - col_stop: 30 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 112 - span: - line_start: 10 - line_stop: 10 - col_start: 30 - col_stop: 31 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 10 - line_stop: 10 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - span: - line_start: 10 - line_stop: 10 - col_start: 27 - col_stop: 33 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":37,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" - op: Ne - span: - line_start: 10 - line_stop: 10 - col_start: 27 - col_stop: 39 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - op: And - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 39 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - Binary: - left: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 10 - line_stop: 10 - col_start: 44 - col_stop: 45 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 115 - span: - line_start: 10 - line_stop: 10 - col_start: 45 - col_stop: 46 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - span: - line_start: 10 - line_stop: 10 - col_start: 43 - col_stop: 47 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":51,\\\"col_stop\\\":53,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" - left: - Value: - Implicit: - - "1" - - line_start: 10 - line_stop: 10 - col_start: 54 - col_stop: 55 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - Value: - Implicit: - - "3" - - line_start: 10 - line_stop: 10 - col_start: 57 - col_stop: 58 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - span: - line_start: 10 - line_stop: 10 - col_start: 51 - col_stop: 59 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 43 - col_stop: 59 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - op: And - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 59 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - Binary: - left: - Identifier: "{\"name\":\"concat\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":63,\\\"col_stop\\\":69,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 71 - span: - line_start: 10 - line_stop: 10 - col_start: 74 - col_stop: 75 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 10 - line_stop: 10 - col_start: 75 - col_stop: 76 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 10 - line_stop: 10 - col_start: 76 - col_stop: 77 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 10 - line_stop: 10 - col_start: 77 - col_stop: 78 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 10 - line_stop: 10 - col_start: 78 - col_stop: 79 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 10 - line_stop: 10 - col_start: 79 - col_stop: 80 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 10 - line_stop: 10 - col_start: 80 - col_stop: 81 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 103 - span: - line_start: 10 - line_stop: 10 - col_start: 81 - col_stop: 82 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 10 - line_stop: 10 - col_start: 82 - col_stop: 83 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - span: - line_start: 10 - line_stop: 10 - col_start: 73 - col_stop: 84 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 63 - col_stop: 84 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - op: And - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 84 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 84 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - span: - line_start: 3 - line_stop: 11 - col_start: 54 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 11 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\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(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "13" - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 17 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" - - Variable: - identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "4" - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 33 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" - output: Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let hello: [char; 13] = \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - type_: - Array: - - Char - - - value: "13" - value: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 72 - span: - line_start: 4 - line_stop: 4 - col_start: 30 - col_stop: 31 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 4 - line_stop: 4 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 4 - line_stop: 4 - col_start: 32 - col_stop: 33 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 4 - line_stop: 4 - col_start: 33 - col_stop: 34 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 4 - line_stop: 4 - col_start: 34 - col_stop: 35 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 44 - span: - line_start: 4 - line_stop: 4 - col_start: 35 - col_stop: 36 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 4 - line_stop: 4 - col_start: 36 - col_stop: 37 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 87 - span: - line_start: 4 - line_stop: 4 - col_start: 37 - col_stop: 38 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 4 - line_stop: 4 - col_start: 38 - col_stop: 39 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 114 - span: - line_start: 4 - line_stop: 4 - col_start: 39 - col_stop: 40 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 41 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 4 - line_stop: 4 - col_start: 41 - col_stop: 42 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 4 - line_stop: 4 - col_start: 42 - col_stop: 43 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - span: - line_start: 4 - line_stop: 4 - col_start: 29 - col_stop: 44 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 44 - path: compiler-test - content: " let hello: [char; 13] = \"Hello, World!\";" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"part1\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let part1 = \\\\\\\"Good\\\\\\\";\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " let part1 = \"Good\";" - type_: - Array: - - Char - - - value: "4" - value: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 71 - span: - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " let part1 = \"Good\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 5 - line_stop: 5 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " let part1 = \"Good\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 5 - line_stop: 5 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " let part1 = \"Good\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 5 - line_stop: 5 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " let part1 = \"Good\";" - span: - line_start: 5 - line_stop: 5 - col_start: 17 - col_stop: 23 - path: compiler-test - content: " let part1 = \"Good\";" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " let part1 = \"Good\";" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"part2\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let part2 = \\\\\\\" dog!\\\\\\\";\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 14 - path: compiler-test - content: " let part2 = \" dog!\";" - type_: - Array: - - Char - - - value: "5" - value: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 19 - path: compiler-test - content: " let part2 = \" dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 6 - line_stop: 6 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " let part2 = \" dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 6 - line_stop: 6 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " let part2 = \" dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 103 - span: - line_start: 6 - line_stop: 6 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " let part2 = \" dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 6 - line_stop: 6 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " let part2 = \" dog!\";" - span: - line_start: 6 - line_stop: 6 - col_start: 17 - col_stop: 24 - path: compiler-test - content: " let part2 = \" dog!\";" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 24 - path: compiler-test - content: " let part2 = \" dog!\";" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"concat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 15 - path: compiler-test - content: " let concat: [char; 9] = [...part1, ...part2];" - type_: - Array: - - Char - - - value: "9" - value: - ArrayInline: - elements: - - Spread: - Identifier: "{\"name\":\"part1\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":33,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" - - Spread: - Identifier: "{\"name\":\"part2\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":43,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let concat: [char; 9] = [...part1, ...part2];\\\"}\"}" - span: - line_start: 7 - line_stop: 7 - col_start: 29 - col_stop: 49 - path: compiler-test - content: " let concat: [char; 9] = [...part1, ...part2];" - span: - line_start: 7 - line_stop: 7 - col_start: 5 - col_stop: 49 - path: compiler-test - content: " let concat: [char; 9] = [...part1, ...part2];" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let x = false;\\\"}\"}" - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let x = false;" - type_: Boolean - value: - Value: - Boolean: - - "false" - - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 18 - path: compiler-test - content: " let x = false;" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " let x = false;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x = \\\\\\\"test1\\\\\\\" == \\\\\\\"test2\\\\\\\";\\\"}\"}" - accesses: [] - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 6 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - value: - Binary: - left: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 116 - span: - line_start: 9 - line_stop: 9 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 9 - line_stop: 9 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 115 - span: - line_start: 9 - line_stop: 9 - col_start: 12 - col_stop: 13 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 116 - span: - line_start: 9 - line_stop: 9 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 49 - span: - line_start: 9 - line_stop: 9 - col_start: 14 - col_stop: 15 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 16 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - right: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 116 - span: - line_start: 9 - line_stop: 9 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 9 - line_stop: 9 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 115 - span: - line_start: 9 - line_stop: 9 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 116 - span: - line_start: 9 - line_stop: 9 - col_start: 24 - col_stop: 25 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Expression: - Value: - Char: - character: - Scalar: 50 - span: - line_start: 9 - line_stop: 9 - col_start: 25 - col_stop: 26 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - span: - line_start: 9 - line_stop: 9 - col_start: 20 - col_stop: 27 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - op: Eq - span: - line_start: 9 - line_stop: 9 - col_start: 9 - col_stop: 27 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 27 - path: compiler-test - content: " x = \"test1\" == \"test2\";" - - Return: - expression: - Binary: - left: - Binary: - left: - Binary: - left: - Binary: - left: - Identifier: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" - right: - Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":21,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 23 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - Binary: - left: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 110 - span: - line_start: 10 - line_stop: 10 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 10 - line_stop: 10 - col_start: 29 - col_stop: 30 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 112 - span: - line_start: 10 - line_stop: 10 - col_start: 30 - col_stop: 31 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 10 - line_stop: 10 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - span: - line_start: 10 - line_stop: 10 - col_start: 27 - col_stop: 33 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":37,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" - op: Ne - span: - line_start: 10 - line_stop: 10 - col_start: 27 - col_stop: 39 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - op: And - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 39 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - Binary: - left: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 10 - line_stop: 10 - col_start: 44 - col_stop: 45 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 115 - span: - line_start: 10 - line_stop: 10 - col_start: 45 - col_stop: 46 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - span: - line_start: 10 - line_stop: 10 - col_start: 43 - col_stop: 47 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":51,\\\"col_stop\\\":53,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" - left: - Value: - Integer: - - U32 - - "1" - - line_start: 10 - line_stop: 10 - col_start: 54 - col_stop: 55 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - Value: - Integer: - - U32 - - "3" - - line_start: 10 - line_stop: 10 - col_start: 57 - col_stop: 58 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - span: - line_start: 10 - line_stop: 10 - col_start: 51 - col_stop: 59 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 43 - col_stop: 59 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - op: And - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 59 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - right: - Binary: - left: - Identifier: "{\"name\":\"concat\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":63,\\\"col_stop\\\":69,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return hello == s1 && \\\\\\\"nope\\\\\\\" != s2 && \\\\\\\"es\\\\\\\" == s2[1..3] && concat == \\\\\\\"Good dog!\\\\\\\";\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 71 - span: - line_start: 10 - line_stop: 10 - col_start: 74 - col_stop: 75 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 10 - line_stop: 10 - col_start: 75 - col_stop: 76 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 10 - line_stop: 10 - col_start: 76 - col_stop: 77 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 10 - line_stop: 10 - col_start: 77 - col_stop: 78 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 10 - line_stop: 10 - col_start: 78 - col_stop: 79 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 10 - line_stop: 10 - col_start: 79 - col_stop: 80 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 10 - line_stop: 10 - col_start: 80 - col_stop: 81 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 103 - span: - line_start: 10 - line_stop: 10 - col_start: 81 - col_stop: 82 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 10 - line_stop: 10 - col_start: 82 - col_stop: 83 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - span: - line_start: 10 - line_stop: 10 - col_start: 73 - col_stop: 84 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - op: Eq - span: - line_start: 10 - line_stop: 10 - col_start: 63 - col_stop: 84 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - op: And - span: - line_start: 10 - line_stop: 10 - col_start: 12 - col_stop: 84 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 84 - path: compiler-test - content: " return hello == s1 && \"nope\" != s2 && \"es\" == s2[1..3] && concat == \"Good dog!\";" - span: - line_start: 3 - line_stop: 11 - col_start: 54 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 11 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}\n\n\n\n\n\n" + initial_theorem: 62916b502a7017356bd5fbb6527ff51d6a5a57aeb55ed87754157ce8cad41341 + canonicalized_theorem: b0299b9f1ec6927a101d4385a49b69ca9ab542699a9ab6c56024e75e5b034277 + type_inferenced_theorem: 3643e1338fdf04fa531a63b596b26a0225c7a19f67eb600a787918e9fee30db0 diff --git a/tests/expectations/compiler/compiler/string/replace.leo.out b/tests/expectations/compiler/compiler/string/replace.leo.out index 3c25d2ebae..a60b943928 100644 --- a/tests/expectations/compiler/compiler/string/replace.leo.out +++ b/tests/expectations/compiler/compiler/string/replace.leo.out @@ -22,688 +22,6 @@ outputs: out: 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(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "13" - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 17 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" - - Variable: - identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "4" - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 33 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" - output: Boolean - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":7,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1[..4] = s2;\\\"}\"}" - accesses: - - ArrayRange: - - ~ - - Value: - Implicit: - - "4" - - line_start: 4 - line_stop: 4 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " s1[..4] = s2;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " s1[..4] = s2;" - value: - Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1[..4] = s2;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " s1[..4] = s2;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return s1 != \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" - right: - Value: - String: - - - Scalar: 72 - - Scalar: 101 - - Scalar: 108 - - Scalar: 108 - - Scalar: 111 - - Scalar: 44 - - Scalar: 32 - - Scalar: 87 - - Scalar: 111 - - Scalar: 114 - - Scalar: 108 - - Scalar: 100 - - Scalar: 33 - - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 33 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - op: Ne - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 33 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 33 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - span: - line_start: 3 - line_stop: 6 - col_start: 54 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> 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(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "13" - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 17 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" - - Variable: - identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "4" - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 33 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" - output: Boolean - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":7,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1[..4] = s2;\\\"}\"}" - accesses: - - ArrayRange: - - ~ - - Value: - Implicit: - - "4" - - line_start: 4 - line_stop: 4 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " s1[..4] = s2;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " s1[..4] = s2;" - value: - Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1[..4] = s2;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " s1[..4] = s2;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return s1 != \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 72 - span: - line_start: 5 - line_stop: 5 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 5 - line_stop: 5 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 5 - line_stop: 5 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 5 - line_stop: 5 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 44 - span: - line_start: 5 - line_stop: 5 - col_start: 24 - col_stop: 25 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 5 - line_stop: 5 - col_start: 25 - col_stop: 26 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 87 - span: - line_start: 5 - line_stop: 5 - col_start: 26 - col_stop: 27 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 5 - line_stop: 5 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 114 - span: - line_start: 5 - line_stop: 5 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 30 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 31 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 5 - line_stop: 5 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - span: - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 33 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - op: Ne - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 33 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 33 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - span: - line_start: 3 - line_stop: 6 - col_start: 54 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> 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(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "13" - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 17 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" - - Variable: - identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":31,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(s1: [char; 13], s2: [char; 4]) -> bool {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - Char - - - value: "4" - span: - line_start: 3 - line_stop: 3 - col_start: 31 - col_stop: 33 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {" - output: Boolean - block: - statements: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":7,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1[..4] = s2;\\\"}\"}" - accesses: - - ArrayRange: - - ~ - - Value: - Integer: - - U32 - - "4" - - line_start: 4 - line_stop: 4 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " s1[..4] = s2;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 12 - path: compiler-test - content: " s1[..4] = s2;" - value: - Identifier: "{\"name\":\"s2\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" s1[..4] = s2;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 17 - path: compiler-test - content: " s1[..4] = s2;" - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"s1\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return s1 != \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}" - right: - ArrayInline: - elements: - - Expression: - Value: - Char: - character: - Scalar: 72 - span: - line_start: 5 - line_stop: 5 - col_start: 19 - col_stop: 20 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 101 - span: - line_start: 5 - line_stop: 5 - col_start: 20 - col_stop: 21 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 5 - line_stop: 5 - col_start: 21 - col_stop: 22 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 5 - line_stop: 5 - col_start: 22 - col_stop: 23 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 5 - line_stop: 5 - col_start: 23 - col_stop: 24 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 44 - span: - line_start: 5 - line_stop: 5 - col_start: 24 - col_stop: 25 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 32 - span: - line_start: 5 - line_stop: 5 - col_start: 25 - col_stop: 26 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 87 - span: - line_start: 5 - line_stop: 5 - col_start: 26 - col_stop: 27 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 111 - span: - line_start: 5 - line_stop: 5 - col_start: 27 - col_stop: 28 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 114 - span: - line_start: 5 - line_stop: 5 - col_start: 28 - col_stop: 29 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 108 - span: - line_start: 5 - line_stop: 5 - col_start: 29 - col_stop: 30 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 100 - span: - line_start: 5 - line_stop: 5 - col_start: 30 - col_stop: 31 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - - Expression: - Value: - Char: - character: - Scalar: 33 - span: - line_start: 5 - line_stop: 5 - col_start: 31 - col_stop: 32 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - span: - line_start: 5 - line_stop: 5 - col_start: 18 - col_stop: 33 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - op: Ne - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 33 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 33 - path: compiler-test - content: " return s1 != \"Hello, World!\";" - span: - line_start: 3 - line_stop: 6 - col_start: 54 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}" - span: - line_start: 3 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(s1: [char; 13], s2: [char; 4]) -> bool {\n...\n}\n" + initial_theorem: 6c161515e03a95ab1eba6e94a0de9bdd6f85750a99000f66a2c6c518179c6dc0 + canonicalized_theorem: c3d2fe2a37ba42e8423d571232ddc1c745c934f3772e3abf4a317816497c73f2 + type_inferenced_theorem: 80cfa7238e4a4ed1f05cc5a5c97a00f5c7db1eee377107d4f92830d41e17233d diff --git a/tests/expectations/compiler/compiler/tuples/access.leo.out b/tests/expectations/compiler/compiler/tuples/access.leo.out index b23a2d5c88..536aea8c45 100644 --- a/tests/expectations/compiler/compiler/tuples/access.leo.out +++ b/tests/expectations/compiler/compiler/tuples/access.leo.out @@ -19,987 +19,6 @@ outputs: c: 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, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - Boolean - - Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {" - output: - Tuple: - - Boolean - - Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (false, false, true).0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let b = (false, false, true).0;" - type_: ~ - value: - TupleAccess: - tuple: - TupleInit: - elements: - - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 19 - path: compiler-test - content: " let b = (false, false, true).0;" - - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 26 - path: compiler-test - content: " let b = (false, false, true).0;" - - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 28 - col_stop: 32 - path: compiler-test - content: " let b = (false, false, true).0;" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 33 - path: compiler-test - content: " let b = (false, false, true).0;" - index: - value: "0" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 35 - path: compiler-test - content: " let b = (false, false, true).0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 35 - path: compiler-test - content: " let b = (false, false, true).0;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let c = (false, true, false).1;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let c = (false, true, false).1;" - type_: ~ - value: - TupleAccess: - tuple: - TupleInit: - elements: - - Value: - Boolean: - - "false" - - line_start: 5 - line_stop: 5 - col_start: 14 - col_stop: 19 - path: compiler-test - content: " let c = (false, true, false).1;" - - Value: - Boolean: - - "true" - - line_start: 5 - line_stop: 5 - col_start: 21 - col_stop: 25 - path: compiler-test - content: " let c = (false, true, false).1;" - - Value: - Boolean: - - "false" - - line_start: 5 - line_stop: 5 - col_start: 27 - col_stop: 32 - path: compiler-test - content: " let c = (false, true, false).1;" - span: - line_start: 5 - line_stop: 5 - col_start: 13 - col_stop: 33 - path: compiler-test - content: " let c = (false, true, false).1;" - index: - value: "1" - span: - line_start: 5 - line_stop: 5 - col_start: 13 - col_stop: 35 - path: compiler-test - content: " let c = (false, true, false).1;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 35 - path: compiler-test - content: " let c = (false, true, false).1;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = (true, false, false).2;\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let d = (true, false, false).2;" - type_: ~ - value: - TupleAccess: - tuple: - TupleInit: - elements: - - Value: - Boolean: - - "true" - - line_start: 6 - line_stop: 6 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " let d = (true, false, false).2;" - - Value: - Boolean: - - "false" - - line_start: 6 - line_stop: 6 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " let d = (true, false, false).2;" - - Value: - Boolean: - - "false" - - line_start: 6 - line_stop: 6 - col_start: 27 - col_stop: 32 - path: compiler-test - content: " let d = (true, false, false).2;" - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 33 - path: compiler-test - content: " let d = (true, false, false).2;" - index: - value: "2" - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 35 - path: compiler-test - content: " let d = (true, false, false).2;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 35 - path: compiler-test - content: " let d = (true, false, false).2;" - - Return: - expression: - TupleInit: - elements: - - Binary: - left: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" - index: - value: "0" - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 21 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - - Binary: - left: - Binary: - left: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" - index: - value: "1" - span: - line_start: 8 - line_stop: 8 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 23 - col_stop: 31 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - right: - Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 23 - col_stop: 36 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 37 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 37 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - span: - line_start: 3 - line_stop: 9 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" - span: - line_start: 3 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (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(a: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - Boolean - - Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {" - output: - Tuple: - - Boolean - - Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (false, false, true).0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let b = (false, false, true).0;" - type_: ~ - value: - TupleAccess: - tuple: - TupleInit: - elements: - - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 19 - path: compiler-test - content: " let b = (false, false, true).0;" - - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 26 - path: compiler-test - content: " let b = (false, false, true).0;" - - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 28 - col_stop: 32 - path: compiler-test - content: " let b = (false, false, true).0;" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 33 - path: compiler-test - content: " let b = (false, false, true).0;" - index: - value: "0" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 35 - path: compiler-test - content: " let b = (false, false, true).0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 35 - path: compiler-test - content: " let b = (false, false, true).0;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let c = (false, true, false).1;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let c = (false, true, false).1;" - type_: ~ - value: - TupleAccess: - tuple: - TupleInit: - elements: - - Value: - Boolean: - - "false" - - line_start: 5 - line_stop: 5 - col_start: 14 - col_stop: 19 - path: compiler-test - content: " let c = (false, true, false).1;" - - Value: - Boolean: - - "true" - - line_start: 5 - line_stop: 5 - col_start: 21 - col_stop: 25 - path: compiler-test - content: " let c = (false, true, false).1;" - - Value: - Boolean: - - "false" - - line_start: 5 - line_stop: 5 - col_start: 27 - col_stop: 32 - path: compiler-test - content: " let c = (false, true, false).1;" - span: - line_start: 5 - line_stop: 5 - col_start: 13 - col_stop: 33 - path: compiler-test - content: " let c = (false, true, false).1;" - index: - value: "1" - span: - line_start: 5 - line_stop: 5 - col_start: 13 - col_stop: 35 - path: compiler-test - content: " let c = (false, true, false).1;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 35 - path: compiler-test - content: " let c = (false, true, false).1;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = (true, false, false).2;\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let d = (true, false, false).2;" - type_: ~ - value: - TupleAccess: - tuple: - TupleInit: - elements: - - Value: - Boolean: - - "true" - - line_start: 6 - line_stop: 6 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " let d = (true, false, false).2;" - - Value: - Boolean: - - "false" - - line_start: 6 - line_stop: 6 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " let d = (true, false, false).2;" - - Value: - Boolean: - - "false" - - line_start: 6 - line_stop: 6 - col_start: 27 - col_stop: 32 - path: compiler-test - content: " let d = (true, false, false).2;" - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 33 - path: compiler-test - content: " let d = (true, false, false).2;" - index: - value: "2" - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 35 - path: compiler-test - content: " let d = (true, false, false).2;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 35 - path: compiler-test - content: " let d = (true, false, false).2;" - - Return: - expression: - TupleInit: - elements: - - Binary: - left: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" - index: - value: "0" - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 21 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - - Binary: - left: - Binary: - left: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" - index: - value: "1" - span: - line_start: 8 - line_stop: 8 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 23 - col_stop: 31 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - right: - Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 23 - col_stop: 36 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 37 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 37 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - span: - line_start: 3 - line_stop: 9 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" - span: - line_start: 3 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (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(a: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - Boolean - - Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {" - output: - Tuple: - - Boolean - - Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (false, false, true).0;\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let b = (false, false, true).0;" - type_: Boolean - value: - TupleAccess: - tuple: - TupleInit: - elements: - - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 19 - path: compiler-test - content: " let b = (false, false, true).0;" - - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 21 - col_stop: 26 - path: compiler-test - content: " let b = (false, false, true).0;" - - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 28 - col_stop: 32 - path: compiler-test - content: " let b = (false, false, true).0;" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 33 - path: compiler-test - content: " let b = (false, false, true).0;" - index: - value: "0" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 35 - path: compiler-test - content: " let b = (false, false, true).0;" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 35 - path: compiler-test - content: " let b = (false, false, true).0;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let c = (false, true, false).1;\\\"}\"}" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let c = (false, true, false).1;" - type_: Boolean - value: - TupleAccess: - tuple: - TupleInit: - elements: - - Value: - Boolean: - - "false" - - line_start: 5 - line_stop: 5 - col_start: 14 - col_stop: 19 - path: compiler-test - content: " let c = (false, true, false).1;" - - Value: - Boolean: - - "true" - - line_start: 5 - line_stop: 5 - col_start: 21 - col_stop: 25 - path: compiler-test - content: " let c = (false, true, false).1;" - - Value: - Boolean: - - "false" - - line_start: 5 - line_stop: 5 - col_start: 27 - col_stop: 32 - path: compiler-test - content: " let c = (false, true, false).1;" - span: - line_start: 5 - line_stop: 5 - col_start: 13 - col_stop: 33 - path: compiler-test - content: " let c = (false, true, false).1;" - index: - value: "1" - span: - line_start: 5 - line_stop: 5 - col_start: 13 - col_stop: 35 - path: compiler-test - content: " let c = (false, true, false).1;" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 35 - path: compiler-test - content: " let c = (false, true, false).1;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let d = (true, false, false).2;\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let d = (true, false, false).2;" - type_: Boolean - value: - TupleAccess: - tuple: - TupleInit: - elements: - - Value: - Boolean: - - "true" - - line_start: 6 - line_stop: 6 - col_start: 14 - col_stop: 18 - path: compiler-test - content: " let d = (true, false, false).2;" - - Value: - Boolean: - - "false" - - line_start: 6 - line_stop: 6 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " let d = (true, false, false).2;" - - Value: - Boolean: - - "false" - - line_start: 6 - line_stop: 6 - col_start: 27 - col_stop: 32 - path: compiler-test - content: " let d = (true, false, false).2;" - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 33 - path: compiler-test - content: " let d = (true, false, false).2;" - index: - value: "2" - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 35 - path: compiler-test - content: " let d = (true, false, false).2;" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 35 - path: compiler-test - content: " let d = (true, false, false).2;" - - Return: - expression: - TupleInit: - elements: - - Binary: - left: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" - index: - value: "0" - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - right: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 13 - col_stop: 21 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - - Binary: - left: - Binary: - left: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" - index: - value: "1" - span: - line_start: 8 - line_stop: 8 - col_start: 23 - col_stop: 26 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - right: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 23 - col_stop: 31 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - right: - Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0 == b, a.1 == c == d);\\\"}\"}" - op: Eq - span: - line_start: 8 - line_stop: 8 - col_start: 23 - col_stop: 36 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 37 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 37 - path: compiler-test - content: " return (a.0 == b, a.1 == c == d);" - span: - line_start: 3 - line_stop: 9 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" - span: - line_start: 3 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}\n\n\n\n" + initial_theorem: 02efc1a786611a1cb0fa0e03d86c4d4f8cb3e54c8a6d7815505272447ceef122 + canonicalized_theorem: 02efc1a786611a1cb0fa0e03d86c4d4f8cb3e54c8a6d7815505272447ceef122 + type_inferenced_theorem: f1fceaf70ce698e7fe0040fed31f1a03d0cc8133338712ea0957122d84d1da9d diff --git a/tests/expectations/compiler/compiler/tuples/basic.leo.out b/tests/expectations/compiler/compiler/tuples/basic.leo.out index 0c03149168..26df44b03b 100644 --- a/tests/expectations/compiler/compiler/tuples/basic.leo.out +++ b/tests/expectations/compiler/compiler/tuples/basic.leo.out @@ -19,414 +19,6 @@ outputs: c: 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, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - Boolean - - Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {" - output: - Tuple: - - Boolean - - 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 = (true, false);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = (true, false);" - type_: ~ - value: - TupleInit: - elements: - - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 20 - path: compiler-test - content: " const a = (true, false);" - - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 22 - col_stop: 27 - path: compiler-test - content: " const a = (true, false);" - span: - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 28 - path: compiler-test - content: " const a = (true, false);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 28 - path: compiler-test - content: " const a = (true, false);" - - Return: - expression: - TupleInit: - elements: - - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" - index: - value: "0" - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " return (a.0, a.1);" - - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" - index: - value: "1" - span: - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 3 - line_stop: 7 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - Boolean - - Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {" - output: - Tuple: - - Boolean - - 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 = (true, false);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = (true, false);" - type_: ~ - value: - TupleInit: - elements: - - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 20 - path: compiler-test - content: " const a = (true, false);" - - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 22 - col_stop: 27 - path: compiler-test - content: " const a = (true, false);" - span: - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 28 - path: compiler-test - content: " const a = (true, false);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 28 - path: compiler-test - content: " const a = (true, false);" - - Return: - expression: - TupleInit: - elements: - - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" - index: - value: "0" - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " return (a.0, a.1);" - - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" - index: - value: "1" - span: - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 3 - line_stop: 7 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - Boolean - - Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {" - output: - Tuple: - - Boolean - - 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 = (true, false);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 11 - col_stop: 12 - path: compiler-test - content: " const a = (true, false);" - type_: - Tuple: - - Boolean - - Boolean - value: - TupleInit: - elements: - - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 16 - col_stop: 20 - path: compiler-test - content: " const a = (true, false);" - - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 22 - col_stop: 27 - path: compiler-test - content: " const a = (true, false);" - span: - line_start: 4 - line_stop: 4 - col_start: 15 - col_stop: 28 - path: compiler-test - content: " const a = (true, false);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 28 - path: compiler-test - content: " const a = (true, false);" - - Return: - expression: - TupleInit: - elements: - - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" - index: - value: "0" - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " return (a.0, a.1);" - - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" - index: - value: "1" - span: - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 3 - line_stop: 7 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}\n\n" + initial_theorem: af436e46b9e39a856338f4b88de25b7a1fa350de7dc9278479163dcc08b8323e + canonicalized_theorem: af436e46b9e39a856338f4b88de25b7a1fa350de7dc9278479163dcc08b8323e + type_inferenced_theorem: 6a2c7905e8e8c79d318dde7e4c803e1b2b5b9755e480f0a9c3152ea9ae9240e6 diff --git a/tests/expectations/compiler/compiler/tuples/dependent.leo.out b/tests/expectations/compiler/compiler/tuples/dependent.leo.out index abf2cc590c..ebf45804ba 100644 --- a/tests/expectations/compiler/compiler/tuples/dependent.leo.out +++ b/tests/expectations/compiler/compiler/tuples/dependent.leo.out @@ -19,606 +19,6 @@ outputs: c: 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, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - Boolean - - Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {" - output: - Tuple: - - Boolean - - Boolean - 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 = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - type_: ~ - value: - TupleInit: - elements: - - Ternary: - condition: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - index: - value: "0" - span: - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 17 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - if_true: - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - if_false: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 28 - col_stop: 32 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 32 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - - Ternary: - condition: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - index: - value: "1" - span: - line_start: 4 - line_stop: 4 - col_start: 34 - col_stop: 37 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - if_true: - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 45 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - if_false: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 48 - col_stop: 52 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 34 - col_stop: 52 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 53 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - - Return: - expression: - TupleInit: - elements: - - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" - index: - value: "0" - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " return (a.0, a.1);" - - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" - index: - value: "1" - span: - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 3 - line_stop: 7 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - Boolean - - Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {" - output: - Tuple: - - Boolean - - Boolean - 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 = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - type_: ~ - value: - TupleInit: - elements: - - Ternary: - condition: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - index: - value: "0" - span: - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 17 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - if_true: - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - if_false: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 28 - col_stop: 32 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 32 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - - Ternary: - condition: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - index: - value: "1" - span: - line_start: 4 - line_stop: 4 - col_start: 34 - col_stop: 37 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - if_true: - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 45 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - if_false: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 48 - col_stop: 52 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 34 - col_stop: 52 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 53 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - - Return: - expression: - TupleInit: - elements: - - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" - index: - value: "0" - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " return (a.0, a.1);" - - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" - index: - value: "1" - span: - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 3 - line_stop: 7 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - Boolean - - Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {" - output: - Tuple: - - Boolean - - Boolean - 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 = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - type_: - Tuple: - - Boolean - - Boolean - value: - TupleInit: - elements: - - Ternary: - condition: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - index: - value: "0" - span: - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 17 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - if_true: - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - if_false: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 28 - col_stop: 32 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 14 - col_stop: 32 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - - Ternary: - condition: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - index: - value: "1" - span: - line_start: 4 - line_stop: 4 - col_start: 34 - col_stop: 37 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - if_true: - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 40 - col_stop: 45 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - if_false: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 48 - col_stop: 52 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 34 - col_stop: 52 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 53 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 53 - path: compiler-test - content: " let a = (a.0 ? false : true, a.1 ? false : true);" - - Return: - expression: - TupleInit: - elements: - - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" - index: - value: "0" - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " return (a.0, a.1);" - - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a.0, a.1);\\\"}\"}" - index: - value: "1" - span: - line_start: 6 - line_stop: 6 - col_start: 18 - col_stop: 21 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 22 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 22 - path: compiler-test - content: " return (a.0, a.1);" - span: - line_start: 3 - line_stop: 7 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}\n\n" + initial_theorem: 8d3a5cc77cf14db7140dace16fc2f590f6ddc73ed98932021bad4f90b5e99824 + canonicalized_theorem: 8d3a5cc77cf14db7140dace16fc2f590f6ddc73ed98932021bad4f90b5e99824 + type_inferenced_theorem: 7cd799d02f04c5426c8a316c9654db286bbab879e8ced2505152f6264764ba63 diff --git a/tests/expectations/compiler/compiler/tuples/destructured.leo.out b/tests/expectations/compiler/compiler/tuples/destructured.leo.out index ff700ea12f..bc538fe8f1 100644 --- a/tests/expectations/compiler/compiler/tuples/destructured.leo.out +++ b/tests/expectations/compiler/compiler/tuples/destructured.leo.out @@ -19,567 +19,6 @@ outputs: c: 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)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - Boolean - - Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {" - output: - Tuple: - - Boolean - - Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - type_: ~ - value: - TupleInit: - elements: - - Ternary: - condition: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - index: - value: "0" - span: - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - if_true: - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 25 - col_stop: 30 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - if_false: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 33 - col_stop: 37 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 37 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - - Ternary: - condition: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":39,\\\"col_stop\\\":40,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - index: - value: "1" - span: - line_start: 4 - line_stop: 4 - col_start: 39 - col_stop: 42 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - if_true: - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 45 - col_stop: 50 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - if_false: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 53 - col_stop: 57 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 39 - col_stop: 57 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 58 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 58 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - - Return: - expression: - TupleInit: - elements: - - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b, a);\\\"}\"}" - - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b, a);\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return (b, a);" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return (b, a);" - span: - line_start: 3 - line_stop: 7 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - Boolean - - Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {" - output: - Tuple: - - Boolean - - Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - type_: ~ - value: - TupleInit: - elements: - - Ternary: - condition: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - index: - value: "0" - span: - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - if_true: - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 25 - col_stop: 30 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - if_false: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 33 - col_stop: 37 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 37 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - - Ternary: - condition: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":39,\\\"col_stop\\\":40,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - index: - value: "1" - span: - line_start: 4 - line_stop: 4 - col_start: 39 - col_stop: 42 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - if_true: - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 45 - col_stop: 50 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - if_false: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 53 - col_stop: 57 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 39 - col_stop: 57 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 58 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 58 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - - Return: - expression: - TupleInit: - elements: - - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b, a);\\\"}\"}" - - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b, a);\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return (b, a);" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return (b, a);" - span: - line_start: 3 - line_stop: 7 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - Boolean - - Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {" - output: - Tuple: - - Boolean - - Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 10 - col_stop: 11 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 14 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - type_: - Tuple: - - Boolean - - Boolean - value: - TupleInit: - elements: - - Ternary: - condition: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - index: - value: "0" - span: - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 22 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - if_true: - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 25 - col_stop: 30 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - if_false: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 33 - col_stop: 37 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 19 - col_stop: 37 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - - Ternary: - condition: - TupleAccess: - tuple: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":39,\\\"col_stop\\\":40,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a, b) = (a.0 ? false : true, a.1 ? false : true);\\\"}\"}" - index: - value: "1" - span: - line_start: 4 - line_stop: 4 - col_start: 39 - col_stop: 42 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - if_true: - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 45 - col_stop: 50 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - if_false: - Value: - Boolean: - - "true" - - line_start: 4 - line_stop: 4 - col_start: 53 - col_stop: 57 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 39 - col_stop: 57 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 18 - col_stop: 58 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 58 - path: compiler-test - content: " let (a, b) = (a.0 ? false : true, a.1 ? false : true);" - - Return: - expression: - TupleInit: - elements: - - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b, a);\\\"}\"}" - - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b, a);\\\"}\"}" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 18 - path: compiler-test - content: " return (b, a);" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 18 - path: compiler-test - content: " return (b, a);" - span: - line_start: 3 - line_stop: 7 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}\n\n" + initial_theorem: 6d6d745c5cfeeb6963cdc1f91b133b7a1526ed4ab3b979416b26a276146d8409 + canonicalized_theorem: 6d6d745c5cfeeb6963cdc1f91b133b7a1526ed4ab3b979416b26a276146d8409 + type_inferenced_theorem: d3762f581f0bf814fae646c47016e6a809bf1aab564ecc7f2d34a0c54965972b diff --git a/tests/expectations/compiler/compiler/tuples/nested_access.leo.out b/tests/expectations/compiler/compiler/tuples/nested_access.leo.out index ff52ddfdd0..6afa50da75 100644 --- a/tests/expectations/compiler/compiler/tuples/nested_access.leo.out +++ b/tests/expectations/compiler/compiler/tuples/nested_access.leo.out @@ -19,596 +19,6 @@ outputs: c: 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, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - Boolean - - Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {" - output: - Tuple: - - Boolean - - Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (a, false);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let b = (a, false);" - type_: ~ - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (a, false);\\\"}\"}" - - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 22 - path: compiler-test - content: " let b = (a, false);" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 23 - path: compiler-test - content: " let b = (a, false);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " let b = (a, false);" - - Return: - expression: - TupleInit: - elements: - - Binary: - left: - TupleAccess: - tuple: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" - index: - value: "1" - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - right: - TupleAccess: - tuple: - TupleAccess: - tuple: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" - index: - value: "0" - span: - line_start: 6 - line_stop: 6 - col_start: 20 - col_stop: 23 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - index: - value: "0" - span: - line_start: 6 - line_stop: 6 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - op: Or - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 25 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - - Binary: - left: - TupleAccess: - tuple: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" - index: - value: "1" - span: - line_start: 6 - line_stop: 6 - col_start: 27 - col_stop: 30 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - right: - TupleAccess: - tuple: - TupleAccess: - tuple: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" - index: - value: "0" - span: - line_start: 6 - line_stop: 6 - col_start: 34 - col_stop: 37 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - index: - value: "1" - span: - line_start: 6 - line_stop: 6 - col_start: 34 - col_stop: 39 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - op: And - span: - line_start: 6 - line_stop: 6 - col_start: 27 - col_stop: 39 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 40 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 40 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - span: - line_start: 3 - line_stop: 7 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - Boolean - - Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {" - output: - Tuple: - - Boolean - - Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (a, false);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let b = (a, false);" - type_: ~ - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (a, false);\\\"}\"}" - - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 22 - path: compiler-test - content: " let b = (a, false);" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 23 - path: compiler-test - content: " let b = (a, false);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " let b = (a, false);" - - Return: - expression: - TupleInit: - elements: - - Binary: - left: - TupleAccess: - tuple: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" - index: - value: "1" - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - right: - TupleAccess: - tuple: - TupleAccess: - tuple: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" - index: - value: "0" - span: - line_start: 6 - line_stop: 6 - col_start: 20 - col_stop: 23 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - index: - value: "0" - span: - line_start: 6 - line_stop: 6 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - op: Or - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 25 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - - Binary: - left: - TupleAccess: - tuple: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" - index: - value: "1" - span: - line_start: 6 - line_stop: 6 - col_start: 27 - col_stop: 30 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - right: - TupleAccess: - tuple: - TupleAccess: - tuple: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" - index: - value: "0" - span: - line_start: 6 - line_stop: 6 - col_start: 34 - col_stop: 37 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - index: - value: "1" - span: - line_start: 6 - line_stop: 6 - col_start: 34 - col_stop: 39 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - op: And - span: - line_start: 6 - line_stop: 6 - col_start: 27 - col_stop: 39 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 40 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 40 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - span: - line_start: 3 - line_stop: 7 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, 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: (bool, bool)) -> (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)) -> (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)) -> (bool, bool) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - Boolean - - Boolean - span: - line_start: 3 - line_stop: 3 - col_start: 15 - col_stop: 16 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {" - output: - Tuple: - - Boolean - - Boolean - block: - statements: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (a, false);\\\"}\"}" - span: - line_start: 4 - line_stop: 4 - col_start: 9 - col_stop: 10 - path: compiler-test - content: " let b = (a, false);" - type_: - Tuple: - - Tuple: - - Boolean - - Boolean - - Boolean - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = (a, false);\\\"}\"}" - - Value: - Boolean: - - "false" - - line_start: 4 - line_stop: 4 - col_start: 17 - col_stop: 22 - path: compiler-test - content: " let b = (a, false);" - span: - line_start: 4 - line_stop: 4 - col_start: 13 - col_stop: 23 - path: compiler-test - content: " let b = (a, false);" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 23 - path: compiler-test - content: " let b = (a, false);" - - Return: - expression: - TupleInit: - elements: - - Binary: - left: - TupleAccess: - tuple: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" - index: - value: "1" - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 16 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - right: - TupleAccess: - tuple: - TupleAccess: - tuple: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" - index: - value: "0" - span: - line_start: 6 - line_stop: 6 - col_start: 20 - col_stop: 23 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - index: - value: "0" - span: - line_start: 6 - line_stop: 6 - col_start: 20 - col_stop: 25 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - op: Or - span: - line_start: 6 - line_stop: 6 - col_start: 13 - col_stop: 25 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - - Binary: - left: - TupleAccess: - tuple: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" - index: - value: "1" - span: - line_start: 6 - line_stop: 6 - col_start: 27 - col_stop: 30 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - right: - TupleAccess: - tuple: - TupleAccess: - tuple: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (b.1 || b.0.0, b.1 && b.0.1);\\\"}\"}" - index: - value: "0" - span: - line_start: 6 - line_stop: 6 - col_start: 34 - col_stop: 37 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - index: - value: "1" - span: - line_start: 6 - line_stop: 6 - col_start: 34 - col_stop: 39 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - op: And - span: - line_start: 6 - line_stop: 6 - col_start: 27 - col_stop: 39 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 40 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - span: - line_start: 6 - line_stop: 6 - col_start: 5 - col_stop: 40 - path: compiler-test - content: " return (b.1 || b.0.0, b.1 && b.0.1);" - span: - line_start: 3 - line_stop: 7 - col_start: 48 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}" - span: - line_start: 3 - line_stop: 7 - col_start: 1 - col_stop: 2 - path: compiler-test - content: "function main(a: (bool, bool)) -> (bool, bool) {\n...\n}\n\n" + initial_theorem: 972a1898ed642a83e5a49f4fd385d6a65a5021669cd28235dcc47e68cec836f7 + canonicalized_theorem: 972a1898ed642a83e5a49f4fd385d6a65a5021669cd28235dcc47e68cec836f7 + type_inferenced_theorem: a89fb16b36f7e1389f143ae7d15fe535982cfa1a8eb8e0a1e7a49a81d53d1c9c From 2f000a971a697302d50075b7976eeaf901829204 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Wed, 14 Jul 2021 03:09:44 -0700 Subject: [PATCH 3/8] digest is necessary --- compiler/tests/test.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/tests/test.rs b/compiler/tests/test.rs index 79768cdcbb..a214af7a8a 100644 --- a/compiler/tests/test.rs +++ b/compiler/tests/test.rs @@ -34,8 +34,6 @@ use leo_compiler::{ TheoremOptions, }; -use sha2::Sha256; - pub type EdwardsTestCompiler = Compiler<'static, Fq, EdwardsGroupType>; // pub type EdwardsConstrainedValue = ConstrainedValue<'static, Fq, EdwardsGroupType>; @@ -61,6 +59,8 @@ fn new_compiler(path: PathBuf, theorem_options: Option) -> Edwar } fn hash(input: String) -> String { + use sha2::{Digest, Sha256}; + let mut hasher = Sha256::new(); hasher.update(input.as_bytes()); let output = hasher.finalize(); From add64ae11ab7bb94c42438dd5712f7aa6eca6982 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Wed, 14 Jul 2021 03:24:08 -0700 Subject: [PATCH 4/8] Refactor Proof/Theorem to Snapshots --- compiler/src/compiler.rs | 22 +++++++++++----------- compiler/src/option.rs | 4 ++-- leo/commands/build.rs | 40 ++++++++++++++++++++-------------------- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/compiler/src/compiler.rs b/compiler/src/compiler.rs index a3f3475593..34e55b7a7f 100644 --- a/compiler/src/compiler.rs +++ b/compiler/src/compiler.rs @@ -18,11 +18,11 @@ use crate::{ constraints::{generate_constraints, generate_test_constraints}, errors::CompilerError, + AstSnapshotOptions, CompilerOptions, GroupType, Output, OutputFile, - TheoremOptions, TypeInferencePhase, }; pub use leo_asg::{new_context, AsgContext as Context, AsgContext}; @@ -67,7 +67,7 @@ pub struct Compiler<'a, F: PrimeField, G: GroupType> { context: AsgContext<'a>, asg: Option>, options: CompilerOptions, - proof_options: TheoremOptions, + ast_snapshot_options: AstSnapshotOptions, _engine: PhantomData, _group: PhantomData, } @@ -82,7 +82,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { output_directory: PathBuf, context: AsgContext<'a>, options: Option, - proof_options: Option, + ast_snapshot_options: Option, ) -> Self { Self { program_name: package_name.clone(), @@ -93,7 +93,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { asg: None, context, options: options.unwrap_or_default(), - proof_options: proof_options.unwrap_or_default(), + ast_snapshot_options: ast_snapshot_options.unwrap_or_default(), _engine: PhantomData, _group: PhantomData, } @@ -112,7 +112,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { output_directory: PathBuf, context: AsgContext<'a>, options: Option, - proof_options: Option, + ast_snapshot_options: Option, ) -> Result { let mut compiler = Self::new( package_name, @@ -120,7 +120,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { output_directory, context, options, - proof_options, + ast_snapshot_options, ); compiler.parse_program()?; @@ -151,7 +151,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { state_path: &Path, context: AsgContext<'a>, options: Option, - proof_options: Option, + ast_snapshot_options: Option, ) -> Result { let mut compiler = Self::new( package_name, @@ -159,7 +159,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { output_directory, context, options, - proof_options, + ast_snapshot_options, ); compiler.parse_input(input_string, input_path, state_string, state_path)?; @@ -240,7 +240,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { let mut ast: leo_ast::Ast = parse_ast(self.main_file_path.to_str().unwrap_or_default(), program_string)?; - if self.proof_options.initial { + if self.ast_snapshot_options.initial { ast.to_json_file(self.output_directory.clone(), "initial_ast.json")?; } @@ -248,7 +248,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { if self.options.canonicalization_enabled { ast.canonicalize()?; - if self.proof_options.canonicalized { + if self.ast_snapshot_options.canonicalized { ast.to_json_file(self.output_directory.clone(), "canonicalization_ast.json")?; } } @@ -266,7 +266,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { &mut leo_imports::ImportParser::new(self.main_file_path.clone()), )?; - if self.proof_options.type_inferenced { + if self.ast_snapshot_options.type_inferenced { let new_ast = TypeInferencePhase::default() .phase_ast(&self.program, &asg.clone().into_repr()) .expect("Failed to produce type inference ast."); diff --git a/compiler/src/option.rs b/compiler/src/option.rs index a783a81c33..36617d3a30 100644 --- a/compiler/src/option.rs +++ b/compiler/src/option.rs @@ -38,13 +38,13 @@ impl Default for CompilerOptions { } #[derive(Clone)] -pub struct TheoremOptions { +pub struct AstSnapshotOptions { pub initial: bool, pub canonicalized: bool, pub type_inferenced: bool, } -impl Default for TheoremOptions { +impl Default for AstSnapshotOptions { fn default() -> Self { Self { initial: false, diff --git a/leo/commands/build.rs b/leo/commands/build.rs index ef701b4d87..7811248f5d 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -18,8 +18,8 @@ use crate::{commands::Command, context::Context}; use leo_compiler::{ compiler::{thread_leaked_context, Compiler}, group::targets::edwards_bls12::EdwardsGroupType, + AstSnapshotOptions, CompilerOptions, - TheoremOptions, }; use leo_package::{ inputs::*, @@ -44,14 +44,14 @@ pub struct BuildOptions { pub disable_code_elimination: bool, #[structopt(long, help = "Disable all compiler optimizations")] pub disable_all_optimizations: bool, - #[structopt(long, help = "Writes all theorem input AST files.")] - pub enable_all_theorems: bool, - #[structopt(long, help = "Writes AST files needed for the initial theorem before any changes.")] - pub enable_initial_theorem: bool, - #[structopt(long, help = "Writes AST files needed for canonicalization theorem.")] - pub enable_canonicalized_theorem: bool, - #[structopt(long, help = "Writes AST files needed for type inference theorem.")] - pub enable_type_inferenced_theorem: bool, + #[structopt(long, help = "Writes all AST snapshots for the different compiler phases.")] + pub enable_all_ast_snapshots: bool, + #[structopt(long, help = "Writes AST snapshot of the initial parse.")] + pub enable_initial_ast_snapshot: bool, + #[structopt(long, help = "Writes AST snapshot after the canonicalization phase.")] + pub enable_canonicalized_ast_snapshot: bool, + #[structopt(long, help = "Writes AST snapshot after the type inference phase.")] + pub enable_type_inferenced_ast_snapshot: bool, } impl Default for BuildOptions { @@ -60,10 +60,10 @@ impl Default for BuildOptions { disable_constant_folding: true, disable_code_elimination: true, disable_all_optimizations: true, - enable_all_theorems: false, - enable_initial_theorem: false, - enable_canonicalized_theorem: false, - enable_type_inferenced_theorem: false, + enable_all_ast_snapshots: false, + enable_initial_ast_snapshot: false, + enable_canonicalized_ast_snapshot: false, + enable_type_inferenced_ast_snapshot: false, } } } @@ -86,19 +86,19 @@ impl From for CompilerOptions { } } -impl From for TheoremOptions { +impl From for AstSnapshotOptions { fn from(options: BuildOptions) -> Self { - if options.enable_all_theorems { - TheoremOptions { + if options.enable_all_ast_snapshots { + AstSnapshotOptions { initial: true, canonicalized: true, type_inferenced: true, } } else { - TheoremOptions { - initial: options.enable_initial_theorem, - canonicalized: options.enable_canonicalized_theorem, - type_inferenced: options.enable_type_inferenced_theorem, + AstSnapshotOptions { + initial: options.enable_initial_ast_snapshot, + canonicalized: options.enable_canonicalized_ast_snapshot, + type_inferenced: options.enable_type_inferenced_ast_snapshot, } } } From 8695b11ce022768fd06aa9ae1eb8159606a13136 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Wed, 14 Jul 2021 05:04:09 -0700 Subject: [PATCH 5/8] Forgot to refactor in compiler tests --- compiler/tests/test.rs | 8 ++++---- .../compiler/function/duplicate_definition_fail.leo.out | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/tests/test.rs b/compiler/tests/test.rs index a214af7a8a..e91ef57e76 100644 --- a/compiler/tests/test.rs +++ b/compiler/tests/test.rs @@ -31,7 +31,7 @@ use leo_compiler::{ errors::CompilerError, targets::edwards_bls12::EdwardsGroupType, Output, - TheoremOptions, + AstSnapshotOptions, }; pub type EdwardsTestCompiler = Compiler<'static, Fq, EdwardsGroupType>; @@ -43,7 +43,7 @@ pub(crate) fn make_test_context() -> AsgContext<'static> { new_context(allocator) } -fn new_compiler(path: PathBuf, theorem_options: Option) -> EdwardsTestCompiler { +fn new_compiler(path: PathBuf, theorem_options: Option) -> EdwardsTestCompiler { let program_name = "test".to_string(); let output_dir = PathBuf::from("/tmp/output/"); std::fs::create_dir_all(output_dir.clone()).unwrap(); @@ -69,7 +69,7 @@ fn hash(input: String) -> String { pub(crate) fn parse_program( program_string: &str, - theorem_options: Option, + theorem_options: Option, ) -> Result { let mut compiler = new_compiler("compiler-test".into(), theorem_options); @@ -117,7 +117,7 @@ impl Namespace for CompileNamespace { let parsed = parse_program( &test.content, - Some(TheoremOptions { + Some(AstSnapshotOptions { initial: true, canonicalized: true, type_inferenced: true, diff --git a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out index aaffccc60a..3b1bf075b9 100644 --- a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "- Circuit has no constraints, use inputs and registers in program to produce them" + - " --> compiler-test:8:1\n |\n 8 | function main() {\n 9 | ...\n 10 | }\n | ^\n |\n = a function named \"main\" already exists in this scope" From 470a4075f8e17ae9ad4b532add56015d4ee2d55a Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Fri, 16 Jul 2021 03:20:36 -0700 Subject: [PATCH 6/8] refactor theorem to ast for out file hashes, migrate old tests --- compiler/src/lib.rs | 3 + compiler/{tests => src}/test.rs | 20 +- .../canonicalization/array_expansion.json | 359 --- .../canonicalization/array_expansion.leo | 7 - .../canonicalization/array_size_zero_fail.leo | 3 - .../big_self_in_circuit_replacement.json | 438 --- .../big_self_in_circuit_replacement.leo | 19 - .../canonicalization/compound_assignment.json | 2369 ----------------- .../illegal_array_range_fail.leo | 4 - .../canonicalization/input/array_expansion.in | 2 - compiler/tests/canonicalization/mod.rs | 97 - .../string_transformation.json | 1181 -------- .../string_transformation.leo | 8 - compiler/tests/compiler_output/empty.out | 1 - compiler/tests/mod.rs | 123 - compiler/tests/type_inference/basic.json | 1618 ----------- compiler/tests/type_inference/basic.leo | 27 - .../type_inference/for_loop_and_compound.json | 243 -- .../type_inference/for_loop_and_compound.leo | 7 - compiler/tests/type_inference/mod.rs | 85 - tests/compiler/array/array_size_zero_fail.leo | 9 + .../big_self_in_circuit_replacement.leo | 27 + .../big_self_outside_circuit_fail.leo | 6 + .../statements}/compound_assignment.leo | 22 +- tests/compiler/statements/inputs/dummy.in | 5 + tests/compiler/string/inputs/two.in | 5 + .../compiler/string/string_transformation.leo | 14 + .../compiler/compiler/address/equal.leo.out | 6 +- .../compiler/compiler/address/ternary.leo.out | 6 +- .../array/array_size_zero_fail.leo.out | 5 + .../compiler/array/complex_access.leo.out | 6 +- .../compiler/array/equal_initializer.leo.out | 6 +- .../array/equal_initializer_2.leo.out | 6 +- .../compiler/array/input_nested_3x2.leo.out | 6 +- .../compiler/array/input_tuple_3x2.leo.out | 6 +- .../compiler/array/multi_initializer.leo.out | 6 +- .../compiler/compiler/array/nested.leo.out | 6 +- .../compiler/array/nested_3x2_value.leo.out | 6 +- .../compiler/compiler/array/registers.leo.out | 6 +- .../compiler/compiler/array/slice.leo.out | 6 +- .../compiler/array/slice_lower.leo.out | 6 +- .../compiler/compiler/array/spread.leo.out | 6 +- .../compiler/array/ternary_in_array.leo.out | 6 +- .../compiler/array/tuple_3x2_value.leo.out | 6 +- .../compiler/array/type_input_3x2.leo.out | 6 +- .../compiler/array/type_input_4x3x2.leo.out | 6 +- .../type_nested_value_nested_3x2.leo.out | 6 +- .../type_nested_value_nested_4x3x2.leo.out | 6 +- .../array/type_nested_value_tuple_3x2.leo.out | 6 +- .../type_nested_value_tuple_4x3x2.leo.out | 6 +- .../array/type_tuple_value_nested_3x2.leo.out | 6 +- .../type_tuple_value_nested_4x3x2.leo.out | 6 +- .../array/type_tuple_value_tuple_3x2.leo.out | 6 +- .../type_tuple_value_tuple_4x3x2.leo.out | 6 +- .../compiler/compiler/boolean/and.leo.out | 6 +- .../compiler/boolean/conditional.leo.out | 6 +- .../compiler/compiler/boolean/equal.leo.out | 6 +- .../compiler/boolean/not_equal.leo.out | 6 +- .../compiler/compiler/boolean/or.leo.out | 6 +- .../compiler/compiler/char/circuit.leo.out | 6 +- .../compiler/compiler/char/neq.leo.out | 6 +- .../compiler/char/nonprinting.leo.out | 6 +- .../compiler/compiler/char/out.leo.out | 6 +- .../big_self_in_circuit_replacement.leo.out | 21 + .../big_self_outside_circuit_fail.leo.out | 5 + .../circuits/const_self_variable.leo.out | 6 +- ...ne_circuit_inside_circuit_function.leo.out | 6 +- .../circuits/duplicate_name_context.leo.out | 6 +- .../compiler/compiler/circuits/inline.leo.out | 6 +- .../circuits/inline_member_pass.leo.out | 6 +- .../compiler/circuits/member_function.leo.out | 6 +- .../circuits/member_function_nested.leo.out | 6 +- .../circuits/member_static_function.leo.out | 6 +- .../member_static_function_nested.leo.out | 6 +- .../compiler/circuits/member_variable.leo.out | 6 +- .../member_variable_and_function.leo.out | 6 +- .../circuits/mut_self_variable.leo.out | 6 +- .../circuits/mut_self_variable_branch.leo.out | 6 +- .../mut_self_variable_conditional.leo.out | 6 +- .../compiler/circuits/mut_variable.leo.out | 6 +- .../mutable_call_immutable_context.leo.out | 6 +- .../compiler/circuits/pedersen_mock.leo.out | 6 +- .../compiler/circuits/self_member.leo.out | 6 +- .../compiler/compiler/console/assert.leo.out | 6 +- .../console/conditional_assert.leo.out | 6 +- .../compiler/compiler/console/debug.leo.out | 6 +- .../compiler/compiler/console/error.leo.out | 6 +- .../compiler/compiler/console/log.leo.out | 6 +- .../compiler/console/log_conditional.leo.out | 6 +- .../compiler/console/log_input.leo.out | 6 +- .../compiler/console/log_parameter.leo.out | 6 +- .../console/log_parameter_many.leo.out | 6 +- .../compiler/definition/out_of_order.leo.out | 6 +- .../out_of_order_with_import.leo.out | 6 +- .../compiler/compiler/field/add.leo.out | 6 +- .../compiler/compiler/field/div.leo.out | 6 +- .../compiler/compiler/field/eq.leo.out | 6 +- .../compiler/compiler/field/field.leo.out | 6 +- .../compiler/compiler/field/mul.leo.out | 6 +- .../compiler/compiler/field/negate.leo.out | 6 +- .../compiler/function/array_input.leo.out | 6 +- .../function/array_params_direct_call.leo.out | 6 +- .../function/conditional_return.leo.out | 6 +- .../compiler/compiler/function/empty.leo.out | 6 +- .../compiler/function/iteration.leo.out | 6 +- .../function/iteration_repeated.leo.out | 6 +- .../function/multiple_returns.leo.out | 6 +- .../function/multiple_returns_main.leo.out | 6 +- .../compiler/function/newlines.leo.out | 6 +- .../compiler/function/repeated.leo.out | 6 +- .../compiler/compiler/function/return.leo.out | 6 +- .../function/return_array_nested_pass.leo.out | 6 +- .../function/return_array_tuple_pass.leo.out | 6 +- .../compiler/function/return_tuple.leo.out | 6 +- .../function/return_tuple_conditional.leo.out | 6 +- .../compiler/function/value_unchanged.leo.out | 6 +- .../global_consts/global_const_types.leo.out | 6 +- .../input_files/program_input/main.leo.out | 6 +- .../program_input/main_array.leo.out | 6 +- .../program_input/main_char.leo.out | 6 +- .../program_input/main_field.leo.out | 6 +- .../program_input/main_group.leo.out | 6 +- .../main_multi_dimension_array.leo.out | 6 +- .../program_input/main_multiple.leo.out | 6 +- .../program_input/main_string.leo.out | 6 +- .../program_input/main_tuple.leo.out | 6 +- .../basic.leo.out | 6 +- .../token_withdraw.leo.out | 6 +- .../program_input_constants/main.leo.out | 6 +- .../main_array.leo.out | 6 +- .../program_input_constants/main_char.leo.out | 6 +- .../main_field.leo.out | 6 +- .../main_group.leo.out | 6 +- .../main_multi_dimension_array.leo.out | 6 +- .../main_multiple.leo.out | 6 +- .../main_string.leo.out | 6 +- .../main_tuple.leo.out | 6 +- .../program_registers/registers_array.leo.out | 6 +- .../program_registers/registers_pass.leo.out | 6 +- .../program_state/access_all.leo.out | 6 +- .../program_state/access_state.leo.out | 6 +- .../input_files/program_state/basic.leo.out | 6 +- .../compiler/integers/i128/add.leo.out | 6 +- .../integers/i128/console_assert.leo.out | 6 +- .../compiler/integers/i128/div.leo.out | 6 +- .../compiler/integers/i128/eq.leo.out | 6 +- .../compiler/integers/i128/ge.leo.out | 6 +- .../compiler/integers/i128/gt.leo.out | 6 +- .../compiler/integers/i128/le.leo.out | 6 +- .../compiler/integers/i128/lt.leo.out | 6 +- .../compiler/integers/i128/max.leo.out | 6 +- .../compiler/integers/i128/min.leo.out | 6 +- .../compiler/integers/i128/mul.leo.out | 6 +- .../compiler/integers/i128/ne.leo.out | 6 +- .../compiler/integers/i128/negate.leo.out | 6 +- .../compiler/integers/i128/negate_min.leo.out | 6 +- .../integers/i128/negate_zero.leo.out | 6 +- .../compiler/integers/i128/sub.leo.out | 6 +- .../compiler/integers/i128/ternary.leo.out | 6 +- .../compiler/integers/i16/add.leo.out | 6 +- .../integers/i16/console_assert.leo.out | 6 +- .../compiler/integers/i16/div.leo.out | 6 +- .../compiler/compiler/integers/i16/eq.leo.out | 6 +- .../compiler/compiler/integers/i16/ge.leo.out | 6 +- .../compiler/compiler/integers/i16/gt.leo.out | 6 +- .../compiler/compiler/integers/i16/le.leo.out | 6 +- .../compiler/compiler/integers/i16/lt.leo.out | 6 +- .../compiler/integers/i16/max.leo.out | 6 +- .../compiler/integers/i16/min.leo.out | 6 +- .../compiler/integers/i16/mul.leo.out | 6 +- .../compiler/compiler/integers/i16/ne.leo.out | 6 +- .../compiler/integers/i16/negate.leo.out | 6 +- .../compiler/integers/i16/negate_min.leo.out | 6 +- .../compiler/integers/i16/negate_zero.leo.out | 6 +- .../compiler/integers/i16/sub.leo.out | 6 +- .../compiler/integers/i16/ternary.leo.out | 6 +- .../compiler/integers/i32/add.leo.out | 6 +- .../integers/i32/console_assert.leo.out | 6 +- .../compiler/integers/i32/div.leo.out | 6 +- .../compiler/compiler/integers/i32/eq.leo.out | 6 +- .../compiler/compiler/integers/i32/ge.leo.out | 6 +- .../compiler/compiler/integers/i32/gt.leo.out | 6 +- .../compiler/compiler/integers/i32/le.leo.out | 6 +- .../compiler/compiler/integers/i32/lt.leo.out | 6 +- .../compiler/integers/i32/max.leo.out | 6 +- .../compiler/integers/i32/min.leo.out | 6 +- .../compiler/integers/i32/mul.leo.out | 6 +- .../compiler/compiler/integers/i32/ne.leo.out | 6 +- .../compiler/integers/i32/negate.leo.out | 6 +- .../compiler/integers/i32/negate_min.leo.out | 6 +- .../compiler/integers/i32/negate_zero.leo.out | 6 +- .../compiler/integers/i32/sub.leo.out | 6 +- .../compiler/integers/i32/ternary.leo.out | 6 +- .../compiler/integers/i64/add.leo.out | 6 +- .../integers/i64/console_assert.leo.out | 6 +- .../compiler/integers/i64/div.leo.out | 6 +- .../compiler/compiler/integers/i64/eq.leo.out | 6 +- .../compiler/compiler/integers/i64/ge.leo.out | 6 +- .../compiler/compiler/integers/i64/gt.leo.out | 6 +- .../compiler/compiler/integers/i64/le.leo.out | 6 +- .../compiler/compiler/integers/i64/lt.leo.out | 6 +- .../compiler/integers/i64/max.leo.out | 6 +- .../compiler/integers/i64/min.leo.out | 6 +- .../compiler/integers/i64/mul.leo.out | 6 +- .../compiler/compiler/integers/i64/ne.leo.out | 6 +- .../compiler/integers/i64/negate.leo.out | 6 +- .../compiler/integers/i64/negate_min.leo.out | 6 +- .../compiler/integers/i64/negate_zero.leo.out | 6 +- .../compiler/integers/i64/sub.leo.out | 6 +- .../compiler/integers/i64/ternary.leo.out | 6 +- .../compiler/compiler/integers/i8/add.leo.out | 6 +- .../integers/i8/console_assert.leo.out | 6 +- .../compiler/compiler/integers/i8/div.leo.out | 6 +- .../compiler/compiler/integers/i8/eq.leo.out | 6 +- .../compiler/compiler/integers/i8/ge.leo.out | 6 +- .../compiler/compiler/integers/i8/gt.leo.out | 6 +- .../compiler/compiler/integers/i8/le.leo.out | 6 +- .../compiler/compiler/integers/i8/lt.leo.out | 6 +- .../compiler/compiler/integers/i8/max.leo.out | 6 +- .../compiler/compiler/integers/i8/min.leo.out | 6 +- .../compiler/compiler/integers/i8/mul.leo.out | 6 +- .../compiler/compiler/integers/i8/ne.leo.out | 6 +- .../compiler/integers/i8/negate.leo.out | 6 +- .../compiler/integers/i8/negate_zero.leo.out | 6 +- .../compiler/compiler/integers/i8/sub.leo.out | 6 +- .../compiler/integers/i8/ternary.leo.out | 6 +- .../compiler/integers/u128/add.leo.out | 6 +- .../integers/u128/console_assert.leo.out | 6 +- .../compiler/integers/u128/div.leo.out | 6 +- .../compiler/integers/u128/eq.leo.out | 6 +- .../compiler/integers/u128/ge.leo.out | 6 +- .../compiler/integers/u128/gt.leo.out | 6 +- .../compiler/integers/u128/input.leo.out | 6 +- .../compiler/integers/u128/le.leo.out | 6 +- .../compiler/integers/u128/lt.leo.out | 6 +- .../compiler/integers/u128/max.leo.out | 6 +- .../compiler/integers/u128/min.leo.out | 6 +- .../compiler/integers/u128/mul.leo.out | 6 +- .../compiler/integers/u128/ne.leo.out | 6 +- .../compiler/integers/u128/sub.leo.out | 6 +- .../compiler/integers/u128/ternary.leo.out | 6 +- .../compiler/integers/u16/add.leo.out | 6 +- .../integers/u16/console_assert.leo.out | 6 +- .../compiler/integers/u16/div.leo.out | 6 +- .../compiler/compiler/integers/u16/eq.leo.out | 6 +- .../compiler/compiler/integers/u16/ge.leo.out | 6 +- .../compiler/compiler/integers/u16/gt.leo.out | 6 +- .../compiler/integers/u16/input.leo.out | 6 +- .../compiler/compiler/integers/u16/le.leo.out | 6 +- .../compiler/compiler/integers/u16/lt.leo.out | 6 +- .../compiler/integers/u16/max.leo.out | 6 +- .../compiler/integers/u16/min.leo.out | 6 +- .../compiler/integers/u16/mul.leo.out | 6 +- .../compiler/compiler/integers/u16/ne.leo.out | 6 +- .../compiler/integers/u16/sub.leo.out | 6 +- .../compiler/integers/u16/ternary.leo.out | 6 +- .../compiler/integers/u32/add.leo.out | 6 +- .../integers/u32/console_assert.leo.out | 6 +- .../compiler/integers/u32/div.leo.out | 6 +- .../compiler/compiler/integers/u32/eq.leo.out | 6 +- .../compiler/compiler/integers/u32/ge.leo.out | 6 +- .../compiler/compiler/integers/u32/gt.leo.out | 6 +- .../compiler/integers/u32/input.leo.out | 6 +- .../compiler/compiler/integers/u32/le.leo.out | 6 +- .../compiler/compiler/integers/u32/lt.leo.out | 6 +- .../compiler/integers/u32/max.leo.out | 6 +- .../compiler/integers/u32/min.leo.out | 6 +- .../compiler/integers/u32/mul.leo.out | 6 +- .../compiler/compiler/integers/u32/ne.leo.out | 6 +- .../compiler/integers/u32/sub.leo.out | 6 +- .../compiler/integers/u32/ternary.leo.out | 6 +- .../compiler/integers/u64/add.leo.out | 6 +- .../integers/u64/console_assert.leo.out | 6 +- .../compiler/integers/u64/div.leo.out | 6 +- .../compiler/compiler/integers/u64/eq.leo.out | 6 +- .../compiler/compiler/integers/u64/ge.leo.out | 6 +- .../compiler/compiler/integers/u64/gt.leo.out | 6 +- .../compiler/integers/u64/input.leo.out | 6 +- .../compiler/compiler/integers/u64/le.leo.out | 6 +- .../compiler/compiler/integers/u64/lt.leo.out | 6 +- .../compiler/integers/u64/max.leo.out | 6 +- .../compiler/integers/u64/min.leo.out | 6 +- .../compiler/integers/u64/mul.leo.out | 6 +- .../compiler/compiler/integers/u64/ne.leo.out | 6 +- .../compiler/integers/u64/sub.leo.out | 6 +- .../compiler/integers/u64/ternary.leo.out | 6 +- .../compiler/compiler/integers/u8/add.leo.out | 6 +- .../integers/u8/console_assert.leo.out | 6 +- .../compiler/compiler/integers/u8/div.leo.out | 6 +- .../compiler/compiler/integers/u8/eq.leo.out | 6 +- .../compiler/compiler/integers/u8/ge.leo.out | 6 +- .../compiler/compiler/integers/u8/gt.leo.out | 6 +- .../compiler/integers/u8/input.leo.out | 6 +- .../compiler/compiler/integers/u8/le.leo.out | 6 +- .../compiler/compiler/integers/u8/lt.leo.out | 6 +- .../compiler/compiler/integers/u8/max.leo.out | 6 +- .../compiler/compiler/integers/u8/min.leo.out | 6 +- .../compiler/compiler/integers/u8/mul.leo.out | 6 +- .../compiler/compiler/integers/u8/ne.leo.out | 6 +- .../compiler/compiler/integers/u8/sub.leo.out | 6 +- .../compiler/integers/u8/ternary.leo.out | 6 +- .../compiler/mutability/array_dyn_mut.leo.out | 6 +- .../mutability/array_dyn_mut_indirect.leo.out | 6 +- .../compiler/mutability/array_mut.leo.out | 6 +- .../mutability/array_splice_mut.leo.out | 6 +- .../mutability/array_tuple_mut.leo.out | 6 +- .../mutability/circuit_function_mut.leo.out | 6 +- .../mutability/circuit_variable_mut.leo.out | 6 +- .../compiler/mutability/cond_mut.leo.out | 6 +- .../mutability/function_input_mut.leo.out | 6 +- .../compiler/mutability/let_mut.leo.out | 6 +- .../mutability/let_mut_nested.leo.out | 6 +- .../compiler/compiler/mutability/swap.leo.out | 6 +- .../compiler/statements/block.leo.out | 6 +- .../compiler/statements/chain.leo.out | 6 +- .../statements/compound_assignment.leo.out | 21 + .../compiler/statements/for_loop.leo.out | 6 +- .../statements/iteration_basic.leo.out | 6 +- .../statements/iteration_variable.leo.out | 6 +- .../statements/multiple_returns.leo.out | 6 +- .../compiler/statements/mutate.leo.out | 6 +- .../compiler/statements/nested_mutate.leo.out | 6 +- .../compiler/compiler/string/circuit.leo.out | 6 +- .../compiler/compiler/string/equality.leo.out | 6 +- .../compiler/compiler/string/replace.leo.out | 6 +- .../string/string_transformation.leo.out | 21 + .../compiler/compiler/tuples/access.leo.out | 6 +- .../compiler/compiler/tuples/basic.leo.out | 6 +- .../compiler/tuples/dependent.leo.out | 6 +- .../compiler/tuples/destructured.leo.out | 6 +- .../compiler/tuples/nested_access.leo.out | 6 +- 331 files changed, 1061 insertions(+), 7508 deletions(-) rename compiler/{tests => src}/test.rs (96%) delete mode 100644 compiler/tests/canonicalization/array_expansion.json delete mode 100644 compiler/tests/canonicalization/array_expansion.leo delete mode 100644 compiler/tests/canonicalization/array_size_zero_fail.leo delete mode 100644 compiler/tests/canonicalization/big_self_in_circuit_replacement.json delete mode 100644 compiler/tests/canonicalization/big_self_in_circuit_replacement.leo delete mode 100644 compiler/tests/canonicalization/compound_assignment.json delete mode 100644 compiler/tests/canonicalization/illegal_array_range_fail.leo delete mode 100644 compiler/tests/canonicalization/input/array_expansion.in delete mode 100644 compiler/tests/canonicalization/mod.rs delete mode 100644 compiler/tests/canonicalization/string_transformation.json delete mode 100644 compiler/tests/canonicalization/string_transformation.leo delete mode 100644 compiler/tests/compiler_output/empty.out delete mode 100644 compiler/tests/mod.rs delete mode 100644 compiler/tests/type_inference/basic.json delete mode 100644 compiler/tests/type_inference/basic.leo delete mode 100644 compiler/tests/type_inference/for_loop_and_compound.json delete mode 100644 compiler/tests/type_inference/for_loop_and_compound.leo delete mode 100644 compiler/tests/type_inference/mod.rs create mode 100644 tests/compiler/array/array_size_zero_fail.leo create mode 100644 tests/compiler/circuits/big_self_in_circuit_replacement.leo rename {compiler/tests/canonicalization => tests/compiler/circuits}/big_self_outside_circuit_fail.leo (70%) rename {compiler/tests/canonicalization => tests/compiler/statements}/compound_assignment.leo (60%) create mode 100644 tests/compiler/statements/inputs/dummy.in create mode 100644 tests/compiler/string/inputs/two.in create mode 100644 tests/compiler/string/string_transformation.leo create mode 100644 tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/big_self_in_circuit_replacement.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/statements/compound_assignment.leo.out create mode 100644 tests/expectations/compiler/compiler/string/string_transformation.leo.out diff --git a/compiler/src/lib.rs b/compiler/src/lib.rs index 8676703570..8e7e01638e 100644 --- a/compiler/src/lib.rs +++ b/compiler/src/lib.rs @@ -65,3 +65,6 @@ pub use phases::*; pub mod option; pub use option::*; + +#[cfg(test)] +mod test; \ No newline at end of file diff --git a/compiler/tests/test.rs b/compiler/src/test.rs similarity index 96% rename from compiler/tests/test.rs rename to compiler/src/test.rs index e91ef57e76..0f6b561978 100644 --- a/compiler/tests/test.rs +++ b/compiler/src/test.rs @@ -26,7 +26,7 @@ use leo_test_framework::{ use serde_yaml::Value; use snarkvm_curves::{bls12_377::Bls12_377, edwards_bls12::Fq}; -use leo_compiler::{ +use crate::{ compiler::Compiler, errors::CompilerError, targets::edwards_bls12::EdwardsGroupType, @@ -90,9 +90,9 @@ struct OutputItem { struct CompileOutput { pub circuit: SummarizedCircuit, pub output: Vec, - pub initial_theorem: String, - pub canonicalized_theorem: String, - pub type_inferenced_theorem: String, + pub initial_ast: String, + pub canonicalized_ast: String, + pub type_inferenced_ast: String, } impl Namespace for CompileNamespace { @@ -214,13 +214,13 @@ impl Namespace for CompileNamespace { }); } - let initial_theorem: String = hash( + let initial_ast: String = hash( Ast::from_json_file("/tmp/output/initial_ast.json".into()) .unwrap_or(Ast::new(Program::new("Error reading initial theorem.".to_string()))) .to_json_string() .unwrap_or("Error converting ast to string.".to_string()), ); - let canonicalized_theorem: String = hash( + let canonicalized_ast: String = hash( Ast::from_json_file("/tmp/output/canonicalization_ast.json".into()) .unwrap_or(Ast::new(Program::new( "Error reading canonicalized theorem.".to_string(), @@ -228,7 +228,7 @@ impl Namespace for CompileNamespace { .to_json_string() .unwrap_or("Error converting ast to string.".to_string()), ); - let type_inferenced_theorem = hash( + let type_inferenced_ast = hash( Ast::from_json_file("/tmp/output/type_inferenced_ast.json".into()) .unwrap_or(Ast::new(Program::new( "Error reading type inferenced theorem.".to_string(), @@ -240,9 +240,9 @@ impl Namespace for CompileNamespace { let final_output = CompileOutput { circuit: last_circuit.unwrap(), output: output_items, - initial_theorem, - canonicalized_theorem, - type_inferenced_theorem, + initial_ast, + canonicalized_ast, + type_inferenced_ast, }; Ok(serde_yaml::to_value(&final_output).expect("serialization failed")) } diff --git a/compiler/tests/canonicalization/array_expansion.json b/compiler/tests/canonicalization/array_expansion.json deleted file mode 100644 index 4b4f324e0d..0000000000 --- a/compiler/tests/canonicalization/array_expansion.json +++ /dev/null @@ -1,359 +0,0 @@ -{ - "name": "", - "expected_input": [], - "imports": [], - "circuits": {}, - "global_consts": {}, - "functions": { - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(a: [group; (2, 1)]) {\\\"}\"}": { - "annotations": [], - "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(a: [group; (2, 1)]) {\\\"}\"}", - "input": [ - { - "Variable": { - "identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(a: [group; (2, 1)]) {\\\"}\"}", - "const_": false, - "mutable": true, - "type_": { - "Array": [ - { - "Array": [ - "Group", - [ - { - "value": "1" - } - ] - ] - }, - [ - { - "value": "2" - } - ] - ] - }, - "span": { - "line_start": 1, - "line_stop": 1, - "col_start": 15, - "col_stop": 16, - "path": "", - "content": "function main(a: [group; (2, 1)]) {" - } - } - } - ], - "output": { - "Tuple": [] - }, - "block": { - "statements": [ - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let b = [true; (6, 5, 4, 3, 2)];\\\"}\"}", - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - } - ], - "type_": null, - "value": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "Value": { - "Boolean": [ - "true", - { - "line_start": 2, - "line_stop": 2, - "col_start": 12, - "col_stop": 16, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - ] - } - }, - "dimensions": [ - { - "value": "2" - } - ], - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 11, - "col_stop": 34, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - } - }, - "dimensions": [ - { - "value": "3" - } - ], - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 11, - "col_stop": 34, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - } - }, - "dimensions": [ - { - "value": "4" - } - ], - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 11, - "col_stop": 34, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - } - }, - "dimensions": [ - { - "value": "5" - } - ], - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 11, - "col_stop": 34, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - } - }, - "dimensions": [ - { - "value": "6" - } - ], - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 11, - "col_stop": 34, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - } - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 3, - "col_stop": 34, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let c: [u32; (1, 2)] = [0u32; (1, 2)];\\\"}\"}", - "span": { - "line_start": 3, - "line_stop": 3, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let c: [u32; (1, 2)] = [0u32; (1, 2)];" - } - } - ], - "type_": { - "Array": [ - { - "Array": [ - { - "IntegerType": "U32" - }, - [ - { - "value": "2" - } - ] - ] - }, - [ - { - "value": "1" - } - ] - ] - }, - "value": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "Value": { - "Integer": [ - "U32", - "0", - { - "line_start": 3, - "line_stop": 3, - "col_start": 27, - "col_stop": 31, - "path": "", - "content": " let c: [u32; (1, 2)] = [0u32; (1, 2)];" - } - ] - } - }, - "dimensions": [ - { - "value": "2" - } - ], - "span": { - "line_start": 3, - "line_stop": 3, - "col_start": 26, - "col_stop": 40, - "path": "", - "content": " let c: [u32; (1, 2)] = [0u32; (1, 2)];" - } - } - }, - "dimensions": [ - { - "value": "1" - } - ], - "span": { - "line_start": 3, - "line_stop": 3, - "col_start": 26, - "col_stop": 40, - "path": "", - "content": " let c: [u32; (1, 2)] = [0u32; (1, 2)];" - } - } - }, - "span": { - "line_start": 3, - "line_stop": 3, - "col_start": 3, - "col_stop": 40, - "path": "", - "content": " let c: [u32; (1, 2)] = [0u32; (1, 2)];" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let d = [0i8; (1)];\\\"}\"}", - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let d = [0i8; (1)];" - } - } - ], - "type_": null, - "value": { - "ArrayInit": { - "element": { - "Value": { - "Integer": [ - "I8", - "0", - { - "line_start": 4, - "line_stop": 4, - "col_start": 12, - "col_stop": 15, - "path": "", - "content": " let d = [0i8; (1)];" - } - ] - } - }, - "dimensions": [ - { - "value": "1" - } - ], - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 11, - "col_stop": 21, - "path": "", - "content": " let d = [0i8; (1)];" - } - } - }, - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 3, - "col_stop": 21, - "path": "", - "content": " let d = [0i8; (1)];" - } - } - } - ], - "span": { - "line_start": 1, - "line_stop": 7, - "col_start": 35, - "col_stop": 2, - "path": "", - "content": "function main(a: [group; (2, 1)]) {\n...\n}" - } - }, - "span": { - "line_start": 1, - "line_stop": 7, - "col_start": 1, - "col_stop": 2, - "path": "", - "content": "function main(a: [group; (2, 1)]) {\n...\n}\n\n\n\n" - } - } - } -} \ No newline at end of file diff --git a/compiler/tests/canonicalization/array_expansion.leo b/compiler/tests/canonicalization/array_expansion.leo deleted file mode 100644 index c83d9ce2c4..0000000000 --- a/compiler/tests/canonicalization/array_expansion.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main(a: [group; (2, 1)]) { - let b = [true; (6, 5, 4, 3, 2)]; - let c: [u32; (1, 2)] = [0u32; (1, 2)]; - let d = [0i8; (1)]; - // let d = [true; 0]; - // let e = [true; (0)]; -} \ No newline at end of file diff --git a/compiler/tests/canonicalization/array_size_zero_fail.leo b/compiler/tests/canonicalization/array_size_zero_fail.leo deleted file mode 100644 index b90563dc4d..0000000000 --- a/compiler/tests/canonicalization/array_size_zero_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - let a = [true; (0)]; -} \ No newline at end of file diff --git a/compiler/tests/canonicalization/big_self_in_circuit_replacement.json b/compiler/tests/canonicalization/big_self_in_circuit_replacement.json deleted file mode 100644 index 10e7e35053..0000000000 --- a/compiler/tests/canonicalization/big_self_in_circuit_replacement.json +++ /dev/null @@ -1,438 +0,0 @@ -{ - "name": "", - "expected_input": [], - "imports": [], - "circuits": { - "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}": { - "circuit_name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}", - "members": [ - { - "CircuitVariable": [ - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x: u32;\\\"}\"}", - { - "IntegerType": "U32" - } - ] - }, - { - "CircuitFunction": { - "annotations": [], - "identifier": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function new() -> Self {\\\"}\"}", - "input": [], - "output": { - "Circuit": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" - }, - "block": { - "statements": [ - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let new: Self = Self {\\\"}\"}", - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 9, - "col_stop": 12, - "path": "", - "content": " let new: Self = Self {" - } - } - ], - "type_": { - "Circuit": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" - }, - "value": { - "CircuitInit": { - "name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}", - "members": [ - { - "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x: 1u32\\\"}\"}", - "expression": { - "Value": { - "Integer": [ - "U32", - "1", - { - "line_start": 6, - "line_stop": 6, - "col_start": 10, - "col_stop": 14, - "path": "", - "content": " x: 1u32" - } - ] - } - } - } - ], - "span": { - "line_start": 5, - "line_stop": 7, - "col_start": 21, - "col_stop": 6, - "path": "", - "content": " let new: Self = Self {\n...\n };" - } - } - }, - "span": { - "line_start": 5, - "line_stop": 7, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " let new: Self = Self {\n...\n };" - } - } - }, - { - "Return": { - "expression": { - "Identifier": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return new;\\\"}\"}" - }, - "span": { - "line_start": 9, - "line_stop": 9, - "col_start": 5, - "col_stop": 15, - "path": "", - "content": " return new;" - } - } - } - ], - "span": { - "line_start": 4, - "line_stop": 10, - "col_start": 26, - "col_stop": 4, - "path": "", - "content": " function new() -> Self {\n...\n }" - } - }, - "span": { - "line_start": 4, - "line_stop": 10, - "col_start": 3, - "col_stop": 4, - "path": "", - "content": " function new() -> Self {\n...\n }\n\n\n\n" - } - } - }, - { - "CircuitFunction": { - "annotations": [], - "identifier": "{\"name\":\"etc\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function etc() {\\\"}\"}", - "input": [], - "output": { - "Tuple": [] - }, - "block": { - "statements": [ - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[Self {x: 0}.func()] += 2;\\\"}\"}", - "accesses": [ - { - "ArrayIndex": { - "Call": { - "function": { - "CircuitMemberAccess": { - "circuit": { - "CircuitInit": { - "name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}", - "members": [ - { - "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[Self {x: 0}.func()] += 2;\\\"}\"}", - "expression": { - "Value": { - "Implicit": [ - "0", - { - "line_start": 13, - "line_stop": 13, - "col_start": 17, - "col_stop": 18, - "path": "", - "content": " y[Self {x: 0}.func()] += 2;" - } - ] - } - } - } - ], - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 8, - "col_stop": 19, - "path": "", - "content": " y[Self {x: 0}.func()] += 2;" - } - } - }, - "name": "{\"name\":\"func\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":20,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[Self {x: 0}.func()] += 2;\\\"}\"}", - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 8, - "col_stop": 24, - "path": "", - "content": " y[Self {x: 0}.func()] += 2;" - } - } - }, - "arguments": [], - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 8, - "col_stop": 26, - "path": "", - "content": " y[Self {x: 0}.func()] += 2;" - } - } - } - } - ], - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 6, - "col_stop": 27, - "path": "", - "content": " y[Self {x: 0}.func()] += 2;" - } - }, - "value": { - "Binary": { - "left": { - "ArrayAccess": { - "array": { - "Identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[Self {x: 0}.func()] += 2;\\\"}\"}" - }, - "index": { - "Call": { - "function": { - "CircuitMemberAccess": { - "circuit": { - "CircuitInit": { - "name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}", - "members": [ - { - "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[Self {x: 0}.func()] += 2;\\\"}\"}", - "expression": { - "Value": { - "Implicit": [ - "0", - { - "line_start": 13, - "line_stop": 13, - "col_start": 17, - "col_stop": 18, - "path": "", - "content": " y[Self {x: 0}.func()] += 2;" - } - ] - } - } - } - ], - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 8, - "col_stop": 19, - "path": "", - "content": " y[Self {x: 0}.func()] += 2;" - } - } - }, - "name": "{\"name\":\"func\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":20,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[Self {x: 0}.func()] += 2;\\\"}\"}", - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 8, - "col_stop": 24, - "path": "", - "content": " y[Self {x: 0}.func()] += 2;" - } - } - }, - "arguments": [], - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 8, - "col_stop": 26, - "path": "", - "content": " y[Self {x: 0}.func()] += 2;" - } - } - }, - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 6, - "col_stop": 32, - "path": "", - "content": " y[Self {x: 0}.func()] += 2;" - } - } - }, - "right": { - "Value": { - "Implicit": [ - "2", - { - "line_start": 13, - "line_stop": 13, - "col_start": 31, - "col_stop": 32, - "path": "", - "content": " y[Self {x: 0}.func()] += 2;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 6, - "col_stop": 32, - "path": "", - "content": " y[Self {x: 0}.func()] += 2;" - } - } - }, - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 6, - "col_stop": 32, - "path": "", - "content": " y[Self {x: 0}.func()] += 2;" - } - } - } - ], - "span": { - "line_start": 12, - "line_stop": 14, - "col_start": 18, - "col_stop": 4, - "path": "", - "content": " function etc() {\n...\n }" - } - }, - "span": { - "line_start": 12, - "line_stop": 14, - "col_start": 3, - "col_stop": 4, - "path": "", - "content": " function etc() {\n...\n }" - } - } - } - ] - } - }, - "global_consts": {}, - "functions": { - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": { - "annotations": [], - "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}", - "input": [], - "output": { - "Tuple": [] - }, - "block": { - "statements": [ - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo: Foo = Foo::new();\\\"}\"}", - "span": { - "line_start": 18, - "line_stop": 18, - "col_start": 7, - "col_stop": 10, - "path": "", - "content": " let foo: Foo = Foo::new();" - } - } - ], - "type_": { - "Circuit": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo: Foo = Foo::new();\\\"}\"}" - }, - "value": { - "Call": { - "function": { - "CircuitStaticFunctionAccess": { - "circuit": { - "Identifier": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo: Foo = Foo::new();\\\"}\"}" - }, - "name": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo: Foo = Foo::new();\\\"}\"}", - "span": { - "line_start": 18, - "line_stop": 18, - "col_start": 18, - "col_stop": 26, - "path": "", - "content": " let foo: Foo = Foo::new();" - } - } - }, - "arguments": [], - "span": { - "line_start": 18, - "line_stop": 18, - "col_start": 18, - "col_stop": 28, - "path": "", - "content": " let foo: Foo = Foo::new();" - } - } - }, - "span": { - "line_start": 18, - "line_stop": 18, - "col_start": 3, - "col_stop": 28, - "path": "", - "content": " let foo: Foo = Foo::new();" - } - } - } - ], - "span": { - "line_start": 17, - "line_stop": 19, - "col_start": 17, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}" - } - }, - "span": { - "line_start": 17, - "line_stop": 19, - "col_start": 1, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}" - } - } - } -} diff --git a/compiler/tests/canonicalization/big_self_in_circuit_replacement.leo b/compiler/tests/canonicalization/big_self_in_circuit_replacement.leo deleted file mode 100644 index 603ad75c69..0000000000 --- a/compiler/tests/canonicalization/big_self_in_circuit_replacement.leo +++ /dev/null @@ -1,19 +0,0 @@ -circuit Foo { - x: u32; - - function new() -> Self { - let new: Self = Self { - x: 1u32 - }; - - return new; - } - - function etc() { - y[Self {x: 0}.func()] += 2; - } -} - -function main() { - let foo: Foo = Foo::new(); -} \ No newline at end of file diff --git a/compiler/tests/canonicalization/compound_assignment.json b/compiler/tests/canonicalization/compound_assignment.json deleted file mode 100644 index f17e68bc1c..0000000000 --- a/compiler/tests/canonicalization/compound_assignment.json +++ /dev/null @@ -1,2369 +0,0 @@ -{ - "name": "", - "expected_input": [], - "imports": [], - "circuits": { - "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}": { - "circuit_name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}", - "members": [ - { - "CircuitVariable": [ - "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" f: u8;\\\"}\"}", - { - "IntegerType": "U8" - } - ] - }, - { - "CircuitVariable": [ - "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y: (u8, u8);\\\"}\"}", - { - "Tuple": [ - { - "IntegerType": "U8" - }, - { - "IntegerType": "U8" - } - ] - } - ] - }, - { - "CircuitFunction": { - "annotations": [], - "identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function z (mut self) -> u16 {\\\"}\"}", - "input": [ - { - "MutSelfKeyword": "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function z (mut self) -> u16 {\\\"}\"}" - } - ], - "output": { - "IntegerType": "U16" - }, - "block": { - "statements": [ - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}", - "accesses": [ - { - "Member": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}" - }, - { - "Tuple": [ - { - "value": "0" - }, - { - "line_start": 6, - "line_stop": 6, - "col_start": 5, - "col_stop": 13, - "path": "", - "content": " self.y.0 += 1u8;" - } - ] - } - ], - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 5, - "col_stop": 13, - "path": "", - "content": " self.y.0 += 1u8;" - } - }, - "value": { - "Binary": { - "left": { - "TupleAccess": { - "tuple": { - "CircuitMemberAccess": { - "circuit": { - "Identifier": "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}" - }, - "name": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}", - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 5, - "col_stop": 20, - "path": "", - "content": " self.y.0 += 1u8;" - } - } - }, - "index": { - "value": "0" - }, - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 5, - "col_stop": 20, - "path": "", - "content": " self.y.0 += 1u8;" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 6, - "line_stop": 6, - "col_start": 17, - "col_stop": 20, - "path": "", - "content": " self.y.0 += 1u8;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 5, - "col_stop": 20, - "path": "", - "content": " self.y.0 += 1u8;" - } - } - }, - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 5, - "col_stop": 20, - "path": "", - "content": " self.y.0 += 1u8;" - } - } - }, - { - "Return": { - "expression": { - "Value": { - "Integer": [ - "U16", - "1", - { - "line_start": 7, - "line_stop": 7, - "col_start": 12, - "col_stop": 16, - "path": "", - "content": " return 1u16;" - } - ] - } - }, - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 5, - "col_stop": 16, - "path": "", - "content": " return 1u16;" - } - } - } - ], - "span": { - "line_start": 5, - "line_stop": 8, - "col_start": 32, - "col_stop": 4, - "path": "", - "content": " function z (mut self) -> u16 {\n...\n }" - } - }, - "span": { - "line_start": 5, - "line_stop": 8, - "col_start": 3, - "col_stop": 4, - "path": "", - "content": " function z (mut self) -> u16 {\n...\n }\n" - } - } - } - ] - } - }, - "global_consts": {}, - "functions": { - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": { - "annotations": [], - "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}", - "input": [], - "output": { - "Tuple": [] - }, - "block": { - "statements": [ - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x = 10u32;\\\"}\"}", - "span": { - "line_start": 11, - "line_stop": 11, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let x = 10u32;" - } - } - ], - "type_": null, - "value": { - "Value": { - "Integer": [ - "U32", - "10", - { - "line_start": 11, - "line_stop": 11, - "col_start": 11, - "col_stop": 16, - "path": "", - "content": " let x = 10u32;" - } - ] - } - }, - "span": { - "line_start": 11, - "line_stop": 11, - "col_start": 3, - "col_stop": 16, - "path": "", - "content": " let x = 10u32;" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x += 20;\\\"}\"}", - "accesses": [], - "span": { - "line_start": 12, - "line_stop": 12, - "col_start": 3, - "col_stop": 4, - "path": "", - "content": " x += 20;" - } - }, - "value": { - "Binary": { - "left": { - "Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x += 20;\\\"}\"}" - }, - "right": { - "Value": { - "Implicit": [ - "20", - { - "line_start": 12, - "line_stop": 12, - "col_start": 8, - "col_stop": 10, - "path": "", - "content": " x += 20;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 12, - "line_stop": 12, - "col_start": 3, - "col_stop": 10, - "path": "", - "content": " x += 20;" - } - } - }, - "span": { - "line_start": 12, - "line_stop": 12, - "col_start": 3, - "col_stop": 10, - "path": "", - "content": " x += 20;" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(x == 30u32);\\\"}\"}" - }, - "right": { - "Value": { - "Integer": [ - "U32", - "30", - { - "line_start": 13, - "line_stop": 13, - "col_start": 23, - "col_stop": 28, - "path": "", - "content": " console.assert(x == 30u32);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 18, - "col_stop": 28, - "path": "", - "content": " console.assert(x == 30u32);" - } - } - } - }, - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 3, - "col_stop": 28, - "path": "", - "content": " console.assert(x == 30u32);" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"w\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let w = 3u32;\\\"}\"}", - "span": { - "line_start": 15, - "line_stop": 15, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let w = 3u32;" - } - } - ], - "type_": null, - "value": { - "Value": { - "Integer": [ - "U32", - "3", - { - "line_start": 15, - "line_stop": 15, - "col_start": 11, - "col_stop": 15, - "path": "", - "content": " let w = 3u32;" - } - ] - } - }, - "span": { - "line_start": 15, - "line_stop": 15, - "col_start": 3, - "col_stop": 15, - "path": "", - "content": " let w = 3u32;" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"w\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" w += x;\\\"}\"}", - "accesses": [], - "span": { - "line_start": 16, - "line_stop": 16, - "col_start": 3, - "col_stop": 4, - "path": "", - "content": " w += x;" - } - }, - "value": { - "Binary": { - "left": { - "Identifier": "{\"name\":\"w\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" w += x;\\\"}\"}" - }, - "right": { - "Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" w += x;\\\"}\"}" - }, - "op": "Add", - "span": { - "line_start": 16, - "line_stop": 16, - "col_start": 3, - "col_stop": 9, - "path": "", - "content": " w += x;" - } - } - }, - "span": { - "line_start": 16, - "line_stop": 16, - "col_start": 3, - "col_stop": 9, - "path": "", - "content": " w += x;" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "Identifier": "{\"name\":\"w\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(w == 33u32);\\\"}\"}" - }, - "right": { - "Value": { - "Integer": [ - "U32", - "33", - { - "line_start": 17, - "line_stop": 17, - "col_start": 23, - "col_stop": 28, - "path": "", - "content": " console.assert(w == 33u32);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 17, - "line_stop": 17, - "col_start": 18, - "col_stop": 28, - "path": "", - "content": " console.assert(w == 33u32);" - } - } - } - }, - "span": { - "line_start": 17, - "line_stop": 17, - "col_start": 3, - "col_stop": 28, - "path": "", - "content": " console.assert(w == 33u32);" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let y = [1u8, 2u8, 3, 4];\\\"}\"}", - "span": { - "line_start": 19, - "line_stop": 19, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let y = [1u8, 2u8, 3, 4];" - } - } - ], - "type_": null, - "value": { - "ArrayInline": { - "elements": [ - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 19, - "line_stop": 19, - "col_start": 12, - "col_stop": 15, - "path": "", - "content": " let y = [1u8, 2u8, 3, 4];" - } - ] - } - } - }, - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "2", - { - "line_start": 19, - "line_stop": 19, - "col_start": 17, - "col_stop": 20, - "path": "", - "content": " let y = [1u8, 2u8, 3, 4];" - } - ] - } - } - }, - { - "Expression": { - "Value": { - "Implicit": [ - "3", - { - "line_start": 19, - "line_stop": 19, - "col_start": 22, - "col_stop": 23, - "path": "", - "content": " let y = [1u8, 2u8, 3, 4];" - } - ] - } - } - }, - { - "Expression": { - "Value": { - "Implicit": [ - "4", - { - "line_start": 19, - "line_stop": 19, - "col_start": 25, - "col_stop": 26, - "path": "", - "content": " let y = [1u8, 2u8, 3, 4];" - } - ] - } - } - } - ], - "span": { - "line_start": 19, - "line_stop": 19, - "col_start": 11, - "col_stop": 27, - "path": "", - "content": " let y = [1u8, 2u8, 3, 4];" - } - } - }, - "span": { - "line_start": 19, - "line_stop": 19, - "col_start": 3, - "col_stop": 27, - "path": "", - "content": " let y = [1u8, 2u8, 3, 4];" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[0] += 3u8;\\\"}\"}", - "accesses": [ - { - "ArrayIndex": { - "Value": { - "Implicit": [ - "0", - { - "line_start": 20, - "line_stop": 20, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " y[0] += 3u8;" - } - ] - } - } - } - ], - "span": { - "line_start": 20, - "line_stop": 20, - "col_start": 3, - "col_stop": 7, - "path": "", - "content": " y[0] += 3u8;" - } - }, - "value": { - "Binary": { - "left": { - "ArrayAccess": { - "array": { - "Identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[0] += 3u8;\\\"}\"}" - }, - "index": { - "Value": { - "Implicit": [ - "0", - { - "line_start": 20, - "line_stop": 20, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " y[0] += 3u8;" - } - ] - } - }, - "span": { - "line_start": 20, - "line_stop": 20, - "col_start": 3, - "col_stop": 14, - "path": "", - "content": " y[0] += 3u8;" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "3", - { - "line_start": 20, - "line_stop": 20, - "col_start": 11, - "col_stop": 14, - "path": "", - "content": " y[0] += 3u8;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 20, - "line_stop": 20, - "col_start": 3, - "col_stop": 14, - "path": "", - "content": " y[0] += 3u8;" - } - } - }, - "span": { - "line_start": 20, - "line_stop": 20, - "col_start": 3, - "col_stop": 14, - "path": "", - "content": " y[0] += 3u8;" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[0..3][1] *= 3;\\\"}\"}", - "accesses": [ - { - "ArrayRange": [ - { - "Value": { - "Implicit": [ - "0", - { - "line_start": 21, - "line_stop": 21, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " y[0..3][1] *= 3;" - } - ] - } - }, - { - "Value": { - "Implicit": [ - "3", - { - "line_start": 21, - "line_stop": 21, - "col_start": 8, - "col_stop": 9, - "path": "", - "content": " y[0..3][1] *= 3;" - } - ] - } - } - ] - }, - { - "ArrayIndex": { - "Value": { - "Implicit": [ - "1", - { - "line_start": 21, - "line_stop": 21, - "col_start": 11, - "col_stop": 12, - "path": "", - "content": " y[0..3][1] *= 3;" - } - ] - } - } - } - ], - "span": { - "line_start": 21, - "line_stop": 21, - "col_start": 3, - "col_stop": 13, - "path": "", - "content": " y[0..3][1] *= 3;" - } - }, - "value": { - "Binary": { - "left": { - "ArrayAccess": { - "array": { - "ArrayRangeAccess": { - "array": { - "Identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[0..3][1] *= 3;\\\"}\"}" - }, - "left": { - "Value": { - "Implicit": [ - "0", - { - "line_start": 21, - "line_stop": 21, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " y[0..3][1] *= 3;" - } - ] - } - }, - "right": { - "Value": { - "Implicit": [ - "3", - { - "line_start": 21, - "line_stop": 21, - "col_start": 8, - "col_stop": 9, - "path": "", - "content": " y[0..3][1] *= 3;" - } - ] - } - }, - "span": { - "line_start": 21, - "line_stop": 21, - "col_start": 3, - "col_stop": 18, - "path": "", - "content": " y[0..3][1] *= 3;" - } - } - }, - "index": { - "Value": { - "Implicit": [ - "1", - { - "line_start": 21, - "line_stop": 21, - "col_start": 11, - "col_stop": 12, - "path": "", - "content": " y[0..3][1] *= 3;" - } - ] - } - }, - "span": { - "line_start": 21, - "line_stop": 21, - "col_start": 3, - "col_stop": 18, - "path": "", - "content": " y[0..3][1] *= 3;" - } - } - }, - "right": { - "Value": { - "Implicit": [ - "3", - { - "line_start": 21, - "line_stop": 21, - "col_start": 17, - "col_stop": 18, - "path": "", - "content": " y[0..3][1] *= 3;" - } - ] - } - }, - "op": "Mul", - "span": { - "line_start": 21, - "line_stop": 21, - "col_start": 3, - "col_stop": 18, - "path": "", - "content": " y[0..3][1] *= 3;" - } - } - }, - "span": { - "line_start": 21, - "line_stop": 21, - "col_start": 3, - "col_stop": 18, - "path": "", - "content": " y[0..3][1] *= 3;" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "ArrayAccess": { - "array": { - "Identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(y[0] == 4u8);\\\"}\"}" - }, - "index": { - "Value": { - "Implicit": [ - "0", - { - "line_start": 22, - "line_stop": 22, - "col_start": 20, - "col_stop": 21, - "path": "", - "content": " console.assert(y[0] == 4u8);" - } - ] - } - }, - "span": { - "line_start": 22, - "line_stop": 22, - "col_start": 18, - "col_stop": 22, - "path": "", - "content": " console.assert(y[0] == 4u8);" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "4", - { - "line_start": 22, - "line_stop": 22, - "col_start": 26, - "col_stop": 29, - "path": "", - "content": " console.assert(y[0] == 4u8);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 22, - "line_stop": 22, - "col_start": 18, - "col_stop": 29, - "path": "", - "content": " console.assert(y[0] == 4u8);" - } - } - } - }, - "span": { - "line_start": 22, - "line_stop": 22, - "col_start": 3, - "col_stop": 29, - "path": "", - "content": " console.assert(y[0] == 4u8);" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "ArrayAccess": { - "array": { - "Identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(y[1] == 6u8);\\\"}\"}" - }, - "index": { - "Value": { - "Implicit": [ - "1", - { - "line_start": 23, - "line_stop": 23, - "col_start": 20, - "col_stop": 21, - "path": "", - "content": " console.assert(y[1] == 6u8);" - } - ] - } - }, - "span": { - "line_start": 23, - "line_stop": 23, - "col_start": 18, - "col_stop": 22, - "path": "", - "content": " console.assert(y[1] == 6u8);" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "6", - { - "line_start": 23, - "line_stop": 23, - "col_start": 26, - "col_stop": 29, - "path": "", - "content": " console.assert(y[1] == 6u8);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 23, - "line_stop": 23, - "col_start": 18, - "col_stop": 29, - "path": "", - "content": " console.assert(y[1] == 6u8);" - } - } - } - }, - "span": { - "line_start": 23, - "line_stop": 23, - "col_start": 3, - "col_stop": 29, - "path": "", - "content": " console.assert(y[1] == 6u8);" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let z = (1u8, 2u8);\\\"}\"}", - "span": { - "line_start": 25, - "line_stop": 25, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let z = (1u8, 2u8);" - } - } - ], - "type_": null, - "value": { - "TupleInit": { - "elements": [ - { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 25, - "line_stop": 25, - "col_start": 12, - "col_stop": 15, - "path": "", - "content": " let z = (1u8, 2u8);" - } - ] - } - }, - { - "Value": { - "Integer": [ - "U8", - "2", - { - "line_start": 25, - "line_stop": 25, - "col_start": 17, - "col_stop": 20, - "path": "", - "content": " let z = (1u8, 2u8);" - } - ] - } - } - ], - "span": { - "line_start": 25, - "line_stop": 25, - "col_start": 11, - "col_stop": 21, - "path": "", - "content": " let z = (1u8, 2u8);" - } - } - }, - "span": { - "line_start": 25, - "line_stop": 25, - "col_start": 3, - "col_stop": 21, - "path": "", - "content": " let z = (1u8, 2u8);" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" z.1 += 3u8;\\\"}\"}", - "accesses": [ - { - "Tuple": [ - { - "value": "1" - }, - { - "line_start": 26, - "line_stop": 26, - "col_start": 3, - "col_stop": 6, - "path": "", - "content": " z.1 += 3u8;" - } - ] - } - ], - "span": { - "line_start": 26, - "line_stop": 26, - "col_start": 3, - "col_stop": 6, - "path": "", - "content": " z.1 += 3u8;" - } - }, - "value": { - "Binary": { - "left": { - "TupleAccess": { - "tuple": { - "Identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" z.1 += 3u8;\\\"}\"}" - }, - "index": { - "value": "1" - }, - "span": { - "line_start": 26, - "line_stop": 26, - "col_start": 3, - "col_stop": 13, - "path": "", - "content": " z.1 += 3u8;" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "3", - { - "line_start": 26, - "line_stop": 26, - "col_start": 10, - "col_stop": 13, - "path": "", - "content": " z.1 += 3u8;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 26, - "line_stop": 26, - "col_start": 3, - "col_stop": 13, - "path": "", - "content": " z.1 += 3u8;" - } - } - }, - "span": { - "line_start": 26, - "line_stop": 26, - "col_start": 3, - "col_stop": 13, - "path": "", - "content": " z.1 += 3u8;" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "TupleAccess": { - "tuple": { - "Identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(z.1 == 5u8);\\\"}\"}" - }, - "index": { - "value": "1" - }, - "span": { - "line_start": 27, - "line_stop": 27, - "col_start": 18, - "col_stop": 21, - "path": "", - "content": " console.assert(z.1 == 5u8);" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "5", - { - "line_start": 27, - "line_stop": 27, - "col_start": 25, - "col_stop": 28, - "path": "", - "content": " console.assert(z.1 == 5u8);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 27, - "line_stop": 27, - "col_start": 18, - "col_stop": 28, - "path": "", - "content": " console.assert(z.1 == 5u8);" - } - } - } - }, - "span": { - "line_start": 27, - "line_stop": 27, - "col_start": 3, - "col_stop": 28, - "path": "", - "content": " console.assert(z.1 == 5u8);" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}", - "span": { - "line_start": 29, - "line_stop": 29, - "col_start": 7, - "col_stop": 10, - "path": "", - "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" - } - } - ], - "type_": null, - "value": { - "CircuitInit": { - "name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}", - "members": [ - { - "identifier": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}", - "expression": { - "Value": { - "Integer": [ - "U8", - "6", - { - "line_start": 29, - "line_stop": 29, - "col_start": 22, - "col_stop": 25, - "path": "", - "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" - } - ] - } - } - }, - { - "identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}", - "expression": { - "TupleInit": { - "elements": [ - { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 29, - "line_stop": 29, - "col_start": 31, - "col_stop": 34, - "path": "", - "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" - } - ] - } - }, - { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 29, - "line_stop": 29, - "col_start": 36, - "col_stop": 39, - "path": "", - "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" - } - ] - } - } - ], - "span": { - "line_start": 29, - "line_stop": 29, - "col_start": 30, - "col_stop": 40, - "path": "", - "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" - } - } - } - } - ], - "span": { - "line_start": 29, - "line_stop": 29, - "col_start": 13, - "col_stop": 42, - "path": "", - "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" - } - } - }, - "span": { - "line_start": 29, - "line_stop": 29, - "col_start": 3, - "col_stop": 42, - "path": "", - "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":3,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}", - "accesses": [ - { - "Member": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}" - } - ], - "span": { - "line_start": 30, - "line_stop": 30, - "col_start": 3, - "col_stop": 8, - "path": "", - "content": " foo.f += 2u8;" - } - }, - "value": { - "Binary": { - "left": { - "CircuitMemberAccess": { - "circuit": { - "Identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":3,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}" - }, - "name": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}", - "span": { - "line_start": 30, - "line_stop": 30, - "col_start": 3, - "col_stop": 15, - "path": "", - "content": " foo.f += 2u8;" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "2", - { - "line_start": 30, - "line_stop": 30, - "col_start": 12, - "col_stop": 15, - "path": "", - "content": " foo.f += 2u8;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 30, - "line_stop": 30, - "col_start": 3, - "col_stop": 15, - "path": "", - "content": " foo.f += 2u8;" - } - } - }, - "span": { - "line_start": 30, - "line_stop": 30, - "col_start": 3, - "col_stop": 15, - "path": "", - "content": " foo.f += 2u8;" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "CircuitMemberAccess": { - "circuit": { - "Identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(foo.f == 8u8);\\\"}\"}" - }, - "name": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(foo.f == 8u8);\\\"}\"}", - "span": { - "line_start": 31, - "line_stop": 31, - "col_start": 18, - "col_stop": 23, - "path": "", - "content": " console.assert(foo.f == 8u8);" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "8", - { - "line_start": 31, - "line_stop": 31, - "col_start": 27, - "col_stop": 30, - "path": "", - "content": " console.assert(foo.f == 8u8);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 31, - "line_stop": 31, - "col_start": 18, - "col_stop": 30, - "path": "", - "content": " console.assert(foo.f == 8u8);" - } - } - } - }, - "span": { - "line_start": 31, - "line_stop": 31, - "col_start": 3, - "col_stop": 30, - "path": "", - "content": " console.assert(foo.f == 8u8);" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":7,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let complex = 2u8;\\\"}\"}", - "span": { - "line_start": 33, - "line_stop": 33, - "col_start": 7, - "col_stop": 14, - "path": "", - "content": " let complex = 2u8;" - } - } - ], - "type_": null, - "value": { - "Value": { - "Integer": [ - "U8", - "2", - { - "line_start": 33, - "line_stop": 33, - "col_start": 17, - "col_stop": 20, - "path": "", - "content": " let complex = 2u8;" - } - ] - } - }, - "span": { - "line_start": 33, - "line_stop": 33, - "col_start": 3, - "col_stop": 20, - "path": "", - "content": " let complex = 2u8;" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":3,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" complex += 22u8 - 2u8+ 1u8;\\\"}\"}", - "accesses": [], - "span": { - "line_start": 34, - "line_stop": 34, - "col_start": 3, - "col_stop": 10, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - }, - "value": { - "Binary": { - "left": { - "Identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":3,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" complex += 22u8 - 2u8+ 1u8;\\\"}\"}" - }, - "right": { - "Binary": { - "left": { - "Binary": { - "left": { - "Value": { - "Integer": [ - "U8", - "22", - { - "line_start": 34, - "line_stop": 34, - "col_start": 14, - "col_stop": 18, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - ] - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "2", - { - "line_start": 34, - "line_stop": 34, - "col_start": 21, - "col_stop": 24, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - ] - } - }, - "op": "Sub", - "span": { - "line_start": 34, - "line_stop": 34, - "col_start": 14, - "col_stop": 24, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 34, - "line_stop": 34, - "col_start": 26, - "col_stop": 29, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 34, - "line_stop": 34, - "col_start": 14, - "col_stop": 29, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - } - }, - "op": "Add", - "span": { - "line_start": 34, - "line_stop": 34, - "col_start": 3, - "col_stop": 29, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - } - }, - "span": { - "line_start": 34, - "line_stop": 34, - "col_start": 3, - "col_stop": 29, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "Identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":18,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(complex == 23u8);\\\"}\"}" - }, - "right": { - "Value": { - "Integer": [ - "U8", - "23", - { - "line_start": 35, - "line_stop": 35, - "col_start": 29, - "col_stop": 33, - "path": "", - "content": " console.assert(complex == 23u8);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 35, - "line_stop": 35, - "col_start": 18, - "col_stop": 33, - "path": "", - "content": " console.assert(complex == 23u8);" - } - } - } - }, - "span": { - "line_start": 35, - "line_stop": 35, - "col_start": 3, - "col_stop": 33, - "path": "", - "content": " console.assert(complex == 23u8);" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let a = [[0u8; 1]; 4];\\\"}\"}", - "span": { - "line_start": 36, - "line_stop": 36, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let a = [[0u8; 1]; 4];" - } - } - ], - "type_": null, - "value": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "Value": { - "Integer": [ - "U8", - "0", - { - "line_start": 36, - "line_stop": 36, - "col_start": 13, - "col_stop": 16, - "path": "", - "content": " let a = [[0u8; 1]; 4];" - } - ] - } - }, - "dimensions": [ - { - "value": "1" - } - ], - "span": { - "line_start": 36, - "line_stop": 36, - "col_start": 12, - "col_stop": 20, - "path": "", - "content": " let a = [[0u8; 1]; 4];" - } - } - }, - "dimensions": [ - { - "value": "4" - } - ], - "span": { - "line_start": 36, - "line_stop": 36, - "col_start": 11, - "col_stop": 24, - "path": "", - "content": " let a = [[0u8; 1]; 4];" - } - } - }, - "span": { - "line_start": 36, - "line_stop": 36, - "col_start": 3, - "col_stop": 24, - "path": "", - "content": " let a = [[0u8; 1]; 4];" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" a[2][0] += 1u8;\\\"}\"}", - "accesses": [ - { - "ArrayIndex": { - "Value": { - "Implicit": [ - "2", - { - "line_start": 37, - "line_stop": 37, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " a[2][0] += 1u8;" - } - ] - } - } - }, - { - "ArrayIndex": { - "Value": { - "Implicit": [ - "0", - { - "line_start": 37, - "line_stop": 37, - "col_start": 8, - "col_stop": 9, - "path": "", - "content": " a[2][0] += 1u8;" - } - ] - } - } - } - ], - "span": { - "line_start": 37, - "line_stop": 37, - "col_start": 3, - "col_stop": 10, - "path": "", - "content": " a[2][0] += 1u8;" - } - }, - "value": { - "Binary": { - "left": { - "ArrayAccess": { - "array": { - "ArrayAccess": { - "array": { - "Identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" a[2][0] += 1u8;\\\"}\"}" - }, - "index": { - "Value": { - "Implicit": [ - "2", - { - "line_start": 37, - "line_stop": 37, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " a[2][0] += 1u8;" - } - ] - } - }, - "span": { - "line_start": 37, - "line_stop": 37, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " a[2][0] += 1u8;" - } - } - }, - "index": { - "Value": { - "Implicit": [ - "0", - { - "line_start": 37, - "line_stop": 37, - "col_start": 8, - "col_stop": 9, - "path": "", - "content": " a[2][0] += 1u8;" - } - ] - } - }, - "span": { - "line_start": 37, - "line_stop": 37, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " a[2][0] += 1u8;" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 37, - "line_stop": 37, - "col_start": 14, - "col_stop": 17, - "path": "", - "content": " a[2][0] += 1u8;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 37, - "line_stop": 37, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " a[2][0] += 1u8;" - } - } - }, - "span": { - "line_start": 37, - "line_stop": 37, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " a[2][0] += 1u8;" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "ArrayAccess": { - "array": { - "ArrayAccess": { - "array": { - "Identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(a[2][0] == 1u8);\\\"}\"}" - }, - "index": { - "Value": { - "Implicit": [ - "2", - { - "line_start": 38, - "line_stop": 38, - "col_start": 20, - "col_stop": 21, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - ] - } - }, - "span": { - "line_start": 38, - "line_stop": 38, - "col_start": 18, - "col_stop": 22, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - }, - "index": { - "Value": { - "Implicit": [ - "0", - { - "line_start": 38, - "line_stop": 38, - "col_start": 23, - "col_stop": 24, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - ] - } - }, - "span": { - "line_start": 38, - "line_stop": 38, - "col_start": 18, - "col_stop": 25, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 38, - "line_stop": 38, - "col_start": 29, - "col_stop": 32, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 38, - "line_stop": 38, - "col_start": 18, - "col_stop": 32, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - } - }, - "span": { - "line_start": 38, - "line_stop": 38, - "col_start": 3, - "col_stop": 32, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let b = [0u8; (4, 1)];\\\"}\"}", - "span": { - "line_start": 40, - "line_stop": 40, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let b = [0u8; (4, 1)];" - } - } - ], - "type_": null, - "value": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "Value": { - "Integer": [ - "U8", - "0", - { - "line_start": 40, - "line_stop": 40, - "col_start": 12, - "col_stop": 15, - "path": "", - "content": " let b = [0u8; (4, 1)];" - } - ] - } - }, - "dimensions": [ - { - "value": "1" - } - ], - "span": { - "line_start": 40, - "line_stop": 40, - "col_start": 11, - "col_stop": 24, - "path": "", - "content": " let b = [0u8; (4, 1)];" - } - } - }, - "dimensions": [ - { - "value": "4" - } - ], - "span": { - "line_start": 40, - "line_stop": 40, - "col_start": 11, - "col_stop": 24, - "path": "", - "content": " let b = [0u8; (4, 1)];" - } - } - }, - "span": { - "line_start": 40, - "line_stop": 40, - "col_start": 3, - "col_stop": 24, - "path": "", - "content": " let b = [0u8; (4, 1)];" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" b[2][0] += 1u8;\\\"}\"}", - "accesses": [ - { - "ArrayIndex": { - "Value": { - "Implicit": [ - "2", - { - "line_start": 41, - "line_stop": 41, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " b[2][0] += 1u8;" - } - ] - } - } - }, - { - "ArrayIndex": { - "Value": { - "Implicit": [ - "0", - { - "line_start": 41, - "line_stop": 41, - "col_start": 8, - "col_stop": 9, - "path": "", - "content": " b[2][0] += 1u8;" - } - ] - } - } - } - ], - "span": { - "line_start": 41, - "line_stop": 41, - "col_start": 3, - "col_stop": 10, - "path": "", - "content": " b[2][0] += 1u8;" - } - }, - "value": { - "Binary": { - "left": { - "ArrayAccess": { - "array": { - "ArrayAccess": { - "array": { - "Identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" b[2][0] += 1u8;\\\"}\"}" - }, - "index": { - "Value": { - "Implicit": [ - "2", - { - "line_start": 41, - "line_stop": 41, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " b[2][0] += 1u8;" - } - ] - } - }, - "span": { - "line_start": 41, - "line_stop": 41, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " b[2][0] += 1u8;" - } - } - }, - "index": { - "Value": { - "Implicit": [ - "0", - { - "line_start": 41, - "line_stop": 41, - "col_start": 8, - "col_stop": 9, - "path": "", - "content": " b[2][0] += 1u8;" - } - ] - } - }, - "span": { - "line_start": 41, - "line_stop": 41, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " b[2][0] += 1u8;" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 41, - "line_stop": 41, - "col_start": 14, - "col_stop": 17, - "path": "", - "content": " b[2][0] += 1u8;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 41, - "line_stop": 41, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " b[2][0] += 1u8;" - } - } - }, - "span": { - "line_start": 41, - "line_stop": 41, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " b[2][0] += 1u8;" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "ArrayAccess": { - "array": { - "ArrayAccess": { - "array": { - "Identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(a[2][0] == 1u8);\\\"}\"}" - }, - "index": { - "Value": { - "Implicit": [ - "2", - { - "line_start": 42, - "line_stop": 42, - "col_start": 20, - "col_stop": 21, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - ] - } - }, - "span": { - "line_start": 42, - "line_stop": 42, - "col_start": 18, - "col_stop": 22, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - }, - "index": { - "Value": { - "Implicit": [ - "0", - { - "line_start": 42, - "line_stop": 42, - "col_start": 23, - "col_stop": 24, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - ] - } - }, - "span": { - "line_start": 42, - "line_stop": 42, - "col_start": 18, - "col_stop": 25, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 42, - "line_stop": 42, - "col_start": 29, - "col_stop": 32, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 42, - "line_stop": 42, - "col_start": 18, - "col_stop": 32, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - } - }, - "span": { - "line_start": 42, - "line_stop": 42, - "col_start": 3, - "col_stop": 32, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - } - ], - "span": { - "line_start": 10, - "line_stop": 43, - "col_start": 17, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}" - } - }, - "span": { - "line_start": 10, - "line_stop": 43, - "col_start": 1, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" - } - } - } -} diff --git a/compiler/tests/canonicalization/illegal_array_range_fail.leo b/compiler/tests/canonicalization/illegal_array_range_fail.leo deleted file mode 100644 index af14957712..0000000000 --- a/compiler/tests/canonicalization/illegal_array_range_fail.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main () { - let x = [1u32; 5]; - x[..2] += 1; -} \ No newline at end of file diff --git a/compiler/tests/canonicalization/input/array_expansion.in b/compiler/tests/canonicalization/input/array_expansion.in deleted file mode 100644 index 072fb7677c..0000000000 --- a/compiler/tests/canonicalization/input/array_expansion.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [group; (2, 1)] = [1group; (2, 1)]; \ No newline at end of file diff --git a/compiler/tests/canonicalization/mod.rs b/compiler/tests/canonicalization/mod.rs deleted file mode 100644 index 34d3fe0c24..0000000000 --- a/compiler/tests/canonicalization/mod.rs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::parse_program; -use leo_ast::Ast; -use leo_parser::parser; - -pub fn parse_program_ast(file_string: &str) -> Ast { - const TEST_PROGRAM_PATH: &str = ""; - let test_program_file_path = std::path::PathBuf::from(TEST_PROGRAM_PATH); - - let mut ast = Ast::new( - parser::parse(test_program_file_path.to_str().expect("unwrap fail"), &file_string) - .expect("Failed to parse file."), - ); - ast.canonicalize().expect("Failed to canonicalize program."); - - ast -} - -#[test] -fn test_big_self_in_circuit_replacement() { - // Check program is valid. - let program_string = include_str!("big_self_in_circuit_replacement.leo"); - // Check we get expected ast. - let ast = parse_program_ast(program_string); - let expected_json = include_str!("big_self_in_circuit_replacement.json"); - let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); - - assert_eq!(expected_ast, ast); -} - -#[test] -fn test_big_self_outside_circuit_fail() { - // Check program is invalid. - let program_string = include_str!("big_self_outside_circuit_fail.leo"); - let program = parse_program(program_string); - assert!(program.is_err()); -} - -#[test] -fn test_array_expansion() { - let program_string = include_str!("array_expansion.leo"); - let ast = parse_program_ast(program_string); - let expected_json = include_str!("array_expansion.json"); - let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); - - assert_eq!(expected_ast, ast); -} - -#[test] -fn test_array_size_zero_fail() { - let program_string = include_str!("array_size_zero_fail.leo"); - let program = parse_program(program_string); - assert!(program.is_err()); -} - -#[test] -fn test_compound_assignment() { - let program_string = include_str!("compound_assignment.leo"); - let ast = parse_program_ast(program_string); - let expected_json = include_str!("compound_assignment.json"); - let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); - - assert_eq!(expected_ast, ast); -} - -#[test] -fn test_illegal_array_range_fail() { - // Check program is invalid. - let program_string = include_str!("illegal_array_range_fail.leo"); - let program = parse_program(program_string); - assert!(program.is_err()); -} - -#[test] -fn test_string_transformation() { - let program_string = include_str!("string_transformation.leo"); - let ast = parse_program_ast(program_string); - let expected_json = include_str!("string_transformation.json"); - let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); - - assert_eq!(expected_ast, ast); -} diff --git a/compiler/tests/canonicalization/string_transformation.json b/compiler/tests/canonicalization/string_transformation.json deleted file mode 100644 index 6871711bec..0000000000 --- a/compiler/tests/canonicalization/string_transformation.json +++ /dev/null @@ -1,1181 +0,0 @@ -{ - "name": "", - "expected_input": [], - "imports": [], - "circuits": {}, - "global_consts": {}, - "functions": { - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": { - "annotations": [], - "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}", - "input": [], - "output": { - "Tuple": [] - }, - "block": { - "statements": [ - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let s = \\\\\\\"\\\\\\\\u{2764}ello, World!\\\\\\\\u{DDDD}\\\\\\\";\\\"}\"}", - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - ], - "type_": null, - "value": { - "ArrayInline": { - "elements": [ - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 10084 - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 14, - "col_stop": 22, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 101 - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 22, - "col_stop": 23, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 108 - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 23, - "col_stop": 24, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 108 - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 24, - "col_stop": 25, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 111 - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 25, - "col_stop": 26, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 44 - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 26, - "col_stop": 27, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 32 - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 27, - "col_stop": 28, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 87 - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 28, - "col_stop": 29, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 111 - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 29, - "col_stop": 30, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 114 - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 30, - "col_stop": 31, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 108 - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 31, - "col_stop": 32, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 100 - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 32, - "col_stop": 33, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 33 - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 33, - "col_stop": 34, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "NonScalar": 56797 - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 34, - "col_stop": 42, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - } - } - } - ], - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 13, - "col_stop": 43, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 5, - "col_stop": 43, - "path": "", - "content": " let s = \"\\u{2764}ello, World!\\u{DDDD}\";" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" s[..2] = \\\\\\\"he\\\\\\\";\\\"}\"}", - "accesses": [ - { - "ArrayRange": [ - null, - { - "Value": { - "Implicit": [ - "2", - { - "line_start": 3, - "line_stop": 3, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " s[..2] = \"he\";" - } - ] - } - } - ] - } - ], - "span": { - "line_start": 3, - "line_stop": 3, - "col_start": 5, - "col_stop": 11, - "path": "", - "content": " s[..2] = \"he\";" - } - }, - "value": { - "ArrayInline": { - "elements": [ - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 104 - }, - "span": { - "line_start": 3, - "line_stop": 3, - "col_start": 15, - "col_stop": 16, - "path": "", - "content": " s[..2] = \"he\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 101 - }, - "span": { - "line_start": 3, - "line_stop": 3, - "col_start": 16, - "col_stop": 17, - "path": "", - "content": " s[..2] = \"he\";" - } - } - } - } - } - ], - "span": { - "line_start": 3, - "line_stop": 3, - "col_start": 14, - "col_stop": 18, - "path": "", - "content": " s[..2] = \"he\";" - } - } - }, - "span": { - "line_start": 3, - "line_stop": 3, - "col_start": 5, - "col_stop": 18, - "path": "", - "content": " s[..2] = \"he\";" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x = false;\\\"}\"}", - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " let x = false;" - } - } - ], - "type_": null, - "value": { - "Value": { - "Boolean": [ - "false", - { - "line_start": 4, - "line_stop": 4, - "col_start": 13, - "col_stop": 18, - "path": "", - "content": " let x = false;" - } - ] - } - }, - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 5, - "col_stop": 18, - "path": "", - "content": " let x = false;" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x = \\\\\\\"test1\\\\\\\" == \\\\\\\"test2\\\\\\\";\\\"}\"}", - "accesses": [], - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " x = \"test1\" == \"test2\";" - } - }, - "value": { - "Binary": { - "left": { - "ArrayInline": { - "elements": [ - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 116 - }, - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 10, - "col_stop": 11, - "path": "", - "content": " x = \"test1\" == \"test2\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 101 - }, - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 11, - "col_stop": 12, - "path": "", - "content": " x = \"test1\" == \"test2\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 115 - }, - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 12, - "col_stop": 13, - "path": "", - "content": " x = \"test1\" == \"test2\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 116 - }, - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 13, - "col_stop": 14, - "path": "", - "content": " x = \"test1\" == \"test2\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 49 - }, - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 14, - "col_stop": 15, - "path": "", - "content": " x = \"test1\" == \"test2\";" - } - } - } - } - } - ], - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 9, - "col_stop": 16, - "path": "", - "content": " x = \"test1\" == \"test2\";" - } - } - }, - "right": { - "ArrayInline": { - "elements": [ - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 116 - }, - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 21, - "col_stop": 22, - "path": "", - "content": " x = \"test1\" == \"test2\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 101 - }, - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 22, - "col_stop": 23, - "path": "", - "content": " x = \"test1\" == \"test2\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 115 - }, - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 23, - "col_stop": 24, - "path": "", - "content": " x = \"test1\" == \"test2\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 116 - }, - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 24, - "col_stop": 25, - "path": "", - "content": " x = \"test1\" == \"test2\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 50 - }, - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 25, - "col_stop": 26, - "path": "", - "content": " x = \"test1\" == \"test2\";" - } - } - } - } - } - ], - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 20, - "col_stop": 27, - "path": "", - "content": " x = \"test1\" == \"test2\";" - } - } - }, - "op": "Eq", - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 9, - "col_stop": 27, - "path": "", - "content": " x = \"test1\" == \"test2\";" - } - } - }, - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 5, - "col_stop": 27, - "path": "", - "content": " x = \"test1\" == \"test2\";" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let z = [1u8, 2u8, 3u8, 4u8];\\\"}\"}", - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " let z = [1u8, 2u8, 3u8, 4u8];" - } - } - ], - "type_": null, - "value": { - "ArrayInline": { - "elements": [ - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 6, - "line_stop": 6, - "col_start": 14, - "col_stop": 17, - "path": "", - "content": " let z = [1u8, 2u8, 3u8, 4u8];" - } - ] - } - } - }, - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "2", - { - "line_start": 6, - "line_stop": 6, - "col_start": 19, - "col_stop": 22, - "path": "", - "content": " let z = [1u8, 2u8, 3u8, 4u8];" - } - ] - } - } - }, - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "3", - { - "line_start": 6, - "line_stop": 6, - "col_start": 24, - "col_stop": 27, - "path": "", - "content": " let z = [1u8, 2u8, 3u8, 4u8];" - } - ] - } - } - }, - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "4", - { - "line_start": 6, - "line_stop": 6, - "col_start": 29, - "col_stop": 32, - "path": "", - "content": " let z = [1u8, 2u8, 3u8, 4u8];" - } - ] - } - } - } - ], - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 13, - "col_stop": 33, - "path": "", - "content": " let z = [1u8, 2u8, 3u8, 4u8];" - } - } - }, - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 5, - "col_stop": 33, - "path": "", - "content": " let z = [1u8, 2u8, 3u8, 4u8];" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" z[0..\\\\\\\"test\\\\\\\" == \\\\\\\"test\\\\\\\"? 2 : 2] = x[0..2];\\\"}\"}", - "accesses": [ - { - "ArrayRange": [ - { - "Value": { - "Implicit": [ - "0", - { - "line_start": 7, - "line_stop": 7, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - ] - } - }, - { - "Ternary": { - "condition": { - "Binary": { - "left": { - "ArrayInline": { - "elements": [ - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 116 - }, - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 11, - "col_stop": 12, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 101 - }, - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 12, - "col_stop": 13, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 115 - }, - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 13, - "col_stop": 14, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 116 - }, - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 14, - "col_stop": 15, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - } - } - } - } - ], - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 10, - "col_stop": 16, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - } - }, - "right": { - "ArrayInline": { - "elements": [ - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 116 - }, - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 21, - "col_stop": 22, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 101 - }, - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 22, - "col_stop": 23, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 115 - }, - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 23, - "col_stop": 24, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 116 - }, - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 24, - "col_stop": 25, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - } - } - } - } - ], - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 20, - "col_stop": 26, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - } - }, - "op": "Eq", - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 10, - "col_stop": 26, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - } - }, - "if_true": { - "Value": { - "Implicit": [ - "2", - { - "line_start": 7, - "line_stop": 7, - "col_start": 28, - "col_stop": 29, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - ] - } - }, - "if_false": { - "Value": { - "Implicit": [ - "2", - { - "line_start": 7, - "line_stop": 7, - "col_start": 32, - "col_stop": 33, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - ] - } - }, - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 10, - "col_stop": 33, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - } - } - ] - } - ], - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 5, - "col_stop": 34, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - }, - "value": { - "ArrayRangeAccess": { - "array": { - "Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" z[0..\\\\\\\"test\\\\\\\" == \\\\\\\"test\\\\\\\"? 2 : 2] = x[0..2];\\\"}\"}" - }, - "left": { - "Value": { - "Implicit": [ - "0", - { - "line_start": 7, - "line_stop": 7, - "col_start": 39, - "col_stop": 40, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - ] - } - }, - "right": { - "Value": { - "Implicit": [ - "2", - { - "line_start": 7, - "line_stop": 7, - "col_start": 42, - "col_stop": 43, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - ] - } - }, - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 37, - "col_stop": 44, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - } - }, - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 5, - "col_stop": 44, - "path": "", - "content": " z[0..\"test\" == \"test\"? 2 : 2] = x[0..2];" - } - } - } - ], - "span": { - "line_start": 1, - "line_stop": 8, - "col_start": 17, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}" - } - }, - "span": { - "line_start": 1, - "line_stop": 8, - "col_start": 1, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}\n\n\n\n\n" - } - } - } -} diff --git a/compiler/tests/canonicalization/string_transformation.leo b/compiler/tests/canonicalization/string_transformation.leo deleted file mode 100644 index fb48ab364e..0000000000 --- a/compiler/tests/canonicalization/string_transformation.leo +++ /dev/null @@ -1,8 +0,0 @@ -function main() { - let s = "\u{2764}ello, World!\u{DDDD}"; - s[..2] = "he"; - let x = false; - x = "test1" == "test2"; - let z = [1u8, 2u8, 3u8, 4u8]; - z[0.."test" == "test"? 2 : 2] = x[0..2]; -} diff --git a/compiler/tests/compiler_output/empty.out b/compiler/tests/compiler_output/empty.out deleted file mode 100644 index 3042270327..0000000000 --- a/compiler/tests/compiler_output/empty.out +++ /dev/null @@ -1 +0,0 @@ -[registers] diff --git a/compiler/tests/mod.rs b/compiler/tests/mod.rs deleted file mode 100644 index b488ea9f00..0000000000 --- a/compiler/tests/mod.rs +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -// allow the use of EdwardsTestCompiler::parse_program_from_string for tests - -#![allow(deprecated)] - -pub mod canonicalization; -pub mod type_inference; - -use leo_asg::{new_alloc_context, new_context, AsgContext}; -use leo_compiler::{ - compiler::Compiler, - errors::CompilerError, - group::targets::edwards_bls12::EdwardsGroupType, - ConstrainedValue, - OutputBytes, -}; - -use snarkvm_curves::edwards_bls12::Fq; -use snarkvm_r1cs::TestConstraintSystem; - -use std::path::PathBuf; - -pub const TEST_OUTPUT_DIRECTORY: &str = "/output/"; -const EMPTY_FILE: &str = ""; - -pub type EdwardsTestCompiler = Compiler<'static, Fq, EdwardsGroupType>; -pub type EdwardsConstrainedValue = ConstrainedValue<'static, Fq, EdwardsGroupType>; - -//convenience function for tests, leaks memory -pub(crate) fn make_test_context() -> AsgContext<'static> { - let allocator = Box::leak(Box::new(new_alloc_context())); - new_context(allocator) -} - -fn new_compiler() -> EdwardsTestCompiler { - let program_name = "test".to_string(); - let path = PathBuf::from("/test/src/main.leo"); - let output_dir = PathBuf::from(TEST_OUTPUT_DIRECTORY); - - EdwardsTestCompiler::new(program_name, path, output_dir, make_test_context(), None, None) -} - -pub(crate) fn parse_program(program_string: &str) -> Result { - let mut compiler = new_compiler(); - - compiler.parse_program_from_string(program_string)?; - - Ok(compiler) -} - -pub fn parse_program_with_input( - program_string: &str, - input_string: &str, -) -> Result { - let mut compiler = new_compiler(); - let path = PathBuf::new(); - - compiler.parse_input(input_string, &path, EMPTY_FILE, &path)?; - compiler.parse_program_from_string(program_string)?; - - Ok(compiler) -} - -pub fn parse_program_with_state( - program_string: &str, - state_string: &str, -) -> Result { - let mut compiler = new_compiler(); - let path = PathBuf::new(); - - compiler.parse_input(EMPTY_FILE, &path, state_string, &path)?; - compiler.parse_program_from_string(program_string)?; - - Ok(compiler) -} - -pub fn parse_program_with_input_and_state( - program_string: &str, - input_string: &str, - state_string: &str, -) -> Result { - let mut compiler = new_compiler(); - let path = PathBuf::new(); - - compiler.parse_input(input_string, &path, state_string, &path)?; - compiler.parse_program_from_string(&program_string)?; - - Ok(compiler) -} - -pub(crate) fn get_output(program: EdwardsTestCompiler) -> OutputBytes { - // synthesize the circuit on the test constraint system - let mut cs = TestConstraintSystem::::new(); - let output = program.compile_constraints(&mut cs).unwrap(); - - // assert the constraint system is satisfied - assert!(cs.is_satisfied()); - - output.into() -} - -pub(crate) fn assert_satisfied(program: EdwardsTestCompiler) { - let empty_output_bytes = include_bytes!("compiler_output/empty.out"); - let res = get_output(program); - - // assert that the output is empty - assert_eq!(empty_output_bytes, res.bytes().as_slice()); -} diff --git a/compiler/tests/type_inference/basic.json b/compiler/tests/type_inference/basic.json deleted file mode 100644 index eb91879aab..0000000000 --- a/compiler/tests/type_inference/basic.json +++ /dev/null @@ -1,1618 +0,0 @@ -{ - "name": "", - "expected_input": [], - "imports": [], - "circuits": { - "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}": { - "circuit_name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}", - "members": [] - } - }, - "global_consts": { - "ONE": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"ONE\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const ONE = 1u8;\\\"}\"}", - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 7, - "col_stop": 10, - "path": "", - "content": "const ONE = 1u8;" - } - } - ], - "type_": { - "IntegerType": "U8" - }, - "value": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 7, - "line_stop": 7, - "col_start": 13, - "col_stop": 16, - "path": "", - "content": "const ONE = 1u8;" - } - ] - } - }, - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 1, - "col_stop": 16, - "path": "", - "content": "const ONE = 1u8;" - } - } - }, - "functions": { - "{\"name\":\"two\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function two() -> u8 {\\\"}\"}": { - "annotations": [], - "identifier": "{\"name\":\"two\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function two() -> u8 {\\\"}\"}", - "input": [], - "output": { - "IntegerType": "U8" - }, - "block": { - "statements": [ - { - "Return": { - "expression": { - "Value": { - "Integer": [ - "U8", - "2", - { - "line_start": 4, - "line_stop": 4, - "col_start": 10, - "col_stop": 13, - "path": "", - "content": " return 2u8;" - } - ] - } - }, - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 3, - "col_stop": 13, - "path": "", - "content": " return 2u8;" - } - } - } - ], - "span": { - "line_start": 3, - "line_stop": 5, - "col_start": 22, - "col_stop": 2, - "path": "", - "content": "function two() -> u8 {\n...\n}" - } - }, - "span": { - "line_start": 3, - "line_stop": 5, - "col_start": 1, - "col_stop": 2, - "path": "", - "content": "function two() -> u8 {\n...\n}" - } - }, - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": { - "annotations": [], - "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}", - "input": [], - "output": { - "Tuple": [] - }, - "block": { - "statements": [ - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const a = 1u8;\\\"}\"}", - "span": { - "line_start": 10, - "line_stop": 10, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const a = 1u8;" - } - } - ], - "type_": { - "IntegerType": "U8" - }, - "value": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 10, - "line_stop": 10, - "col_start": 13, - "col_stop": 16, - "path": "", - "content": " const a = 1u8;" - } - ] - } - }, - "span": { - "line_start": 10, - "line_stop": 10, - "col_start": 3, - "col_stop": 16, - "path": "", - "content": " const a = 1u8;" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const b = 1field;\\\"}\"}", - "span": { - "line_start": 11, - "line_stop": 11, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const b = 1field;" - } - } - ], - "type_": "Field", - "value": { - "Value": { - "Field": [ - "1", - { - "line_start": 11, - "line_stop": 11, - "col_start": 13, - "col_stop": 19, - "path": "", - "content": " const b = 1field;" - } - ] - } - }, - "span": { - "line_start": 11, - "line_stop": 11, - "col_start": 3, - "col_stop": 19, - "path": "", - "content": " const b = 1field;" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const c = 1group;\\\"}\"}", - "span": { - "line_start": 12, - "line_stop": 12, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const c = 1group;" - } - } - ], - "type_": "Group", - "value": { - "Value": { - "Group": { - "Single": [ - "1", - { - "line_start": 12, - "line_stop": 12, - "col_start": 13, - "col_stop": 19, - "path": "", - "content": " const c = 1group;" - } - ] - } - } - }, - "span": { - "line_start": 12, - "line_stop": 12, - "col_start": 3, - "col_stop": 19, - "path": "", - "content": " const c = 1group;" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const d = (0, 1)group;\\\"}\"}", - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const d = (0, 1)group;" - } - } - ], - "type_": "Group", - "value": { - "Value": { - "Group": { - "Tuple": { - "x": { - "Number": [ - "0", - { - "line_start": 13, - "line_stop": 13, - "col_start": 14, - "col_stop": 15, - "path": "", - "content": " const d = (0, 1)group;" - } - ] - }, - "y": { - "Number": [ - "1", - { - "line_start": 13, - "line_stop": 13, - "col_start": 17, - "col_stop": 18, - "path": "", - "content": " const d = (0, 1)group;" - } - ] - }, - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 14, - "col_stop": 24, - "path": "", - "content": " const d = (0, 1)group;" - } - } - } - } - }, - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 3, - "col_stop": 24, - "path": "", - "content": " const d = (0, 1)group;" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const e = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}", - "span": { - "line_start": 14, - "line_stop": 14, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const e = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" - } - } - ], - "type_": "Address", - "value": { - "Value": { - "Address": [ - "aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8", - { - "line_start": 14, - "line_stop": 14, - "col_start": 13, - "col_stop": 76, - "path": "", - "content": " const e = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" - } - ] - } - }, - "span": { - "line_start": 14, - "line_stop": 14, - "col_start": 3, - "col_stop": 76, - "path": "", - "content": " const e = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const f = two();\\\"}\"}", - "span": { - "line_start": 15, - "line_stop": 15, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const f = two();" - } - } - ], - "type_": { - "IntegerType": "U8" - }, - "value": { - "Call": { - "function": { - "Identifier": "{\"name\":\"two\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const f = two();\\\"}\"}" - }, - "arguments": [], - "span": { - "line_start": 15, - "line_stop": 15, - "col_start": 13, - "col_stop": 18, - "path": "", - "content": " const f = two();" - } - } - }, - "span": { - "line_start": 15, - "line_stop": 15, - "col_start": 3, - "col_stop": 18, - "path": "", - "content": " const f = two();" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"g\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const g = [0u8; (3, 2)];\\\"}\"}", - "span": { - "line_start": 16, - "line_stop": 16, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const g = [0u8; (3, 2)];" - } - } - ], - "type_": { - "Array": [ - { - "Array": [ - { - "IntegerType": "U8" - }, - [ - { - "value": "2" - } - ] - ] - }, - [ - { - "value": "3" - } - ] - ] - }, - "value": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "Value": { - "Integer": [ - "U8", - "0", - { - "line_start": 16, - "line_stop": 16, - "col_start": 14, - "col_stop": 17, - "path": "", - "content": " const g = [0u8; (3, 2)];" - } - ] - } - }, - "dimensions": [ - { - "value": "2" - } - ], - "span": { - "line_start": 16, - "line_stop": 16, - "col_start": 13, - "col_stop": 26, - "path": "", - "content": " const g = [0u8; (3, 2)];" - } - } - }, - "dimensions": [ - { - "value": "3" - } - ], - "span": { - "line_start": 16, - "line_stop": 16, - "col_start": 13, - "col_stop": 26, - "path": "", - "content": " const g = [0u8; (3, 2)];" - } - } - }, - "span": { - "line_start": 16, - "line_stop": 16, - "col_start": 3, - "col_stop": 26, - "path": "", - "content": " const g = [0u8; (3, 2)];" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"h\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const h = [[0u8; 3]; 2];\\\"}\"}", - "span": { - "line_start": 17, - "line_stop": 17, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const h = [[0u8; 3]; 2];" - } - } - ], - "type_": { - "Array": [ - { - "Array": [ - { - "IntegerType": "U8" - }, - [ - { - "value": "3" - } - ] - ] - }, - [ - { - "value": "2" - } - ] - ] - }, - "value": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "Value": { - "Integer": [ - "U8", - "0", - { - "line_start": 17, - "line_stop": 17, - "col_start": 15, - "col_stop": 18, - "path": "", - "content": " const h = [[0u8; 3]; 2];" - } - ] - } - }, - "dimensions": [ - { - "value": "3" - } - ], - "span": { - "line_start": 17, - "line_stop": 17, - "col_start": 14, - "col_stop": 22, - "path": "", - "content": " const h = [[0u8; 3]; 2];" - } - } - }, - "dimensions": [ - { - "value": "2" - } - ], - "span": { - "line_start": 17, - "line_stop": 17, - "col_start": 13, - "col_stop": 26, - "path": "", - "content": " const h = [[0u8; 3]; 2];" - } - } - }, - "span": { - "line_start": 17, - "line_stop": 17, - "col_start": 3, - "col_stop": 26, - "path": "", - "content": " const h = [[0u8; 3]; 2];" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const i = [1u8, 1u8, 1u8];\\\"}\"}", - "span": { - "line_start": 18, - "line_stop": 18, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const i = [1u8, 1u8, 1u8];" - } - } - ], - "type_": { - "Array": [ - { - "IntegerType": "U8" - }, - [ - { - "value": "3" - } - ] - ] - }, - "value": { - "ArrayInline": { - "elements": [ - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 18, - "line_stop": 18, - "col_start": 14, - "col_stop": 17, - "path": "", - "content": " const i = [1u8, 1u8, 1u8];" - } - ] - } - } - }, - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 18, - "line_stop": 18, - "col_start": 19, - "col_stop": 22, - "path": "", - "content": " const i = [1u8, 1u8, 1u8];" - } - ] - } - } - }, - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 18, - "line_stop": 18, - "col_start": 24, - "col_stop": 27, - "path": "", - "content": " const i = [1u8, 1u8, 1u8];" - } - ] - } - } - } - ], - "span": { - "line_start": 18, - "line_stop": 18, - "col_start": 13, - "col_stop": 28, - "path": "", - "content": " const i = [1u8, 1u8, 1u8];" - } - } - }, - "span": { - "line_start": 18, - "line_stop": 18, - "col_start": 3, - "col_stop": 28, - "path": "", - "content": " const i = [1u8, 1u8, 1u8];" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const j = true;\\\"}\"}", - "span": { - "line_start": 19, - "line_stop": 19, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const j = true;" - } - } - ], - "type_": "Boolean", - "value": { - "Value": { - "Boolean": [ - "true", - { - "line_start": 19, - "line_stop": 19, - "col_start": 13, - "col_stop": 17, - "path": "", - "content": " const j = true;" - } - ] - } - }, - "span": { - "line_start": 19, - "line_stop": 19, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " const j = true;" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"k\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const k = (1u8, 1u8);\\\"}\"}", - "span": { - "line_start": 20, - "line_stop": 20, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const k = (1u8, 1u8);" - } - } - ], - "type_": { - "Tuple": [ - { - "IntegerType": "U8" - }, - { - "IntegerType": "U8" - } - ] - }, - "value": { - "TupleInit": { - "elements": [ - { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 20, - "line_stop": 20, - "col_start": 14, - "col_stop": 17, - "path": "", - "content": " const k = (1u8, 1u8);" - } - ] - } - }, - { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 20, - "line_stop": 20, - "col_start": 19, - "col_stop": 22, - "path": "", - "content": " const k = (1u8, 1u8);" - } - ] - } - } - ], - "span": { - "line_start": 20, - "line_stop": 20, - "col_start": 13, - "col_stop": 23, - "path": "", - "content": " const k = (1u8, 1u8);" - } - } - }, - "span": { - "line_start": 20, - "line_stop": 20, - "col_start": 3, - "col_stop": 23, - "path": "", - "content": " const k = (1u8, 1u8);" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"l\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const l = (1u8, 1u8, true);\\\"}\"}", - "span": { - "line_start": 21, - "line_stop": 21, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const l = (1u8, 1u8, true);" - } - } - ], - "type_": { - "Tuple": [ - { - "IntegerType": "U8" - }, - { - "IntegerType": "U8" - }, - "Boolean" - ] - }, - "value": { - "TupleInit": { - "elements": [ - { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 21, - "line_stop": 21, - "col_start": 14, - "col_stop": 17, - "path": "", - "content": " const l = (1u8, 1u8, true);" - } - ] - } - }, - { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 21, - "line_stop": 21, - "col_start": 19, - "col_stop": 22, - "path": "", - "content": " const l = (1u8, 1u8, true);" - } - ] - } - }, - { - "Value": { - "Boolean": [ - "true", - { - "line_start": 21, - "line_stop": 21, - "col_start": 24, - "col_stop": 28, - "path": "", - "content": " const l = (1u8, 1u8, true);" - } - ] - } - } - ], - "span": { - "line_start": 21, - "line_stop": 21, - "col_start": 13, - "col_stop": 29, - "path": "", - "content": " const l = (1u8, 1u8, true);" - } - } - }, - "span": { - "line_start": 21, - "line_stop": 21, - "col_start": 3, - "col_stop": 29, - "path": "", - "content": " const l = (1u8, 1u8, true);" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"m\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const m = Foo {};\\\"}\"}", - "span": { - "line_start": 22, - "line_stop": 22, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const m = Foo {};" - } - } - ], - "type_": { - "Circuit": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}" - }, - "value": { - "CircuitInit": { - "name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const m = Foo {};\\\"}\"}", - "members": [], - "span": { - "line_start": 22, - "line_stop": 22, - "col_start": 13, - "col_stop": 19, - "path": "", - "content": " const m = Foo {};" - } - } - }, - "span": { - "line_start": 22, - "line_stop": 22, - "col_start": 3, - "col_stop": 19, - "path": "", - "content": " const m = Foo {};" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"n\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const n = 'a';\\\"}\"}", - "span": { - "line_start": 23, - "line_stop": 23, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const n = 'a';" - } - } - ], - "type_": "Char", - "value": { - "Value": { - "Char": { - "character": { - "Scalar": 97 - }, - "span": { - "line_start": 23, - "line_stop": 23, - "col_start": 13, - "col_stop": 16, - "path": "", - "content": " const n = 'a';" - } - } - } - }, - "span": { - "line_start": 23, - "line_stop": 23, - "col_start": 3, - "col_stop": 16, - "path": "", - "content": " const n = 'a';" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"o\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const o = \\\\\\\"Hello, World!\\\\\\\";\\\"}\"}", - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - ], - "type_": { - "Array": [ - "Char", - [ - { - "value": "13" - } - ] - ] - }, - "value": { - "ArrayInline": { - "elements": [ - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 72 - }, - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 14, - "col_stop": 15, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 101 - }, - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 15, - "col_stop": 16, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 108 - }, - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 16, - "col_stop": 17, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 108 - }, - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 17, - "col_stop": 18, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 111 - }, - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 18, - "col_stop": 19, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 44 - }, - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 19, - "col_stop": 20, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 32 - }, - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 20, - "col_stop": 21, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 87 - }, - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 21, - "col_stop": 22, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 111 - }, - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 22, - "col_stop": 23, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 114 - }, - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 23, - "col_stop": 24, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 108 - }, - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 24, - "col_stop": 25, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 100 - }, - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 25, - "col_stop": 26, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - } - } - }, - { - "Expression": { - "Value": { - "Char": { - "character": { - "Scalar": 33 - }, - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 26, - "col_stop": 27, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - } - } - } - ], - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 13, - "col_stop": 28, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - }, - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 3, - "col_stop": 28, - "path": "", - "content": " const o = \"Hello, World!\";" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"p\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const p = [...[1u8], ...[2u8]];\\\"}\"}", - "span": { - "line_start": 25, - "line_stop": 25, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const p = [...[1u8], ...[2u8]];" - } - } - ], - "type_": { - "Array": [ - { - "IntegerType": "U8" - }, - [ - { - "value": "2" - } - ] - ] - }, - "value": { - "ArrayInline": { - "elements": [ - { - "Spread": { - "ArrayInline": { - "elements": [ - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 25, - "line_stop": 25, - "col_start": 18, - "col_stop": 21, - "path": "", - "content": " const p = [...[1u8], ...[2u8]];" - } - ] - } - } - } - ], - "span": { - "line_start": 25, - "line_stop": 25, - "col_start": 17, - "col_stop": 22, - "path": "", - "content": " const p = [...[1u8], ...[2u8]];" - } - } - } - }, - { - "Spread": { - "ArrayInline": { - "elements": [ - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "2", - { - "line_start": 25, - "line_stop": 25, - "col_start": 28, - "col_stop": 31, - "path": "", - "content": " const p = [...[1u8], ...[2u8]];" - } - ] - } - } - } - ], - "span": { - "line_start": 25, - "line_stop": 25, - "col_start": 27, - "col_stop": 32, - "path": "", - "content": " const p = [...[1u8], ...[2u8]];" - } - } - } - } - ], - "span": { - "line_start": 25, - "line_stop": 25, - "col_start": 13, - "col_stop": 33, - "path": "", - "content": " const p = [...[1u8], ...[2u8]];" - } - } - }, - "span": { - "line_start": 25, - "line_stop": 25, - "col_start": 3, - "col_stop": 33, - "path": "", - "content": " const p = [...[1u8], ...[2u8]];" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"q\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const q = [...p, 3u8] == [1u8, 2u8, 3u8];\\\"}\"}", - "span": { - "line_start": 26, - "line_stop": 26, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const q = [...p, 3u8] == [1u8, 2u8, 3u8];" - } - } - ], - "type_": "Boolean", - "value": { - "Binary": { - "left": { - "ArrayInline": { - "elements": [ - { - "Spread": { - "Identifier": "{\"name\":\"p\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const q = [...p, 3u8] == [1u8, 2u8, 3u8];\\\"}\"}" - } - }, - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "3", - { - "line_start": 26, - "line_stop": 26, - "col_start": 20, - "col_stop": 23, - "path": "", - "content": " const q = [...p, 3u8] == [1u8, 2u8, 3u8];" - } - ] - } - } - } - ], - "span": { - "line_start": 26, - "line_stop": 26, - "col_start": 13, - "col_stop": 24, - "path": "", - "content": " const q = [...p, 3u8] == [1u8, 2u8, 3u8];" - } - } - }, - "right": { - "ArrayInline": { - "elements": [ - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 26, - "line_stop": 26, - "col_start": 29, - "col_stop": 32, - "path": "", - "content": " const q = [...p, 3u8] == [1u8, 2u8, 3u8];" - } - ] - } - } - }, - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "2", - { - "line_start": 26, - "line_stop": 26, - "col_start": 34, - "col_stop": 37, - "path": "", - "content": " const q = [...p, 3u8] == [1u8, 2u8, 3u8];" - } - ] - } - } - }, - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "3", - { - "line_start": 26, - "line_stop": 26, - "col_start": 39, - "col_stop": 42, - "path": "", - "content": " const q = [...p, 3u8] == [1u8, 2u8, 3u8];" - } - ] - } - } - } - ], - "span": { - "line_start": 26, - "line_stop": 26, - "col_start": 28, - "col_stop": 43, - "path": "", - "content": " const q = [...p, 3u8] == [1u8, 2u8, 3u8];" - } - } - }, - "op": "Eq", - "span": { - "line_start": 26, - "line_stop": 26, - "col_start": 13, - "col_stop": 43, - "path": "", - "content": " const q = [...p, 3u8] == [1u8, 2u8, 3u8];" - } - } - }, - "span": { - "line_start": 26, - "line_stop": 26, - "col_start": 3, - "col_stop": 43, - "path": "", - "content": " const q = [...p, 3u8] == [1u8, 2u8, 3u8];" - } - } - } - ], - "span": { - "line_start": 9, - "line_stop": 27, - "col_start": 17, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}" - } - }, - "span": { - "line_start": 9, - "line_stop": 27, - "col_start": 1, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" - } - } - } -} diff --git a/compiler/tests/type_inference/basic.leo b/compiler/tests/type_inference/basic.leo deleted file mode 100644 index 7f25c5e441..0000000000 --- a/compiler/tests/type_inference/basic.leo +++ /dev/null @@ -1,27 +0,0 @@ -circuit Foo {} - -function two() -> u8 { - return 2u8; -} - -const ONE = 1u8; - -function main() { - const a = 1u8; - const b = 1field; - const c = 1group; - const d = (0, 1)group; - const e = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; - const f = two(); - const g = [0u8; (3, 2)]; - const h = [[0u8; 3]; 2]; - const i = [1u8, 1u8, 1u8]; - const j = true; - const k = (1u8, 1u8); - const l = (1u8, 1u8, true); - const m = Foo {}; - const n = 'a'; - const o = "Hello, World!"; - const p = [...[1u8], ...[2u8]]; - const q = [...p, 3u8] == [1u8, 2u8, 3u8]; -} \ No newline at end of file diff --git a/compiler/tests/type_inference/for_loop_and_compound.json b/compiler/tests/type_inference/for_loop_and_compound.json deleted file mode 100644 index b8abddd38a..0000000000 --- a/compiler/tests/type_inference/for_loop_and_compound.json +++ /dev/null @@ -1,243 +0,0 @@ -{ - "name": "", - "expected_input": [], - "imports": [], - "circuits": {}, - "global_consts": {}, - "functions": { - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": { - "annotations": [], - "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}", - "input": [], - "output": { - "Tuple": [] - }, - "block": { - "statements": [ - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x = 10u16;\\\"}\"}", - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " let x = 10u16;" - } - } - ], - "type_": { - "IntegerType": "U16" - }, - "value": { - "Value": { - "Integer": [ - "U16", - "10", - { - "line_start": 2, - "line_stop": 2, - "col_start": 13, - "col_stop": 18, - "path": "", - "content": " let x = 10u16;" - } - ] - } - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 5, - "col_stop": 18, - "path": "", - "content": " let x = 10u16;" - } - } - }, - { - "Iteration": { - "variable": "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" for i in 0..3 {\\\"}\"}", - "start": { - "Value": { - "Integer": [ - "U32", - "0", - { - "line_start": 3, - "line_stop": 3, - "col_start": 14, - "col_stop": 15, - "path": "", - "content": " for i in 0..3 {" - } - ] - } - }, - "stop": { - "Value": { - "Integer": [ - "U32", - "3", - { - "line_start": 3, - "line_stop": 3, - "col_start": 17, - "col_stop": 18, - "path": "", - "content": " for i in 0..3 {" - } - ] - } - }, - "block": { - "statements": [ - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x -= 1;\\\"}\"}", - "accesses": [], - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " x -= 1;" - } - }, - "value": { - "Binary": { - "left": { - "Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x -= 1;\\\"}\"}" - }, - "right": { - "Value": { - "Integer": [ - "U16", - "1", - { - "line_start": 4, - "line_stop": 4, - "col_start": 14, - "col_stop": 15, - "path": "", - "content": " x -= 1;" - } - ] - } - }, - "op": "Sub", - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 9, - "col_stop": 15, - "path": "", - "content": " x -= 1;" - } - } - }, - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 9, - "col_stop": 15, - "path": "", - "content": " x -= 1;" - } - } - } - ], - "span": { - "line_start": 3, - "line_stop": 5, - "col_start": 19, - "col_stop": 6, - "path": "", - "content": " for i in 0..3 {\n...\n }" - } - }, - "span": { - "line_start": 3, - "line_stop": 5, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " for i in 0..3 {\n...\n }" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(x == 7u16);\\\"}\"}" - }, - "right": { - "Value": { - "Integer": [ - "U16", - "7", - { - "line_start": 6, - "line_stop": 6, - "col_start": 25, - "col_stop": 29, - "path": "", - "content": " console.assert(x == 7u16);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 20, - "col_stop": 29, - "path": "", - "content": " console.assert(x == 7u16);" - } - } - } - }, - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 5, - "col_stop": 29, - "path": "", - "content": " console.assert(x == 7u16);" - } - } - } - ], - "span": { - "line_start": 1, - "line_stop": 7, - "col_start": 17, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}" - } - }, - "span": { - "line_start": 1, - "line_stop": 7, - "col_start": 1, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}\n\n\n\n" - } - } - } - } \ No newline at end of file diff --git a/compiler/tests/type_inference/for_loop_and_compound.leo b/compiler/tests/type_inference/for_loop_and_compound.leo deleted file mode 100644 index 92c27ff24b..0000000000 --- a/compiler/tests/type_inference/for_loop_and_compound.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main() { - let x = 10u16; - for i in 0..3 { - x -= 1; - } - console.assert(x == 7u16); -} \ No newline at end of file diff --git a/compiler/tests/type_inference/mod.rs b/compiler/tests/type_inference/mod.rs deleted file mode 100644 index 30f859b099..0000000000 --- a/compiler/tests/type_inference/mod.rs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, parse_program}; -#[allow(unused)] -use leo_asg::{new_context, Asg, AsgContext}; -use leo_ast::Ast; -use leo_compiler::TypeInferencePhase; -use leo_imports::ImportParser; -use leo_parser::parser; - -thread_local! { - static THREAD_GLOBAL_CONTEXT: AsgContext<'static> = { - let leaked = Box::leak(Box::new(leo_asg::new_alloc_context())); - leo_asg::new_context(leaked) - } -} - -pub fn thread_leaked_context() -> AsgContext<'static> { - THREAD_GLOBAL_CONTEXT.with(|f| *f) -} - -pub fn parse_program_ast(file_string: &str) -> Ast { - const TEST_PROGRAM_PATH: &str = ""; - let test_program_file_path = std::path::PathBuf::from(TEST_PROGRAM_PATH); - - let mut ast = Ast::new( - parser::parse(test_program_file_path.to_str().expect("unwrap fail"), &file_string) - .expect("Failed to parse file."), - ); - ast.canonicalize().expect("Failed to canonicalize program."); - - let program = ast.clone().into_repr(); - let asg = Asg::new(thread_leaked_context(), &program, &mut ImportParser::default()) - .expect("Failed to create ASG from AST"); - - let new_ast = TypeInferencePhase::default() - .phase_ast(&program, &asg.into_repr()) - .expect("Failed to produce type inference ast."); - - new_ast -} - -#[test] -fn test_basic() { - // Check program is valid. - let program_string = include_str!("basic.leo"); - let program = parse_program(program_string).unwrap(); - assert_satisfied(program); - - // Check we get expected ast. - let ast = parse_program_ast(program_string); - let expected_json = include_str!("basic.json"); - let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); - - assert_eq!(expected_ast, ast); -} - -#[test] -fn test_for_loop_and_compound() { - // Check program is valid. - let program_string = include_str!("for_loop_and_compound.leo"); - let program = parse_program(program_string).unwrap(); - assert_satisfied(program); - - // Check we get expected ast. - let ast = parse_program_ast(program_string); - let expected_json = include_str!("for_loop_and_compound.json"); - let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); - - assert_eq!(expected_ast, ast); -} diff --git a/tests/compiler/array/array_size_zero_fail.leo b/tests/compiler/array/array_size_zero_fail.leo new file mode 100644 index 0000000000..a93c71d1df --- /dev/null +++ b/tests/compiler/array/array_size_zero_fail.leo @@ -0,0 +1,9 @@ +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +*/ + +function main() { + let a = [true; (0)]; +} \ No newline at end of file diff --git a/tests/compiler/circuits/big_self_in_circuit_replacement.leo b/tests/compiler/circuits/big_self_in_circuit_replacement.leo new file mode 100644 index 0000000000..7dee75cedf --- /dev/null +++ b/tests/compiler/circuits/big_self_in_circuit_replacement.leo @@ -0,0 +1,27 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + +circuit Foo { + x: u32; + + function new() -> Self { + let new: Self = Self { + x: 1u32 + }; + + return new; + } + + function etc() { + let y = [0u32, 1, 2, 3]; + y[Self {x: 0}.x] += 2; + } +} + +function main(y: bool) -> bool { + let foo: Foo = Foo::new(); + return foo.x == 1u32 && y; +} \ No newline at end of file diff --git a/compiler/tests/canonicalization/big_self_outside_circuit_fail.leo b/tests/compiler/circuits/big_self_outside_circuit_fail.leo similarity index 70% rename from compiler/tests/canonicalization/big_self_outside_circuit_fail.leo rename to tests/compiler/circuits/big_self_outside_circuit_fail.leo index e070486a4b..1b99e6b268 100644 --- a/compiler/tests/canonicalization/big_self_outside_circuit_fail.leo +++ b/tests/compiler/circuits/big_self_outside_circuit_fail.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +*/ + circuit Foo { x: u32; diff --git a/compiler/tests/canonicalization/compound_assignment.leo b/tests/compiler/statements/compound_assignment.leo similarity index 60% rename from compiler/tests/canonicalization/compound_assignment.leo rename to tests/compiler/statements/compound_assignment.leo index f513cd3c41..c3d697404c 100644 --- a/compiler/tests/canonicalization/compound_assignment.leo +++ b/tests/compiler/statements/compound_assignment.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/dummy.in +*/ + circuit Foo { f: u8; y: (u8, u8); @@ -7,37 +13,33 @@ circuit Foo { return 1u16; } } -function main() { + +function main(k: bool) -> bool { let x = 10u32; x += 20; - console.assert(x == 30u32); let w = 3u32; w += x; - console.assert(w == 33u32); let y = [1u8, 2u8, 3, 4]; y[0] += 3u8; y[0..3][1] *= 3; - console.assert(y[0] == 4u8); - console.assert(y[1] == 6u8); let z = (1u8, 2u8); z.1 += 3u8; - console.assert(z.1 == 5u8); let foo = Foo { f: 6u8, y: (1u8, 1u8) }; foo.f += 2u8; - console.assert(foo.f == 8u8); let complex = 2u8; complex += 22u8 - 2u8+ 1u8; - console.assert(complex == 23u8); let a = [[0u8; 1]; 4]; a[2][0] += 1u8; - console.assert(a[2][0] == 1u8); let b = [0u8; (4, 1)]; b[2][0] += 1u8; - console.assert(a[2][0] == 1u8); + + return x == 30u32 && w == 33u32 && y[0] == 4u8 && y[1] == 6u8 + && z.1 == 5u8 && foo.f == 8u8 && a[2][0] == 1u8 && a[2][0] == 1u8 + && k; } \ No newline at end of file diff --git a/tests/compiler/statements/inputs/dummy.in b/tests/compiler/statements/inputs/dummy.in new file mode 100644 index 0000000000..37d01308e2 --- /dev/null +++ b/tests/compiler/statements/inputs/dummy.in @@ -0,0 +1,5 @@ +[main] +k: bool = true; + +[registers] +r0: bool = true; \ No newline at end of file diff --git a/tests/compiler/string/inputs/two.in b/tests/compiler/string/inputs/two.in new file mode 100644 index 0000000000..983244f22d --- /dev/null +++ b/tests/compiler/string/inputs/two.in @@ -0,0 +1,5 @@ +[main] +s2: [char; 2] = "he"; + +[registers] +out: bool = true; \ No newline at end of file diff --git a/tests/compiler/string/string_transformation.leo b/tests/compiler/string/string_transformation.leo new file mode 100644 index 0000000000..23417bd67e --- /dev/null +++ b/tests/compiler/string/string_transformation.leo @@ -0,0 +1,14 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/two.in +*/ + +function main(s2: [char; 2]) -> bool { + let s = "\u{2764}ello, World!\u{DDDD}"; + s[..2] = s2; + let x = "test1"; + let z = [1u8, 2u8, 3u8, 4u8]; + z[0.."test" == "test" ? 2 : 2] = [10u8, 10]; + return z == [10u8, 10, 3, 4] && s == "hello, World!\u{DDDD}"; +} diff --git a/tests/expectations/compiler/compiler/address/equal.leo.out b/tests/expectations/compiler/compiler/address/equal.leo.out index 48c8b22837..1cdb5f2fea 100644 --- a/tests/expectations/compiler/compiler/address/equal.leo.out +++ b/tests/expectations/compiler/compiler/address/equal.leo.out @@ -22,6 +22,6 @@ outputs: a: type: bool value: "false" - initial_theorem: 1b4069c1fe2f0b258116c5864b19dfb2205e3cd8e13ea79d78fcdb0e9c1a8d50 - canonicalized_theorem: 1b4069c1fe2f0b258116c5864b19dfb2205e3cd8e13ea79d78fcdb0e9c1a8d50 - type_inferenced_theorem: d2aefbdd9fd4c931d4ee60f1a435f3da0d827e7425d2fd0a9868de22cc11ed73 + initial_ast: 1b4069c1fe2f0b258116c5864b19dfb2205e3cd8e13ea79d78fcdb0e9c1a8d50 + canonicalized_ast: 1b4069c1fe2f0b258116c5864b19dfb2205e3cd8e13ea79d78fcdb0e9c1a8d50 + type_inferenced_ast: d2aefbdd9fd4c931d4ee60f1a435f3da0d827e7425d2fd0a9868de22cc11ed73 diff --git a/tests/expectations/compiler/compiler/address/ternary.leo.out b/tests/expectations/compiler/compiler/address/ternary.leo.out index 2464f9c103..6caf58d690 100644 --- a/tests/expectations/compiler/compiler/address/ternary.leo.out +++ b/tests/expectations/compiler/compiler/address/ternary.leo.out @@ -22,6 +22,6 @@ outputs: a: type: bool value: "false" - initial_theorem: 975c6893ed20b632a3dc9c39f7fe9f381e7dda4b17b6c1f05ff7480e3bf2ee9d - canonicalized_theorem: 975c6893ed20b632a3dc9c39f7fe9f381e7dda4b17b6c1f05ff7480e3bf2ee9d - type_inferenced_theorem: bbc3818f0267a746d6ab324ef9b9de489ca65cd1624f528dae941841f39517af + initial_ast: 975c6893ed20b632a3dc9c39f7fe9f381e7dda4b17b6c1f05ff7480e3bf2ee9d + canonicalized_ast: 975c6893ed20b632a3dc9c39f7fe9f381e7dda4b17b6c1f05ff7480e3bf2ee9d + type_inferenced_ast: bbc3818f0267a746d6ab324ef9b9de489ca65cd1624f528dae941841f39517af diff --git a/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out b/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out new file mode 100644 index 0000000000..f76f2e73a4 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> compiler-test:4:13\n |\n 4 | let a = [true; (0)];\n | ^^^^^^^^^^^\n |\n = received dimension size of 0, expected it to be 1 or larger." diff --git a/tests/expectations/compiler/compiler/array/complex_access.leo.out b/tests/expectations/compiler/compiler/array/complex_access.leo.out index eac12a0947..b90f25e21b 100644 --- a/tests/expectations/compiler/compiler/array/complex_access.leo.out +++ b/tests/expectations/compiler/compiler/array/complex_access.leo.out @@ -16,6 +16,6 @@ outputs: out: type: bool value: "true" - initial_theorem: 9808de8c342c41e060d3d3134eb168c8d8cc3ff0641cb8d9779a1746b9fa1687 - canonicalized_theorem: 1479a9afd623ad11ca137555fd86a3f0a6da39641d5b2da712273242541c246e - type_inferenced_theorem: 9bf998e088b9cce0f40a0326fa8e744c88d8168e04c563a2fbd6a57acd23da1f + initial_ast: 9808de8c342c41e060d3d3134eb168c8d8cc3ff0641cb8d9779a1746b9fa1687 + canonicalized_ast: 1479a9afd623ad11ca137555fd86a3f0a6da39641d5b2da712273242541c246e + type_inferenced_ast: 9bf998e088b9cce0f40a0326fa8e744c88d8168e04c563a2fbd6a57acd23da1f diff --git a/tests/expectations/compiler/compiler/array/equal_initializer.leo.out b/tests/expectations/compiler/compiler/array/equal_initializer.leo.out index 1743444985..720cfd8180 100644 --- a/tests/expectations/compiler/compiler/array/equal_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/equal_initializer.leo.out @@ -22,6 +22,6 @@ outputs: x: type: bool value: "false" - initial_theorem: 25f4af112eb1512952d78bb7fa1d5287e3ab778255307f69304bbe1756575085 - canonicalized_theorem: 248b7cc7462c3f035f337c9232a08bb5a911d7f4e153dd804a32bc597adb0210 - type_inferenced_theorem: ebc3a5632c2d65e51cd9934b1ee4e395867808deeda3ecddfeaebb1b08093ed7 + initial_ast: 25f4af112eb1512952d78bb7fa1d5287e3ab778255307f69304bbe1756575085 + canonicalized_ast: 248b7cc7462c3f035f337c9232a08bb5a911d7f4e153dd804a32bc597adb0210 + type_inferenced_ast: ebc3a5632c2d65e51cd9934b1ee4e395867808deeda3ecddfeaebb1b08093ed7 diff --git a/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out b/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out index 74950b1889..4c4524fe2a 100644 --- a/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out +++ b/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out @@ -22,6 +22,6 @@ outputs: x: type: bool value: "true" - initial_theorem: b3bae883863f88babaafa80d4c029974767fba5fea89ac8c2ab10512e61a38ba - canonicalized_theorem: 9070de3276acf8d06ac58439247130e444c9b02de25b968ad1fc746650a1896c - type_inferenced_theorem: 40a38002031be2cf0141c9ea33562fe69fc3891baeba9c92c487915b97d82507 + initial_ast: b3bae883863f88babaafa80d4c029974767fba5fea89ac8c2ab10512e61a38ba + canonicalized_ast: 9070de3276acf8d06ac58439247130e444c9b02de25b968ad1fc746650a1896c + type_inferenced_ast: 40a38002031be2cf0141c9ea33562fe69fc3891baeba9c92c487915b97d82507 diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out index acf416ce58..39dcd7c529 100644 --- a/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_theorem: f5e4014d45239734a04d57c7b130fdf9752de245a4341062063aa5e818c5aa05 - canonicalized_theorem: 8c16a6b011fc067411acaa497386bc5df9b96b91ef739f4992ba416ecf98bafc - type_inferenced_theorem: 17d810699ef381a0a9c4efcd2ad6da64b76ce5d629c05db7b2d07d563e077548 + initial_ast: f5e4014d45239734a04d57c7b130fdf9752de245a4341062063aa5e818c5aa05 + canonicalized_ast: 8c16a6b011fc067411acaa497386bc5df9b96b91ef739f4992ba416ecf98bafc + type_inferenced_ast: 17d810699ef381a0a9c4efcd2ad6da64b76ce5d629c05db7b2d07d563e077548 diff --git a/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out index ab2d409cae..d77f05d984 100644 --- a/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_theorem: 25f4af112eb1512952d78bb7fa1d5287e3ab778255307f69304bbe1756575085 - canonicalized_theorem: 248b7cc7462c3f035f337c9232a08bb5a911d7f4e153dd804a32bc597adb0210 - type_inferenced_theorem: ebc3a5632c2d65e51cd9934b1ee4e395867808deeda3ecddfeaebb1b08093ed7 + initial_ast: 25f4af112eb1512952d78bb7fa1d5287e3ab778255307f69304bbe1756575085 + canonicalized_ast: 248b7cc7462c3f035f337c9232a08bb5a911d7f4e153dd804a32bc597adb0210 + type_inferenced_ast: ebc3a5632c2d65e51cd9934b1ee4e395867808deeda3ecddfeaebb1b08093ed7 diff --git a/tests/expectations/compiler/compiler/array/multi_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_initializer.leo.out index cd80aadaf8..1df8dce807 100644 --- a/tests/expectations/compiler/compiler/array/multi_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_initializer.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: c45ead50a2983d040085c68b6ec28ab68cba08496478ff590b81205522acc59b - canonicalized_theorem: ad38508a91e16e3ed92d40962dc77e09264c6c7920a88f136f7e5919225becf4 - type_inferenced_theorem: 8e0c3cf4e018444c0abbb52902ca70a413ab7cb2eee04d90598e034d3d67dbe7 + initial_ast: c45ead50a2983d040085c68b6ec28ab68cba08496478ff590b81205522acc59b + canonicalized_ast: ad38508a91e16e3ed92d40962dc77e09264c6c7920a88f136f7e5919225becf4 + type_inferenced_ast: 8e0c3cf4e018444c0abbb52902ca70a413ab7cb2eee04d90598e034d3d67dbe7 diff --git a/tests/expectations/compiler/compiler/array/nested.leo.out b/tests/expectations/compiler/compiler/array/nested.leo.out index 8ddc167cdf..3e23b2d19b 100644 --- a/tests/expectations/compiler/compiler/array/nested.leo.out +++ b/tests/expectations/compiler/compiler/array/nested.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 796cfe23085a2fd72700df353d266d3e2f62e893faeba8ed1af5ee5178f8e706 - canonicalized_theorem: d06970075b65456a138d9286fd3c445c928a55bf9819d98603b494c38563eae1 - type_inferenced_theorem: 41b1e49c972a34ed3d4629feabe3cb37f2078ba44fd1f3bee0a1888ca86f7ae4 + initial_ast: 796cfe23085a2fd72700df353d266d3e2f62e893faeba8ed1af5ee5178f8e706 + canonicalized_ast: d06970075b65456a138d9286fd3c445c928a55bf9819d98603b494c38563eae1 + type_inferenced_ast: 41b1e49c972a34ed3d4629feabe3cb37f2078ba44fd1f3bee0a1888ca86f7ae4 diff --git a/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out b/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out index f190e32c0f..c687d63f9b 100644 --- a/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out +++ b/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: cb893a674418ed59a6cb48487c45194d14fbd20bafed6c25069ec776dc8034cb - canonicalized_theorem: 81130092aaf4ba0f54d49bc07791bf17605571c6ce7d5e6f4ac657d5e10d6e42 - type_inferenced_theorem: 95cbaf465a8177d13e7b2a6d3f7b5da59880158ad02df2c475f9e4a574e90771 + initial_ast: cb893a674418ed59a6cb48487c45194d14fbd20bafed6c25069ec776dc8034cb + canonicalized_ast: 81130092aaf4ba0f54d49bc07791bf17605571c6ce7d5e6f4ac657d5e10d6e42 + type_inferenced_ast: 95cbaf465a8177d13e7b2a6d3f7b5da59880158ad02df2c475f9e4a574e90771 diff --git a/tests/expectations/compiler/compiler/array/registers.leo.out b/tests/expectations/compiler/compiler/array/registers.leo.out index 6bed41172a..9960fc5374 100644 --- a/tests/expectations/compiler/compiler/array/registers.leo.out +++ b/tests/expectations/compiler/compiler/array/registers.leo.out @@ -22,6 +22,6 @@ outputs: r: type: "[u8; 3]" value: "\"123\"" - initial_theorem: 81dd2c459d5a1bff4963fb2cfdc67348183061934025b96739dc05c7b65a2a8b - canonicalized_theorem: 81dd2c459d5a1bff4963fb2cfdc67348183061934025b96739dc05c7b65a2a8b - type_inferenced_theorem: fcb8de69c92dff4a4adb8a160fc3b78042f394cd0dc627c5bf06820a095d7012 + initial_ast: 81dd2c459d5a1bff4963fb2cfdc67348183061934025b96739dc05c7b65a2a8b + canonicalized_ast: 81dd2c459d5a1bff4963fb2cfdc67348183061934025b96739dc05c7b65a2a8b + type_inferenced_ast: fcb8de69c92dff4a4adb8a160fc3b78042f394cd0dc627c5bf06820a095d7012 diff --git a/tests/expectations/compiler/compiler/array/slice.leo.out b/tests/expectations/compiler/compiler/array/slice.leo.out index 26954f821d..9b847d5e42 100644 --- a/tests/expectations/compiler/compiler/array/slice.leo.out +++ b/tests/expectations/compiler/compiler/array/slice.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_theorem: ca5fc7bf19d8e6ee1b1421f1a37ea84c42bc89e8ac90711488bc17e996e88a91 - canonicalized_theorem: ca5fc7bf19d8e6ee1b1421f1a37ea84c42bc89e8ac90711488bc17e996e88a91 - type_inferenced_theorem: 2823901914ffea0d4cfcf449b9e45b46f67255e0b50f7a946b0552b240bedc0d + initial_ast: ca5fc7bf19d8e6ee1b1421f1a37ea84c42bc89e8ac90711488bc17e996e88a91 + canonicalized_ast: ca5fc7bf19d8e6ee1b1421f1a37ea84c42bc89e8ac90711488bc17e996e88a91 + type_inferenced_ast: 2823901914ffea0d4cfcf449b9e45b46f67255e0b50f7a946b0552b240bedc0d diff --git a/tests/expectations/compiler/compiler/array/slice_lower.leo.out b/tests/expectations/compiler/compiler/array/slice_lower.leo.out index dfbb49183e..41e110fca8 100644 --- a/tests/expectations/compiler/compiler/array/slice_lower.leo.out +++ b/tests/expectations/compiler/compiler/array/slice_lower.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 9dad967730de4617fb8dad9001aac6a753f926236c99b39ea52d89fcff8c0750 - canonicalized_theorem: 9dad967730de4617fb8dad9001aac6a753f926236c99b39ea52d89fcff8c0750 - type_inferenced_theorem: fe9de3669f265236e4434434911e4672b7b61b7fa5f429de9cd8721424b07c35 + initial_ast: 9dad967730de4617fb8dad9001aac6a753f926236c99b39ea52d89fcff8c0750 + canonicalized_ast: 9dad967730de4617fb8dad9001aac6a753f926236c99b39ea52d89fcff8c0750 + type_inferenced_ast: fe9de3669f265236e4434434911e4672b7b61b7fa5f429de9cd8721424b07c35 diff --git a/tests/expectations/compiler/compiler/array/spread.leo.out b/tests/expectations/compiler/compiler/array/spread.leo.out index ab8b502908..8399078a3b 100644 --- a/tests/expectations/compiler/compiler/array/spread.leo.out +++ b/tests/expectations/compiler/compiler/array/spread.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_theorem: 2506cc8885eaae80a2ff90d1d231440dcfafd10fd8eb53317112ff2d2240d65e - canonicalized_theorem: 2506cc8885eaae80a2ff90d1d231440dcfafd10fd8eb53317112ff2d2240d65e - type_inferenced_theorem: bc0e1e40fcb7ac04e1dec943be5b93a1e39d43bee68a26713716765775674577 + initial_ast: 2506cc8885eaae80a2ff90d1d231440dcfafd10fd8eb53317112ff2d2240d65e + canonicalized_ast: 2506cc8885eaae80a2ff90d1d231440dcfafd10fd8eb53317112ff2d2240d65e + type_inferenced_ast: bc0e1e40fcb7ac04e1dec943be5b93a1e39d43bee68a26713716765775674577 diff --git a/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out b/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out index cc6eb27b12..b8e13e745e 100644 --- a/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out +++ b/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_theorem: e238db049bc888e9243b421a188edbe5ae160127164b6bb75e54125052455565 - canonicalized_theorem: e238db049bc888e9243b421a188edbe5ae160127164b6bb75e54125052455565 - type_inferenced_theorem: e498240b5cb8c4d46a0b1035f208025df8e5feeabf9dddaa859a0a695ae8c5f6 + initial_ast: e238db049bc888e9243b421a188edbe5ae160127164b6bb75e54125052455565 + canonicalized_ast: e238db049bc888e9243b421a188edbe5ae160127164b6bb75e54125052455565 + type_inferenced_ast: e498240b5cb8c4d46a0b1035f208025df8e5feeabf9dddaa859a0a695ae8c5f6 diff --git a/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out b/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out index 1571180efe..4031b79a1f 100644 --- a/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out +++ b/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: c650970b4c46e15ef7cac7663cef8cb18dc5c60e044d49741b727cd73b020b71 - canonicalized_theorem: bd31242d7d82f9037c93875ddbba73c4b9ce9842a7b3c06363519b2aa35f59ac - type_inferenced_theorem: cd1b8009d96efc19823875d3f19e626cc23c8c61e66729d51c0349d748834d93 + initial_ast: c650970b4c46e15ef7cac7663cef8cb18dc5c60e044d49741b727cd73b020b71 + canonicalized_ast: bd31242d7d82f9037c93875ddbba73c4b9ce9842a7b3c06363519b2aa35f59ac + type_inferenced_ast: cd1b8009d96efc19823875d3f19e626cc23c8c61e66729d51c0349d748834d93 diff --git a/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out index 2a52d2402b..e8f18bfbcc 100644 --- a/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_theorem: 42d14deb7baaf81b59723a453b1aa09e68bfc8677ce2903596de69ad6b7677ab - canonicalized_theorem: 42d14deb7baaf81b59723a453b1aa09e68bfc8677ce2903596de69ad6b7677ab - type_inferenced_theorem: 1559a3a4db454285ab969d20276d9112fca0b24f6726f64d4b0371dccde32abf + initial_ast: 42d14deb7baaf81b59723a453b1aa09e68bfc8677ce2903596de69ad6b7677ab + canonicalized_ast: 42d14deb7baaf81b59723a453b1aa09e68bfc8677ce2903596de69ad6b7677ab + type_inferenced_ast: 1559a3a4db454285ab969d20276d9112fca0b24f6726f64d4b0371dccde32abf diff --git a/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out index 2fc5854372..a7152bc822 100644 --- a/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_theorem: c7cf923f9ca2a963279a8ff7ae9aa0a11eaddc8ba3e107d48f3aef1d1c55a50f - canonicalized_theorem: c7cf923f9ca2a963279a8ff7ae9aa0a11eaddc8ba3e107d48f3aef1d1c55a50f - type_inferenced_theorem: 58b19d80de0abea85877257b60305e1f7b9d2e67044f60d0159699131d4ba6ec + initial_ast: c7cf923f9ca2a963279a8ff7ae9aa0a11eaddc8ba3e107d48f3aef1d1c55a50f + canonicalized_ast: c7cf923f9ca2a963279a8ff7ae9aa0a11eaddc8ba3e107d48f3aef1d1c55a50f + type_inferenced_ast: 58b19d80de0abea85877257b60305e1f7b9d2e67044f60d0159699131d4ba6ec diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out index 09185c5d76..2e2e0728b1 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_theorem: dbc983cae35c2cd763e9bc4505a2d1e6c063fa62ccdc858a75644175512c1558 - canonicalized_theorem: dbc983cae35c2cd763e9bc4505a2d1e6c063fa62ccdc858a75644175512c1558 - type_inferenced_theorem: 42686f9d46c46c829259d4b68643d144d126e61a899e3c413ea09d0ed12d24d1 + initial_ast: dbc983cae35c2cd763e9bc4505a2d1e6c063fa62ccdc858a75644175512c1558 + canonicalized_ast: dbc983cae35c2cd763e9bc4505a2d1e6c063fa62ccdc858a75644175512c1558 + type_inferenced_ast: 42686f9d46c46c829259d4b68643d144d126e61a899e3c413ea09d0ed12d24d1 diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out index 024be6dbfa..1c0fd25f86 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 47b31a2f572f1ae29311322f9125a2c59dc4438ab06366b93f285fa0d8b0b23b - canonicalized_theorem: 47b31a2f572f1ae29311322f9125a2c59dc4438ab06366b93f285fa0d8b0b23b - type_inferenced_theorem: c18d0320e45339073f4e7057fe5aa3f268dc7597dfe4aef10a07f120bbdb4863 + initial_ast: 47b31a2f572f1ae29311322f9125a2c59dc4438ab06366b93f285fa0d8b0b23b + canonicalized_ast: 47b31a2f572f1ae29311322f9125a2c59dc4438ab06366b93f285fa0d8b0b23b + type_inferenced_ast: c18d0320e45339073f4e7057fe5aa3f268dc7597dfe4aef10a07f120bbdb4863 diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out index 19a7213bf3..12ca826929 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 9c0229a2b927c2bbbe66d555b1a9f40ce8a9a2a5ac5c2760f1f463be6674fe8b - canonicalized_theorem: eb2512a0873084cd830fab0a3cb008c7ca6e543d52b2ada5724379a9a56ef98a - type_inferenced_theorem: f114d26de89fc0b27bde7b06eca11c3faf77137fbdb5b56583ee7e9fba0db8f0 + initial_ast: 9c0229a2b927c2bbbe66d555b1a9f40ce8a9a2a5ac5c2760f1f463be6674fe8b + canonicalized_ast: eb2512a0873084cd830fab0a3cb008c7ca6e543d52b2ada5724379a9a56ef98a + type_inferenced_ast: f114d26de89fc0b27bde7b06eca11c3faf77137fbdb5b56583ee7e9fba0db8f0 diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out index c94b0a9fcb..82b1b501f3 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: cc6ad9bf91f0055144e3267e0069b470f01e115d4e653f41059ba252a28f8208 - canonicalized_theorem: 5e01d6c09abedddaabb2de1ae9ded2763f31736688a6c7ce89c6b719845680cc - type_inferenced_theorem: 577811bb30fc1e5f9ce24e162e1d87fcdce5d86d37d693f7e0a940a000d1b901 + initial_ast: cc6ad9bf91f0055144e3267e0069b470f01e115d4e653f41059ba252a28f8208 + canonicalized_ast: 5e01d6c09abedddaabb2de1ae9ded2763f31736688a6c7ce89c6b719845680cc + type_inferenced_ast: 577811bb30fc1e5f9ce24e162e1d87fcdce5d86d37d693f7e0a940a000d1b901 diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out index d7b07cd325..d8cf6f6984 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: eb95146b4dcbaa16244c766c3a4ffc8b804b65ba20bc905cea8a464853603510 - canonicalized_theorem: edb4d22d5499b13f5e3bffe2e770ea3207858f8c21c4020b76e3568d2cc1d2d8 - type_inferenced_theorem: 3629aa30a841dd8f299c667a1c63443d5622712e9006b7f6bbfa9dd025cd798d + initial_ast: eb95146b4dcbaa16244c766c3a4ffc8b804b65ba20bc905cea8a464853603510 + canonicalized_ast: edb4d22d5499b13f5e3bffe2e770ea3207858f8c21c4020b76e3568d2cc1d2d8 + type_inferenced_ast: 3629aa30a841dd8f299c667a1c63443d5622712e9006b7f6bbfa9dd025cd798d diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out index 8b392058d7..e8110d845b 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 15baea7cfadb05d32f5cf5375a25208c42e173e7832c00c5fb7f9007aca5dc48 - canonicalized_theorem: cd70c9c9f2d86b38d0e49d371fad697375cd6674206c9b3eb32e534a0367afe1 - type_inferenced_theorem: 1cbb9181a67580fd51535f5273a2b8168270c3213061bcc5c6604b3af203d7b5 + initial_ast: 15baea7cfadb05d32f5cf5375a25208c42e173e7832c00c5fb7f9007aca5dc48 + canonicalized_ast: cd70c9c9f2d86b38d0e49d371fad697375cd6674206c9b3eb32e534a0367afe1 + type_inferenced_ast: 1cbb9181a67580fd51535f5273a2b8168270c3213061bcc5c6604b3af203d7b5 diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out index 6bcbf5fba6..3677eceace 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: a29044947f267f770abe4b67c6477ed5971c4b04d17a34a043f24be31dd3535c - canonicalized_theorem: 3a4f6774136e7b9453a58bfaecb228595ff94e55630476acc9e7b6b93a0169a2 - type_inferenced_theorem: f8457618409d5f1508b82e155212a5d9321a11314b581f4f5062c220f99dcd11 + initial_ast: a29044947f267f770abe4b67c6477ed5971c4b04d17a34a043f24be31dd3535c + canonicalized_ast: 3a4f6774136e7b9453a58bfaecb228595ff94e55630476acc9e7b6b93a0169a2 + type_inferenced_ast: f8457618409d5f1508b82e155212a5d9321a11314b581f4f5062c220f99dcd11 diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out index c33ad2f511..ac187385e8 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 611c6362e365456206304d7d28cc428bf49cf57d907fcfa5c106426f32e64515 - canonicalized_theorem: 216d2e239b59ea1aefac5e503233ec6c1d3d480b5cc316d02f4910ee3eafd087 - type_inferenced_theorem: 17de88a1fa4f500b91cdd10512bb892f88e8eb987fa5496f6a4d3441b9aef5b5 + initial_ast: 611c6362e365456206304d7d28cc428bf49cf57d907fcfa5c106426f32e64515 + canonicalized_ast: 216d2e239b59ea1aefac5e503233ec6c1d3d480b5cc316d02f4910ee3eafd087 + type_inferenced_ast: 17de88a1fa4f500b91cdd10512bb892f88e8eb987fa5496f6a4d3441b9aef5b5 diff --git a/tests/expectations/compiler/compiler/boolean/and.leo.out b/tests/expectations/compiler/compiler/boolean/and.leo.out index e431b3e264..80cf302a7a 100644 --- a/tests/expectations/compiler/compiler/boolean/and.leo.out +++ b/tests/expectations/compiler/compiler/boolean/and.leo.out @@ -34,6 +34,6 @@ outputs: x: type: bool value: "true" - initial_theorem: 457931d2a45a5872b3f523ee9ed3ae922635750e38048927ee39dcd2fdaf338d - canonicalized_theorem: 457931d2a45a5872b3f523ee9ed3ae922635750e38048927ee39dcd2fdaf338d - type_inferenced_theorem: 5268ad28b10aedcd44c0aafced11ed0351999fceb6a202ed5a1faf833da5c2c4 + initial_ast: 457931d2a45a5872b3f523ee9ed3ae922635750e38048927ee39dcd2fdaf338d + canonicalized_ast: 457931d2a45a5872b3f523ee9ed3ae922635750e38048927ee39dcd2fdaf338d + type_inferenced_ast: 5268ad28b10aedcd44c0aafced11ed0351999fceb6a202ed5a1faf833da5c2c4 diff --git a/tests/expectations/compiler/compiler/boolean/conditional.leo.out b/tests/expectations/compiler/compiler/boolean/conditional.leo.out index 1ad2fd1423..1e0ae4c270 100644 --- a/tests/expectations/compiler/compiler/boolean/conditional.leo.out +++ b/tests/expectations/compiler/compiler/boolean/conditional.leo.out @@ -34,6 +34,6 @@ outputs: x: type: bool value: "true" - initial_theorem: 57ab6c27f0cc1f947f533b8758a8d7643358eb972fa52d8e97fd12403a3a14e0 - canonicalized_theorem: 57ab6c27f0cc1f947f533b8758a8d7643358eb972fa52d8e97fd12403a3a14e0 - type_inferenced_theorem: 55a49f89b8b70b430ca8919b6dbbb3b350a98a8a9e498377d878dd4336a050e6 + initial_ast: 57ab6c27f0cc1f947f533b8758a8d7643358eb972fa52d8e97fd12403a3a14e0 + canonicalized_ast: 57ab6c27f0cc1f947f533b8758a8d7643358eb972fa52d8e97fd12403a3a14e0 + type_inferenced_ast: 55a49f89b8b70b430ca8919b6dbbb3b350a98a8a9e498377d878dd4336a050e6 diff --git a/tests/expectations/compiler/compiler/boolean/equal.leo.out b/tests/expectations/compiler/compiler/boolean/equal.leo.out index 30cb2c7d7c..2883376a47 100644 --- a/tests/expectations/compiler/compiler/boolean/equal.leo.out +++ b/tests/expectations/compiler/compiler/boolean/equal.leo.out @@ -34,6 +34,6 @@ outputs: x: type: bool value: "true" - initial_theorem: dcd562246dac98c86986cd3c8519ef6bab0d6ad9eb910ef2b797e25eebf66160 - canonicalized_theorem: dcd562246dac98c86986cd3c8519ef6bab0d6ad9eb910ef2b797e25eebf66160 - type_inferenced_theorem: ac5fc2712e702bdd3735bdac2885d028ed66ced47e0f3c310f8c17191a6aa9fe + initial_ast: dcd562246dac98c86986cd3c8519ef6bab0d6ad9eb910ef2b797e25eebf66160 + canonicalized_ast: dcd562246dac98c86986cd3c8519ef6bab0d6ad9eb910ef2b797e25eebf66160 + type_inferenced_ast: ac5fc2712e702bdd3735bdac2885d028ed66ced47e0f3c310f8c17191a6aa9fe diff --git a/tests/expectations/compiler/compiler/boolean/not_equal.leo.out b/tests/expectations/compiler/compiler/boolean/not_equal.leo.out index e044e5b308..1384632ee4 100644 --- a/tests/expectations/compiler/compiler/boolean/not_equal.leo.out +++ b/tests/expectations/compiler/compiler/boolean/not_equal.leo.out @@ -34,6 +34,6 @@ outputs: x: type: bool value: "false" - initial_theorem: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 - canonicalized_theorem: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 - type_inferenced_theorem: 730367497b7b56381f29321e18eade74d70107a6d8c657b47022215015f53801 + initial_ast: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 + canonicalized_ast: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 + type_inferenced_ast: 730367497b7b56381f29321e18eade74d70107a6d8c657b47022215015f53801 diff --git a/tests/expectations/compiler/compiler/boolean/or.leo.out b/tests/expectations/compiler/compiler/boolean/or.leo.out index 5465eb6334..451ad885f1 100644 --- a/tests/expectations/compiler/compiler/boolean/or.leo.out +++ b/tests/expectations/compiler/compiler/boolean/or.leo.out @@ -34,6 +34,6 @@ outputs: x: type: bool value: "true" - initial_theorem: fe77500ebf653bfe8620287f2c9e52f0e985c915a09a285be3b659a308649a65 - canonicalized_theorem: fe77500ebf653bfe8620287f2c9e52f0e985c915a09a285be3b659a308649a65 - type_inferenced_theorem: 52112d0a4983f119ba82655780b8aead34d1cced758e5595ce62dbc717f95cae + initial_ast: fe77500ebf653bfe8620287f2c9e52f0e985c915a09a285be3b659a308649a65 + canonicalized_ast: fe77500ebf653bfe8620287f2c9e52f0e985c915a09a285be3b659a308649a65 + type_inferenced_ast: 52112d0a4983f119ba82655780b8aead34d1cced758e5595ce62dbc717f95cae diff --git a/tests/expectations/compiler/compiler/char/circuit.leo.out b/tests/expectations/compiler/compiler/char/circuit.leo.out index f25dcf89ea..65ee2bb59e 100644 --- a/tests/expectations/compiler/compiler/char/circuit.leo.out +++ b/tests/expectations/compiler/compiler/char/circuit.leo.out @@ -100,6 +100,6 @@ outputs: r: type: char value: "'\\u{1f62d}'" - initial_theorem: 680d480560e2a187669f5bf3c328cee1865021cbe4c19f3350db843d312b6406 - canonicalized_theorem: 680d480560e2a187669f5bf3c328cee1865021cbe4c19f3350db843d312b6406 - type_inferenced_theorem: 385365a7d46c458c2d5f94690acc53191bf234bcdb928a9efc454c33ba06718a + initial_ast: 680d480560e2a187669f5bf3c328cee1865021cbe4c19f3350db843d312b6406 + canonicalized_ast: 680d480560e2a187669f5bf3c328cee1865021cbe4c19f3350db843d312b6406 + type_inferenced_ast: 385365a7d46c458c2d5f94690acc53191bf234bcdb928a9efc454c33ba06718a diff --git a/tests/expectations/compiler/compiler/char/neq.leo.out b/tests/expectations/compiler/compiler/char/neq.leo.out index 8d72cfd6f4..650ac5b345 100644 --- a/tests/expectations/compiler/compiler/char/neq.leo.out +++ b/tests/expectations/compiler/compiler/char/neq.leo.out @@ -100,6 +100,6 @@ outputs: r: type: char value: "'a'" - initial_theorem: 66ea1340fc8ae77142ea3d254d8d3350a2775549ea7ba0ab550ec88b5c5721d4 - canonicalized_theorem: 66ea1340fc8ae77142ea3d254d8d3350a2775549ea7ba0ab550ec88b5c5721d4 - type_inferenced_theorem: 7b07de0d440a813b674c11dcc71fa4daee8224d5136844d66bc7fafa60f38725 + initial_ast: 66ea1340fc8ae77142ea3d254d8d3350a2775549ea7ba0ab550ec88b5c5721d4 + canonicalized_ast: 66ea1340fc8ae77142ea3d254d8d3350a2775549ea7ba0ab550ec88b5c5721d4 + type_inferenced_ast: 7b07de0d440a813b674c11dcc71fa4daee8224d5136844d66bc7fafa60f38725 diff --git a/tests/expectations/compiler/compiler/char/nonprinting.leo.out b/tests/expectations/compiler/compiler/char/nonprinting.leo.out index ed25f4f285..599e6b7150 100644 --- a/tests/expectations/compiler/compiler/char/nonprinting.leo.out +++ b/tests/expectations/compiler/compiler/char/nonprinting.leo.out @@ -19,6 +19,6 @@ outputs: r1: type: bool value: "true" - initial_theorem: 737b6db278359fac5760302a43f0f27b06e38d9dd6affce2b61946545cb475ac - canonicalized_theorem: 737b6db278359fac5760302a43f0f27b06e38d9dd6affce2b61946545cb475ac - type_inferenced_theorem: 07d7f6418670dca3233f14b5a7dbde73787168b2cb210f6a66860a0d9a0e9ea7 + initial_ast: 737b6db278359fac5760302a43f0f27b06e38d9dd6affce2b61946545cb475ac + canonicalized_ast: 737b6db278359fac5760302a43f0f27b06e38d9dd6affce2b61946545cb475ac + type_inferenced_ast: 07d7f6418670dca3233f14b5a7dbde73787168b2cb210f6a66860a0d9a0e9ea7 diff --git a/tests/expectations/compiler/compiler/char/out.leo.out b/tests/expectations/compiler/compiler/char/out.leo.out index 96a6496c46..7985c76dd8 100644 --- a/tests/expectations/compiler/compiler/char/out.leo.out +++ b/tests/expectations/compiler/compiler/char/out.leo.out @@ -100,6 +100,6 @@ outputs: r: type: char value: "'\\u{1f62d}'" - initial_theorem: af450dbf8c804894b41a738de1832af3092cae4d2823b5839da8b7dd6a8679de - canonicalized_theorem: af450dbf8c804894b41a738de1832af3092cae4d2823b5839da8b7dd6a8679de - type_inferenced_theorem: ec94a20aaab8811399eb3cbd6b30345083f956510e3b5cf6ffb55d3087e83cc8 + initial_ast: af450dbf8c804894b41a738de1832af3092cae4d2823b5839da8b7dd6a8679de + canonicalized_ast: af450dbf8c804894b41a738de1832af3092cae4d2823b5839da8b7dd6a8679de + type_inferenced_ast: ec94a20aaab8811399eb3cbd6b30345083f956510e3b5cf6ffb55d3087e83cc8 diff --git a/tests/expectations/compiler/compiler/circuits/big_self_in_circuit_replacement.leo.out b/tests/expectations/compiler/compiler/circuits/big_self_in_circuit_replacement.leo.out new file mode 100644 index 0000000000..7bd0bf3fb0 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/big_self_in_circuit_replacement.leo.out @@ -0,0 +1,21 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" + initial_ast: aa87a9d1c477e2d5b7ae824fb434188dd6c5c519dd27ebaecd30e44be401ee1b + canonicalized_ast: f188b62839a17478878fe1dfc9863bac20fa1c0c6cf51eae5e13c5f5f79f6c1a + type_inferenced_ast: 9e838aeeebdd2f800c2e7305614f123c27d8390fbadabf1bcb15dae6466669a6 diff --git a/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out b/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out new file mode 100644 index 0000000000..e5395fd2d6 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> compiler-test:16:3\n |\n 16 | let foo: Self = Foo::new();\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = cannot call keyword `Self` outside of a circuit function" diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out index f8a56ddd8a..82e4f8a8c6 100644 --- a/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 69d5d1d8e5f05bad8d61b1c14fe6089e661c13e91160f7e4be416dca1a86e9db - canonicalized_theorem: 69d5d1d8e5f05bad8d61b1c14fe6089e661c13e91160f7e4be416dca1a86e9db - type_inferenced_theorem: c0295d3b69631f79838a642c667a7da8698eda4e20d287a5bf2693a0717a4978 + initial_ast: 69d5d1d8e5f05bad8d61b1c14fe6089e661c13e91160f7e4be416dca1a86e9db + canonicalized_ast: 69d5d1d8e5f05bad8d61b1c14fe6089e661c13e91160f7e4be416dca1a86e9db + type_inferenced_ast: c0295d3b69631f79838a642c667a7da8698eda4e20d287a5bf2693a0717a4978 diff --git a/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out b/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out index ec46dc0d16..8423b5b6ec 100644 --- a/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 583cb3219a67fcbb30d241dec9e2860d99db27b109c8d095c10838ea342efd3c - canonicalized_theorem: 583cb3219a67fcbb30d241dec9e2860d99db27b109c8d095c10838ea342efd3c - type_inferenced_theorem: bbb33dca916b1310a58492ecd4bc74ed03ef3ab87870391839fc8b627f31e941 + initial_ast: 583cb3219a67fcbb30d241dec9e2860d99db27b109c8d095c10838ea342efd3c + canonicalized_ast: 583cb3219a67fcbb30d241dec9e2860d99db27b109c8d095c10838ea342efd3c + type_inferenced_ast: bbb33dca916b1310a58492ecd4bc74ed03ef3ab87870391839fc8b627f31e941 diff --git a/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out b/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out index 65fa775533..e477b4a944 100644 --- a/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out +++ b/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: e96236da6f97f8472930c05f30db95afa0c914060fe3ee908af57dbc1644f6b8 - canonicalized_theorem: e96236da6f97f8472930c05f30db95afa0c914060fe3ee908af57dbc1644f6b8 - type_inferenced_theorem: 933e32a944dbeba01b9c1600ccdec94370927087a3a2b5511bdf4767b5fecd7b + initial_ast: e96236da6f97f8472930c05f30db95afa0c914060fe3ee908af57dbc1644f6b8 + canonicalized_ast: e96236da6f97f8472930c05f30db95afa0c914060fe3ee908af57dbc1644f6b8 + type_inferenced_ast: 933e32a944dbeba01b9c1600ccdec94370927087a3a2b5511bdf4767b5fecd7b diff --git a/tests/expectations/compiler/compiler/circuits/inline.leo.out b/tests/expectations/compiler/compiler/circuits/inline.leo.out index fee16228ff..859d29d610 100644 --- a/tests/expectations/compiler/compiler/circuits/inline.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: u32 value: "100" - initial_theorem: 7a6b3abb44b3770f98b45c1f961539ae538e1b5fb2b62ae7bffeaf2209739bc3 - canonicalized_theorem: 7a6b3abb44b3770f98b45c1f961539ae538e1b5fb2b62ae7bffeaf2209739bc3 - type_inferenced_theorem: 88703ec6b9780a1e7629b14afd0e3da35ff4d68f968db2926242f745d6f61b4d + initial_ast: 7a6b3abb44b3770f98b45c1f961539ae538e1b5fb2b62ae7bffeaf2209739bc3 + canonicalized_ast: 7a6b3abb44b3770f98b45c1f961539ae538e1b5fb2b62ae7bffeaf2209739bc3 + type_inferenced_ast: 88703ec6b9780a1e7629b14afd0e3da35ff4d68f968db2926242f745d6f61b4d diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out index 5577c1f694..577b15f092 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 76c7ce0af826afd3568deb3fb910dfbee9dc3b1db1f4a1ba6641e49f6d621a41 - canonicalized_theorem: 9c79521d3198b8ed197251626ed0e20b483026151ca99b3fb349472c63a56cc5 - type_inferenced_theorem: 1c97a2ba48df4c16b137bf9712981bad253c9585cd6e4fcae5635e0cd6d8d301 + initial_ast: 76c7ce0af826afd3568deb3fb910dfbee9dc3b1db1f4a1ba6641e49f6d621a41 + canonicalized_ast: 9c79521d3198b8ed197251626ed0e20b483026151ca99b3fb349472c63a56cc5 + type_inferenced_ast: 1c97a2ba48df4c16b137bf9712981bad253c9585cd6e4fcae5635e0cd6d8d301 diff --git a/tests/expectations/compiler/compiler/circuits/member_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_function.leo.out index a76bd6c641..f839b48afd 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 3709cdd3aeb7a84061aaafa3513872a4259583bcfcaa87b2b735610d54814fdf - canonicalized_theorem: 3709cdd3aeb7a84061aaafa3513872a4259583bcfcaa87b2b735610d54814fdf - type_inferenced_theorem: 0995eb0322eeddd4a46eadb17414ce9d79507948279f6a5cc570035c6cdc34ef + initial_ast: 3709cdd3aeb7a84061aaafa3513872a4259583bcfcaa87b2b735610d54814fdf + canonicalized_ast: 3709cdd3aeb7a84061aaafa3513872a4259583bcfcaa87b2b735610d54814fdf + type_inferenced_ast: 0995eb0322eeddd4a46eadb17414ce9d79507948279f6a5cc570035c6cdc34ef diff --git a/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out index 75f413a8f1..c36f829b9a 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: f4796f1f9215d0c6d42478aae63b1495dfad36eaaec4a981dddac9def85ffef0 - canonicalized_theorem: f4796f1f9215d0c6d42478aae63b1495dfad36eaaec4a981dddac9def85ffef0 - type_inferenced_theorem: f808f56c8af9d6677bf54e7f777b3023f82144462df704dc4f3e39830be4c109 + initial_ast: f4796f1f9215d0c6d42478aae63b1495dfad36eaaec4a981dddac9def85ffef0 + canonicalized_ast: f4796f1f9215d0c6d42478aae63b1495dfad36eaaec4a981dddac9def85ffef0 + type_inferenced_ast: f808f56c8af9d6677bf54e7f777b3023f82144462df704dc4f3e39830be4c109 diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out index cd60af8547..ccfcbb86d5 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: b6df670bda418b0aa854ad50b4fef19b44de312f56894c5a1148f9b0a2d9afee - canonicalized_theorem: b6df670bda418b0aa854ad50b4fef19b44de312f56894c5a1148f9b0a2d9afee - type_inferenced_theorem: fcc852041018d4e7bde56fa9e0cd5c75642153a708f37aec9ce392d1a89c8a15 + initial_ast: b6df670bda418b0aa854ad50b4fef19b44de312f56894c5a1148f9b0a2d9afee + canonicalized_ast: b6df670bda418b0aa854ad50b4fef19b44de312f56894c5a1148f9b0a2d9afee + type_inferenced_ast: fcc852041018d4e7bde56fa9e0cd5c75642153a708f37aec9ce392d1a89c8a15 diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out index a58b046fd3..8e891e6ac9 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 4c74b65863cddde8ce523495358ab619ec48645dcb8409658a3fb3d7a3821d6d - canonicalized_theorem: b5697d5884139da5a68861213ff3c7660f694e682078e1bd350856206e0289b8 - type_inferenced_theorem: ff4b8f91f014277d6bb2d8d82c31361e5a5c5a46ed87a1e61f0c2e2e8d5fd254 + initial_ast: 4c74b65863cddde8ce523495358ab619ec48645dcb8409658a3fb3d7a3821d6d + canonicalized_ast: b5697d5884139da5a68861213ff3c7660f694e682078e1bd350856206e0289b8 + type_inferenced_ast: ff4b8f91f014277d6bb2d8d82c31361e5a5c5a46ed87a1e61f0c2e2e8d5fd254 diff --git a/tests/expectations/compiler/compiler/circuits/member_variable.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out index 8e7c272833..f93e6cb7aa 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 35f870f8ad050ad60461320ac83f5890b05a371e175ac567205ea82848f7b843 - canonicalized_theorem: 35f870f8ad050ad60461320ac83f5890b05a371e175ac567205ea82848f7b843 - type_inferenced_theorem: 4834243c03feb9cfedec039a852cdd27a9a78c1d77e402977056ab5e9a939ab3 + initial_ast: 35f870f8ad050ad60461320ac83f5890b05a371e175ac567205ea82848f7b843 + canonicalized_ast: 35f870f8ad050ad60461320ac83f5890b05a371e175ac567205ea82848f7b843 + type_inferenced_ast: 4834243c03feb9cfedec039a852cdd27a9a78c1d77e402977056ab5e9a939ab3 diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out index d9adc8f0e5..f98c9d81ec 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: deb8019cf05028fb78c7b991b9c34b3f57a3a451291fdcdeff3d309046146a01 - canonicalized_theorem: deb8019cf05028fb78c7b991b9c34b3f57a3a451291fdcdeff3d309046146a01 - type_inferenced_theorem: a6e408cad754cdd3adc08ca8506f63dd733e300bc821819fb417fa7060c8d044 + initial_ast: deb8019cf05028fb78c7b991b9c34b3f57a3a451291fdcdeff3d309046146a01 + canonicalized_ast: deb8019cf05028fb78c7b991b9c34b3f57a3a451291fdcdeff3d309046146a01 + type_inferenced_ast: a6e408cad754cdd3adc08ca8506f63dd733e300bc821819fb417fa7060c8d044 diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out index c39a35b994..cc45a5e1f2 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 8edf6af581db0a59ea7ef541bf7a69cbe2123d03e8b2b126f0d97f863e380a13 - canonicalized_theorem: cfd575b43758d9e6fd65452f955f940a80b519bfec68f5d2f89a897d3bb93981 - type_inferenced_theorem: 9fcbf7898afbf3d3c453387620845717512ed909d934470386975e5a11140b42 + initial_ast: 8edf6af581db0a59ea7ef541bf7a69cbe2123d03e8b2b126f0d97f863e380a13 + canonicalized_ast: cfd575b43758d9e6fd65452f955f940a80b519bfec68f5d2f89a897d3bb93981 + type_inferenced_ast: 9fcbf7898afbf3d3c453387620845717512ed909d934470386975e5a11140b42 diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out index e6d2a15141..21792ff0ab 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: f61ad518c877d851b60248bd2868e80e44feeef578aaef2e6cfa30a6ac1dd325 - canonicalized_theorem: c95d6c670a0843f7c11efb4bec4784890b8504bd3f9dc1d5cf950d0683e8538a - type_inferenced_theorem: 5db7661ac71e6ee9096571c88d1f36855db0d21f3b1757f5e07c3c85c6b2c8ea + initial_ast: f61ad518c877d851b60248bd2868e80e44feeef578aaef2e6cfa30a6ac1dd325 + canonicalized_ast: c95d6c670a0843f7c11efb4bec4784890b8504bd3f9dc1d5cf950d0683e8538a + type_inferenced_ast: 5db7661ac71e6ee9096571c88d1f36855db0d21f3b1757f5e07c3c85c6b2c8ea diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out index fd6a30ce25..d50ce4095d 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 46fccf2a1d04ff7bbfb9a88eeceb6cfd39adcf7ce2e2323d4fb83f4ae3dba273 - canonicalized_theorem: 222568f9f7b61876690514fdd2dd12419b2e889269a2b7aabd7223d291167da5 - type_inferenced_theorem: f1a5656978bd48409401788332b1a1d90c969178e65af06b54d5b4445be84375 + initial_ast: 46fccf2a1d04ff7bbfb9a88eeceb6cfd39adcf7ce2e2323d4fb83f4ae3dba273 + canonicalized_ast: 222568f9f7b61876690514fdd2dd12419b2e889269a2b7aabd7223d291167da5 + type_inferenced_ast: f1a5656978bd48409401788332b1a1d90c969178e65af06b54d5b4445be84375 diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out index 8ed7bc747a..b6bbb6bebf 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 6e01b3fd6a8b93c71386db6034a1b989a06cee469df2a634dddca7a8151fc8be - canonicalized_theorem: 6e01b3fd6a8b93c71386db6034a1b989a06cee469df2a634dddca7a8151fc8be - type_inferenced_theorem: b868fba47889acf8369e00b96440fe81ebfdba5dd042dc4bddd89f0bb945ac02 + initial_ast: 6e01b3fd6a8b93c71386db6034a1b989a06cee469df2a634dddca7a8151fc8be + canonicalized_ast: 6e01b3fd6a8b93c71386db6034a1b989a06cee469df2a634dddca7a8151fc8be + type_inferenced_ast: b868fba47889acf8369e00b96440fe81ebfdba5dd042dc4bddd89f0bb945ac02 diff --git a/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out index aa63fe5992..85a26a3eda 100644 --- a/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: fb0bd30fe7fb8ec624c04628dc9bc3cfd384515ef0dfe0cfdfd36084f1b592ff - canonicalized_theorem: 9e5badf3fb1cd8940665b9ed9eb0a1e56d89dd0be61fca0436d0a30eb7e4c50c - type_inferenced_theorem: b08b23ad6859b39c79015dc41bfaa7ea5527db980706d1e6fc5e74c634a8b4c1 + initial_ast: fb0bd30fe7fb8ec624c04628dc9bc3cfd384515ef0dfe0cfdfd36084f1b592ff + canonicalized_ast: 9e5badf3fb1cd8940665b9ed9eb0a1e56d89dd0be61fca0436d0a30eb7e4c50c + type_inferenced_ast: b08b23ad6859b39c79015dc41bfaa7ea5527db980706d1e6fc5e74c634a8b4c1 diff --git a/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out b/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out index a05241d046..5e87294e05 100644 --- a/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out +++ b/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: e04195ede456babe4121950806163d2cc8c1e4b0180a37969099749ae3dfc3b9 - canonicalized_theorem: a8673bb8b05eb0289435b8b2335402f022df9ff46db523707cc61eca1b9679ad - type_inferenced_theorem: afeabed72941728dc8a8cc0ed27d1e8170f7dd477275be29e794b6c28142f2a7 + initial_ast: e04195ede456babe4121950806163d2cc8c1e4b0180a37969099749ae3dfc3b9 + canonicalized_ast: a8673bb8b05eb0289435b8b2335402f022df9ff46db523707cc61eca1b9679ad + type_inferenced_ast: afeabed72941728dc8a8cc0ed27d1e8170f7dd477275be29e794b6c28142f2a7 diff --git a/tests/expectations/compiler/compiler/circuits/self_member.leo.out b/tests/expectations/compiler/compiler/circuits/self_member.leo.out index 51a0e0b655..30145cc723 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 8865aeec0e88fe9923a55ba568c6615db5dcec6c2cfc127ecd2920b11e3455f7 - canonicalized_theorem: 8865aeec0e88fe9923a55ba568c6615db5dcec6c2cfc127ecd2920b11e3455f7 - type_inferenced_theorem: 3b24858f79ee4f4f795107ccf916d64b957cb0c81cfa4573c2cb5645b0541ef7 + initial_ast: 8865aeec0e88fe9923a55ba568c6615db5dcec6c2cfc127ecd2920b11e3455f7 + canonicalized_ast: 8865aeec0e88fe9923a55ba568c6615db5dcec6c2cfc127ecd2920b11e3455f7 + type_inferenced_ast: 3b24858f79ee4f4f795107ccf916d64b957cb0c81cfa4573c2cb5645b0541ef7 diff --git a/tests/expectations/compiler/compiler/console/assert.leo.out b/tests/expectations/compiler/compiler/console/assert.leo.out index 71b1b333e0..c4c2771a9b 100644 --- a/tests/expectations/compiler/compiler/console/assert.leo.out +++ b/tests/expectations/compiler/compiler/console/assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 70bf9e6efa84336b4d023dd5484ad15897678c9d4851b5d7cfdb8cb6b79facaa - canonicalized_theorem: 70bf9e6efa84336b4d023dd5484ad15897678c9d4851b5d7cfdb8cb6b79facaa - type_inferenced_theorem: b410b94ea2070cbfe393229700288a461896a65bb84feed3c0a006aae04566f8 + initial_ast: 70bf9e6efa84336b4d023dd5484ad15897678c9d4851b5d7cfdb8cb6b79facaa + canonicalized_ast: 70bf9e6efa84336b4d023dd5484ad15897678c9d4851b5d7cfdb8cb6b79facaa + type_inferenced_ast: b410b94ea2070cbfe393229700288a461896a65bb84feed3c0a006aae04566f8 diff --git a/tests/expectations/compiler/compiler/console/conditional_assert.leo.out b/tests/expectations/compiler/compiler/console/conditional_assert.leo.out index b56a436129..c05f689b08 100644 --- a/tests/expectations/compiler/compiler/console/conditional_assert.leo.out +++ b/tests/expectations/compiler/compiler/console/conditional_assert.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: cond_2.in output: registers: {} - initial_theorem: d6aad3c859ad1b7f4d3d258c9489cd5a4c26b3a36b10b40dd823c976fb3e1000 - canonicalized_theorem: 0291e08f42b60c0ef76f666e610bc7ef850f22e3cb849088f516e2feb312cf6e - type_inferenced_theorem: f414dd49f054e54d564501fa52bb266dd152d8c32a84dd54b61f782380d02dbe + initial_ast: d6aad3c859ad1b7f4d3d258c9489cd5a4c26b3a36b10b40dd823c976fb3e1000 + canonicalized_ast: 0291e08f42b60c0ef76f666e610bc7ef850f22e3cb849088f516e2feb312cf6e + type_inferenced_ast: f414dd49f054e54d564501fa52bb266dd152d8c32a84dd54b61f782380d02dbe diff --git a/tests/expectations/compiler/compiler/console/debug.leo.out b/tests/expectations/compiler/compiler/console/debug.leo.out index 91b471cf04..1c5670fc99 100644 --- a/tests/expectations/compiler/compiler/console/debug.leo.out +++ b/tests/expectations/compiler/compiler/console/debug.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 40014c8e30c3aa703f4f0362a16df094a45d5f0df5a94dc26e96d87170784df7 - canonicalized_theorem: 40014c8e30c3aa703f4f0362a16df094a45d5f0df5a94dc26e96d87170784df7 - type_inferenced_theorem: fb64ba6e32355ee6df3bd9942ca209f35714ce61511a9b8b867a1587518647a8 + initial_ast: 40014c8e30c3aa703f4f0362a16df094a45d5f0df5a94dc26e96d87170784df7 + canonicalized_ast: 40014c8e30c3aa703f4f0362a16df094a45d5f0df5a94dc26e96d87170784df7 + type_inferenced_ast: fb64ba6e32355ee6df3bd9942ca209f35714ce61511a9b8b867a1587518647a8 diff --git a/tests/expectations/compiler/compiler/console/error.leo.out b/tests/expectations/compiler/compiler/console/error.leo.out index 4c0c7a8654..5e70e0e4a8 100644 --- a/tests/expectations/compiler/compiler/console/error.leo.out +++ b/tests/expectations/compiler/compiler/console/error.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 2c41e0c55e5a64fd04160a56adf627d90cdbf665ebf1a0fec4a2b9049234652a - canonicalized_theorem: 2c41e0c55e5a64fd04160a56adf627d90cdbf665ebf1a0fec4a2b9049234652a - type_inferenced_theorem: fa6ccd4112e58ba2e97f3e600dd5d4858c45bb39a858bdd1b1867f494758cbca + initial_ast: 2c41e0c55e5a64fd04160a56adf627d90cdbf665ebf1a0fec4a2b9049234652a + canonicalized_ast: 2c41e0c55e5a64fd04160a56adf627d90cdbf665ebf1a0fec4a2b9049234652a + type_inferenced_ast: fa6ccd4112e58ba2e97f3e600dd5d4858c45bb39a858bdd1b1867f494758cbca diff --git a/tests/expectations/compiler/compiler/console/log.leo.out b/tests/expectations/compiler/compiler/console/log.leo.out index 258d7ac353..a498e594a1 100644 --- a/tests/expectations/compiler/compiler/console/log.leo.out +++ b/tests/expectations/compiler/compiler/console/log.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: e239286adc6d00ad3d4328d5911a60d5cf05612610f994faf05208420aa1ca6a - canonicalized_theorem: e239286adc6d00ad3d4328d5911a60d5cf05612610f994faf05208420aa1ca6a - type_inferenced_theorem: 8d10cefa3e8eb8f7d5668cb153ebc4574ca591905ab22f9ff7c81cb1be0fb110 + initial_ast: e239286adc6d00ad3d4328d5911a60d5cf05612610f994faf05208420aa1ca6a + canonicalized_ast: e239286adc6d00ad3d4328d5911a60d5cf05612610f994faf05208420aa1ca6a + type_inferenced_ast: 8d10cefa3e8eb8f7d5668cb153ebc4574ca591905ab22f9ff7c81cb1be0fb110 diff --git a/tests/expectations/compiler/compiler/console/log_conditional.leo.out b/tests/expectations/compiler/compiler/console/log_conditional.leo.out index 5b93468952..b43f2e88e0 100644 --- a/tests/expectations/compiler/compiler/console/log_conditional.leo.out +++ b/tests/expectations/compiler/compiler/console/log_conditional.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: d81597e32ce19fd62ae7043b42bbd3fd71980c74b913081cb7ed65a249efea67 - canonicalized_theorem: d81597e32ce19fd62ae7043b42bbd3fd71980c74b913081cb7ed65a249efea67 - type_inferenced_theorem: 5e163645d00884a3abf845af25115c2479d13517733d42f2a11c092d040d83e8 + initial_ast: d81597e32ce19fd62ae7043b42bbd3fd71980c74b913081cb7ed65a249efea67 + canonicalized_ast: d81597e32ce19fd62ae7043b42bbd3fd71980c74b913081cb7ed65a249efea67 + type_inferenced_ast: 5e163645d00884a3abf845af25115c2479d13517733d42f2a11c092d040d83e8 diff --git a/tests/expectations/compiler/compiler/console/log_input.leo.out b/tests/expectations/compiler/compiler/console/log_input.leo.out index 31042dc35f..073361471a 100644 --- a/tests/expectations/compiler/compiler/console/log_input.leo.out +++ b/tests/expectations/compiler/compiler/console/log_input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: f2a4b944ccecd2be35bab0a4922fb96595b75007db6c35f4be3a1aac08426f9e - canonicalized_theorem: f2a4b944ccecd2be35bab0a4922fb96595b75007db6c35f4be3a1aac08426f9e - type_inferenced_theorem: bb0b9193a4d3b6d9a91a56820f902c17f0b64705cd6d85cb942479952ec95fab + initial_ast: f2a4b944ccecd2be35bab0a4922fb96595b75007db6c35f4be3a1aac08426f9e + canonicalized_ast: f2a4b944ccecd2be35bab0a4922fb96595b75007db6c35f4be3a1aac08426f9e + type_inferenced_ast: bb0b9193a4d3b6d9a91a56820f902c17f0b64705cd6d85cb942479952ec95fab diff --git a/tests/expectations/compiler/compiler/console/log_parameter.leo.out b/tests/expectations/compiler/compiler/console/log_parameter.leo.out index 63eb87c919..a9e5a0c53a 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 057e2a8b0841e05d95c13c39d259a26fc12091362ef60f7291329a1a82f0af5e - canonicalized_theorem: 057e2a8b0841e05d95c13c39d259a26fc12091362ef60f7291329a1a82f0af5e - type_inferenced_theorem: 054b00815c79679a877ab34a89a5dbd27771f5896984c684bcc43a74c5792b32 + initial_ast: 057e2a8b0841e05d95c13c39d259a26fc12091362ef60f7291329a1a82f0af5e + canonicalized_ast: 057e2a8b0841e05d95c13c39d259a26fc12091362ef60f7291329a1a82f0af5e + type_inferenced_ast: 054b00815c79679a877ab34a89a5dbd27771f5896984c684bcc43a74c5792b32 diff --git a/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out index b93e007400..010687e3e1 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: ca762bf3526c963a715e0b3ba8f439fde8cfc3466c92e8a76fd3fd78f3dcdcdb - canonicalized_theorem: ca762bf3526c963a715e0b3ba8f439fde8cfc3466c92e8a76fd3fd78f3dcdcdb - type_inferenced_theorem: 9d00a752fd798ce8b44834df8ed766eb9acd737fade0ed6af938f668c3560a25 + initial_ast: ca762bf3526c963a715e0b3ba8f439fde8cfc3466c92e8a76fd3fd78f3dcdcdb + canonicalized_ast: ca762bf3526c963a715e0b3ba8f439fde8cfc3466c92e8a76fd3fd78f3dcdcdb + type_inferenced_ast: 9d00a752fd798ce8b44834df8ed766eb9acd737fade0ed6af938f668c3560a25 diff --git a/tests/expectations/compiler/compiler/definition/out_of_order.leo.out b/tests/expectations/compiler/compiler/definition/out_of_order.leo.out index f943ffea6f..8ff57b550a 100644 --- a/tests/expectations/compiler/compiler/definition/out_of_order.leo.out +++ b/tests/expectations/compiler/compiler/definition/out_of_order.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: a60a2c808f9c8b475e8d4917307e483db1742b5baade6e826e56d848520f24a4 - canonicalized_theorem: 9845ae56693cf58d9c1283d2bf2d1d5e8f2be7c2d018cbb689a6fb09ba952451 - type_inferenced_theorem: aae7a9954e18cf849f41af233cedd6a472cdd59c6dfdfe25a2433f0a6eaf43c8 + initial_ast: a60a2c808f9c8b475e8d4917307e483db1742b5baade6e826e56d848520f24a4 + canonicalized_ast: 9845ae56693cf58d9c1283d2bf2d1d5e8f2be7c2d018cbb689a6fb09ba952451 + type_inferenced_ast: aae7a9954e18cf849f41af233cedd6a472cdd59c6dfdfe25a2433f0a6eaf43c8 diff --git a/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out b/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out index 2733fc95a8..9ca08a8e76 100644 --- a/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out +++ b/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: a62620cae9946643df9ed0991a0f5134e786fac8d561fb15a33d710cf546799c - canonicalized_theorem: 1dc02f76c11beb5dfadc9b3d1f5423ad2bce40502600a42de066a88f97188ed4 - type_inferenced_theorem: 41e32609589c1bcb33e9dcaea9864e8868b5d2028b65924a3145b3aae7c6166a + initial_ast: a62620cae9946643df9ed0991a0f5134e786fac8d561fb15a33d710cf546799c + canonicalized_ast: 1dc02f76c11beb5dfadc9b3d1f5423ad2bce40502600a42de066a88f97188ed4 + type_inferenced_ast: 41e32609589c1bcb33e9dcaea9864e8868b5d2028b65924a3145b3aae7c6166a diff --git a/tests/expectations/compiler/compiler/field/add.leo.out b/tests/expectations/compiler/compiler/field/add.leo.out index 9a8e03fb72..66010c18fb 100644 --- a/tests/expectations/compiler/compiler/field/add.leo.out +++ b/tests/expectations/compiler/compiler/field/add.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "true" - initial_theorem: 59a25bf44613617124a4aa8ea169751c096fb50c5e3797bfe33705febc4fe10d - canonicalized_theorem: 59a25bf44613617124a4aa8ea169751c096fb50c5e3797bfe33705febc4fe10d - type_inferenced_theorem: f8e5c1c95937d6f7bd04e009d65f2345281dd68e1669b2ecf740f4b071b106f6 + initial_ast: 59a25bf44613617124a4aa8ea169751c096fb50c5e3797bfe33705febc4fe10d + canonicalized_ast: 59a25bf44613617124a4aa8ea169751c096fb50c5e3797bfe33705febc4fe10d + type_inferenced_ast: f8e5c1c95937d6f7bd04e009d65f2345281dd68e1669b2ecf740f4b071b106f6 diff --git a/tests/expectations/compiler/compiler/field/div.leo.out b/tests/expectations/compiler/compiler/field/div.leo.out index d9d293e59a..7556ffbffc 100644 --- a/tests/expectations/compiler/compiler/field/div.leo.out +++ b/tests/expectations/compiler/compiler/field/div.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "true" - initial_theorem: 6fe0af537868b537a8e6b410439b669012cd211fdb988d8457ce6d893d579bfe - canonicalized_theorem: 6fe0af537868b537a8e6b410439b669012cd211fdb988d8457ce6d893d579bfe - type_inferenced_theorem: 8020277aecd403a5edbd722c320f25cdbd5ba5f930ea4e427929ab7373db8894 + initial_ast: 6fe0af537868b537a8e6b410439b669012cd211fdb988d8457ce6d893d579bfe + canonicalized_ast: 6fe0af537868b537a8e6b410439b669012cd211fdb988d8457ce6d893d579bfe + type_inferenced_ast: 8020277aecd403a5edbd722c320f25cdbd5ba5f930ea4e427929ab7373db8894 diff --git a/tests/expectations/compiler/compiler/field/eq.leo.out b/tests/expectations/compiler/compiler/field/eq.leo.out index 46005f0560..1e99b7fe17 100644 --- a/tests/expectations/compiler/compiler/field/eq.leo.out +++ b/tests/expectations/compiler/compiler/field/eq.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "true" - initial_theorem: ed504c4658bfd6d096a4f17fb16bdc8a587b6c91fc669ade95179d8792b1f4ea - canonicalized_theorem: ed504c4658bfd6d096a4f17fb16bdc8a587b6c91fc669ade95179d8792b1f4ea - type_inferenced_theorem: 920bb42e0ece95f8cd9f343296389f13255b1c3de14f5e13dfd17ff6d82b7137 + initial_ast: ed504c4658bfd6d096a4f17fb16bdc8a587b6c91fc669ade95179d8792b1f4ea + canonicalized_ast: ed504c4658bfd6d096a4f17fb16bdc8a587b6c91fc669ade95179d8792b1f4ea + type_inferenced_ast: 920bb42e0ece95f8cd9f343296389f13255b1c3de14f5e13dfd17ff6d82b7137 diff --git a/tests/expectations/compiler/compiler/field/field.leo.out b/tests/expectations/compiler/compiler/field/field.leo.out index 87a6bce7c1..30ac9a815a 100644 --- a/tests/expectations/compiler/compiler/field/field.leo.out +++ b/tests/expectations/compiler/compiler/field/field.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "true" - initial_theorem: 54be6c6fb3a49c107d7933f6d0db4e7f54f7db4afc0a77d1bc052cc1b542c96a - canonicalized_theorem: 54be6c6fb3a49c107d7933f6d0db4e7f54f7db4afc0a77d1bc052cc1b542c96a - type_inferenced_theorem: 849caf4c6446fd4a2360d48bcaf00af8ae24844e9e1aca30c34e77c0e5470d19 + initial_ast: 54be6c6fb3a49c107d7933f6d0db4e7f54f7db4afc0a77d1bc052cc1b542c96a + canonicalized_ast: 54be6c6fb3a49c107d7933f6d0db4e7f54f7db4afc0a77d1bc052cc1b542c96a + type_inferenced_ast: 849caf4c6446fd4a2360d48bcaf00af8ae24844e9e1aca30c34e77c0e5470d19 diff --git a/tests/expectations/compiler/compiler/field/mul.leo.out b/tests/expectations/compiler/compiler/field/mul.leo.out index 80963f2f6f..c5073f9fe0 100644 --- a/tests/expectations/compiler/compiler/field/mul.leo.out +++ b/tests/expectations/compiler/compiler/field/mul.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "false" - initial_theorem: d17e4bd13c8e5f3f01cdf41bddde1d8aec876f28b1756b74a78b525d0e97ea09 - canonicalized_theorem: d17e4bd13c8e5f3f01cdf41bddde1d8aec876f28b1756b74a78b525d0e97ea09 - type_inferenced_theorem: d8db1d4d4fb8b6de4e25a458bfe2cc29d100cf959b294a76086d4cbcb209e4c6 + initial_ast: d17e4bd13c8e5f3f01cdf41bddde1d8aec876f28b1756b74a78b525d0e97ea09 + canonicalized_ast: d17e4bd13c8e5f3f01cdf41bddde1d8aec876f28b1756b74a78b525d0e97ea09 + type_inferenced_ast: d8db1d4d4fb8b6de4e25a458bfe2cc29d100cf959b294a76086d4cbcb209e4c6 diff --git a/tests/expectations/compiler/compiler/field/negate.leo.out b/tests/expectations/compiler/compiler/field/negate.leo.out index 917d8c1348..e2f7234663 100644 --- a/tests/expectations/compiler/compiler/field/negate.leo.out +++ b/tests/expectations/compiler/compiler/field/negate.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "true" - initial_theorem: 25f48855e80d5d6e0a6fe71d388d7eafd0559bd9b4c320ccb6a2c8af874352fa - canonicalized_theorem: 25f48855e80d5d6e0a6fe71d388d7eafd0559bd9b4c320ccb6a2c8af874352fa - type_inferenced_theorem: c43f0ac3e0fcb4580dac447b16530ac89d166c95a7a9497a274020c6d4ec75fb + initial_ast: 25f48855e80d5d6e0a6fe71d388d7eafd0559bd9b4c320ccb6a2c8af874352fa + canonicalized_ast: 25f48855e80d5d6e0a6fe71d388d7eafd0559bd9b4c320ccb6a2c8af874352fa + type_inferenced_ast: c43f0ac3e0fcb4580dac447b16530ac89d166c95a7a9497a274020c6d4ec75fb diff --git a/tests/expectations/compiler/compiler/function/array_input.leo.out b/tests/expectations/compiler/compiler/function/array_input.leo.out index 45120a3dad..8204e381f2 100644 --- a/tests/expectations/compiler/compiler/function/array_input.leo.out +++ b/tests/expectations/compiler/compiler/function/array_input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: cbf1d3fe0106bda529af2912783d2ea0505b9d3780f5ca6954c1caaf3381543a - canonicalized_theorem: 711c249e5b0c1ac7f8e9dd96e13bdf1c7449f2f0afa994b9c6430f91b40072a9 - type_inferenced_theorem: a96aab38c2fa75d08da2a17ed91efd8128067f9f8ad96e151d0c27a2a55355c3 + initial_ast: cbf1d3fe0106bda529af2912783d2ea0505b9d3780f5ca6954c1caaf3381543a + canonicalized_ast: 711c249e5b0c1ac7f8e9dd96e13bdf1c7449f2f0afa994b9c6430f91b40072a9 + type_inferenced_ast: a96aab38c2fa75d08da2a17ed91efd8128067f9f8ad96e151d0c27a2a55355c3 diff --git a/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out b/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out index 7df42da091..db9a7a59a9 100644 --- a/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out +++ b/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 16b635b136d26f8f9b71d9637bd85aa8449d6a93a558669bb44235f969703cba - canonicalized_theorem: f46853ed6440686de4f7ed91623575fe2a040e0672580aa06dd2d6fd54dd51b1 - type_inferenced_theorem: b36955c7ea4a3894d5857df754e20b6ee2767d84adab7509d50a645cb78af437 + initial_ast: 16b635b136d26f8f9b71d9637bd85aa8449d6a93a558669bb44235f969703cba + canonicalized_ast: f46853ed6440686de4f7ed91623575fe2a040e0672580aa06dd2d6fd54dd51b1 + type_inferenced_ast: b36955c7ea4a3894d5857df754e20b6ee2767d84adab7509d50a645cb78af437 diff --git a/tests/expectations/compiler/compiler/function/conditional_return.leo.out b/tests/expectations/compiler/compiler/function/conditional_return.leo.out index 75a180eb0d..34b427b34b 100644 --- a/tests/expectations/compiler/compiler/function/conditional_return.leo.out +++ b/tests/expectations/compiler/compiler/function/conditional_return.leo.out @@ -16,6 +16,6 @@ outputs: a: type: u32 value: "4" - initial_theorem: 0f75f5cb48d7ef68bc14fad54adc07e94d3ffbe2f3ea9e4c7b3a0720bf51dec6 - canonicalized_theorem: 0f75f5cb48d7ef68bc14fad54adc07e94d3ffbe2f3ea9e4c7b3a0720bf51dec6 - type_inferenced_theorem: 09c9b20ba2ff94cfca66a5e2e9eda0ce0e5970ca6ebbd111968445f028294cb7 + initial_ast: 0f75f5cb48d7ef68bc14fad54adc07e94d3ffbe2f3ea9e4c7b3a0720bf51dec6 + canonicalized_ast: 0f75f5cb48d7ef68bc14fad54adc07e94d3ffbe2f3ea9e4c7b3a0720bf51dec6 + type_inferenced_ast: 09c9b20ba2ff94cfca66a5e2e9eda0ce0e5970ca6ebbd111968445f028294cb7 diff --git a/tests/expectations/compiler/compiler/function/empty.leo.out b/tests/expectations/compiler/compiler/function/empty.leo.out index d7543927f3..844180d720 100644 --- a/tests/expectations/compiler/compiler/function/empty.leo.out +++ b/tests/expectations/compiler/compiler/function/empty.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 2e31236a963bb214beb942fbb0269ec2c08ddf704fd47ce5d0864b1f1fbb2a7a - canonicalized_theorem: 186d0d826a29f428034b8782b79d8e3a0cf810f9dde88b5f1062508322c5d7d5 - type_inferenced_theorem: 740b33fa80b8d50c88523daf299d79846430a291dd8b034dd5a01a106270610b + initial_ast: 2e31236a963bb214beb942fbb0269ec2c08ddf704fd47ce5d0864b1f1fbb2a7a + canonicalized_ast: 186d0d826a29f428034b8782b79d8e3a0cf810f9dde88b5f1062508322c5d7d5 + type_inferenced_ast: 740b33fa80b8d50c88523daf299d79846430a291dd8b034dd5a01a106270610b diff --git a/tests/expectations/compiler/compiler/function/iteration.leo.out b/tests/expectations/compiler/compiler/function/iteration.leo.out index 6165714f9e..876aca8c8b 100644 --- a/tests/expectations/compiler/compiler/function/iteration.leo.out +++ b/tests/expectations/compiler/compiler/function/iteration.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: c24a0829d16b41b78aafcb92ee24c69d4f067400d3ff3f3138a139c5f420f09e - canonicalized_theorem: c91cb43f9f56224a96a22e7605d9c598b99487c18ad027eb711c0bb8a36feb86 - type_inferenced_theorem: f2df9bbf635e2e254c76ebba82716ff1bde20dfa09a3f15222ea821f29c4b253 + initial_ast: c24a0829d16b41b78aafcb92ee24c69d4f067400d3ff3f3138a139c5f420f09e + canonicalized_ast: c91cb43f9f56224a96a22e7605d9c598b99487c18ad027eb711c0bb8a36feb86 + type_inferenced_ast: f2df9bbf635e2e254c76ebba82716ff1bde20dfa09a3f15222ea821f29c4b253 diff --git a/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out index ada50b04a6..f678fdc031 100644 --- a/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out +++ b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 7f2118d52fd9440ac9e4bde368b63a4db25b47d368e5324f570129c9bcc586c4 - canonicalized_theorem: 29be9082e8e52d8241a43c35583d5374a79d209a2b3c170d46c5ec3d32eb9d5d - type_inferenced_theorem: 91116dd4ffe34d65d318088464378fd7daeb6ba9812dba94a558f9c48939703c + initial_ast: 7f2118d52fd9440ac9e4bde368b63a4db25b47d368e5324f570129c9bcc586c4 + canonicalized_ast: 29be9082e8e52d8241a43c35583d5374a79d209a2b3c170d46c5ec3d32eb9d5d + type_inferenced_ast: 91116dd4ffe34d65d318088464378fd7daeb6ba9812dba94a558f9c48939703c diff --git a/tests/expectations/compiler/compiler/function/multiple_returns.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns.leo.out index 8f44f377e0..1a0e723993 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 4c1138877fd90e6a2728592a085a567f3ba63d4225abedaf517251b8ddce7a6a - canonicalized_theorem: 4c1138877fd90e6a2728592a085a567f3ba63d4225abedaf517251b8ddce7a6a - type_inferenced_theorem: 7cf351cd0c0dbe9bb2a87397c2273f09482994ca60be8f8044a4e2d074fc7dd4 + initial_ast: 4c1138877fd90e6a2728592a085a567f3ba63d4225abedaf517251b8ddce7a6a + canonicalized_ast: 4c1138877fd90e6a2728592a085a567f3ba63d4225abedaf517251b8ddce7a6a + type_inferenced_ast: 7cf351cd0c0dbe9bb2a87397c2273f09482994ca60be8f8044a4e2d074fc7dd4 diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out index 4987f7e225..da27b1ea91 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out @@ -19,6 +19,6 @@ outputs: r1: type: bool value: "true" - initial_theorem: 5a3189a6167d84e140e6e8d2dbfcbb35de5b02927733de0c1143ede46f2fbcf2 - canonicalized_theorem: 5a3189a6167d84e140e6e8d2dbfcbb35de5b02927733de0c1143ede46f2fbcf2 - type_inferenced_theorem: 7bc19e1d45f6cd7d88edb80aa02c5d92021d0cfc6473d9404f513bda95b30b6b + initial_ast: 5a3189a6167d84e140e6e8d2dbfcbb35de5b02927733de0c1143ede46f2fbcf2 + canonicalized_ast: 5a3189a6167d84e140e6e8d2dbfcbb35de5b02927733de0c1143ede46f2fbcf2 + type_inferenced_ast: 7bc19e1d45f6cd7d88edb80aa02c5d92021d0cfc6473d9404f513bda95b30b6b diff --git a/tests/expectations/compiler/compiler/function/newlines.leo.out b/tests/expectations/compiler/compiler/function/newlines.leo.out index eb8c15f767..1a391adae5 100644 --- a/tests/expectations/compiler/compiler/function/newlines.leo.out +++ b/tests/expectations/compiler/compiler/function/newlines.leo.out @@ -19,6 +19,6 @@ outputs: b: type: u32 value: "0" - initial_theorem: 1e4cdf32e452509a2da4d4ef7a49fd51ba4773eb9582693e47f4838a506aa404 - canonicalized_theorem: 1e4cdf32e452509a2da4d4ef7a49fd51ba4773eb9582693e47f4838a506aa404 - type_inferenced_theorem: 8a61717cc7c59824571deaeb55dfcc499d26ef21617c9e8ef4814752374518eb + initial_ast: 1e4cdf32e452509a2da4d4ef7a49fd51ba4773eb9582693e47f4838a506aa404 + canonicalized_ast: 1e4cdf32e452509a2da4d4ef7a49fd51ba4773eb9582693e47f4838a506aa404 + type_inferenced_ast: 8a61717cc7c59824571deaeb55dfcc499d26ef21617c9e8ef4814752374518eb diff --git a/tests/expectations/compiler/compiler/function/repeated.leo.out b/tests/expectations/compiler/compiler/function/repeated.leo.out index c8806fdb19..967ee95db3 100644 --- a/tests/expectations/compiler/compiler/function/repeated.leo.out +++ b/tests/expectations/compiler/compiler/function/repeated.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: d0dcfefbc7063c4d87e1406fe2a81c2301796a3c5d8b863959fd671193eec340 - canonicalized_theorem: d0dcfefbc7063c4d87e1406fe2a81c2301796a3c5d8b863959fd671193eec340 - type_inferenced_theorem: d289e818127b99fc2c84e0d0bc8c3d826d1b24c9e898a0f7b0e9b3587d98cb13 + initial_ast: d0dcfefbc7063c4d87e1406fe2a81c2301796a3c5d8b863959fd671193eec340 + canonicalized_ast: d0dcfefbc7063c4d87e1406fe2a81c2301796a3c5d8b863959fd671193eec340 + type_inferenced_ast: d289e818127b99fc2c84e0d0bc8c3d826d1b24c9e898a0f7b0e9b3587d98cb13 diff --git a/tests/expectations/compiler/compiler/function/return.leo.out b/tests/expectations/compiler/compiler/function/return.leo.out index 246612a646..4f5bb10b78 100644 --- a/tests/expectations/compiler/compiler/function/return.leo.out +++ b/tests/expectations/compiler/compiler/function/return.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: c7d71942ff60eb269209f3a6cc5f5285e2bcc246e851774c2dc262e86863eaa5 - canonicalized_theorem: c7d71942ff60eb269209f3a6cc5f5285e2bcc246e851774c2dc262e86863eaa5 - type_inferenced_theorem: 3d03b6325d894d1326d3b34d9bdb3c033b4d3466762f2e10476216b506637e7d + initial_ast: c7d71942ff60eb269209f3a6cc5f5285e2bcc246e851774c2dc262e86863eaa5 + canonicalized_ast: c7d71942ff60eb269209f3a6cc5f5285e2bcc246e851774c2dc262e86863eaa5 + type_inferenced_ast: 3d03b6325d894d1326d3b34d9bdb3c033b4d3466762f2e10476216b506637e7d diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out index 2cfbf56465..fcca1da90c 100644 --- a/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: b310827701505fb4e4457a1c55557f1754437cd4a49a02a421f15e9fca038ccb - canonicalized_theorem: a33daa0e9d07ce990b2c3ea8b71c7f6a700415012b8d6fe04f9245f8d3308b59 - type_inferenced_theorem: 896b72d52b23f48531c18035033b48d7b96539592de086d8ada0cd18a6a56eb4 + initial_ast: b310827701505fb4e4457a1c55557f1754437cd4a49a02a421f15e9fca038ccb + canonicalized_ast: a33daa0e9d07ce990b2c3ea8b71c7f6a700415012b8d6fe04f9245f8d3308b59 + type_inferenced_ast: 896b72d52b23f48531c18035033b48d7b96539592de086d8ada0cd18a6a56eb4 diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out index 7e46ba749e..bf5b7f3d89 100644 --- a/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: b9f2f146319a861d734a70b88cafd0c7a5ea8fde1e9e22687b70400c7457c52a - canonicalized_theorem: 1453df7ea8e2245ac6103ac84ac47d2d2dd77a64c74503a1e6b91d5434937c2d - type_inferenced_theorem: 08f9c08fcac9ef9da68d227a04f49b9be38b6ce72ffc11ea82acea2cf8fe6b5e + initial_ast: b9f2f146319a861d734a70b88cafd0c7a5ea8fde1e9e22687b70400c7457c52a + canonicalized_ast: 1453df7ea8e2245ac6103ac84ac47d2d2dd77a64c74503a1e6b91d5434937c2d + type_inferenced_ast: 08f9c08fcac9ef9da68d227a04f49b9be38b6ce72ffc11ea82acea2cf8fe6b5e diff --git a/tests/expectations/compiler/compiler/function/return_tuple.leo.out b/tests/expectations/compiler/compiler/function/return_tuple.leo.out index ad1664423a..25caceeb64 100644 --- a/tests/expectations/compiler/compiler/function/return_tuple.leo.out +++ b/tests/expectations/compiler/compiler/function/return_tuple.leo.out @@ -19,6 +19,6 @@ outputs: r1: type: u32 value: "103" - initial_theorem: d4b008869f1527290e9cd0862e3df4204b32683a96d909dbb6c91fc9489ad0e2 - canonicalized_theorem: d4b008869f1527290e9cd0862e3df4204b32683a96d909dbb6c91fc9489ad0e2 - type_inferenced_theorem: b8ac5ab2d9383543da885cb474f1e9a237c883a8e9facf60692161d439788f90 + initial_ast: d4b008869f1527290e9cd0862e3df4204b32683a96d909dbb6c91fc9489ad0e2 + canonicalized_ast: d4b008869f1527290e9cd0862e3df4204b32683a96d909dbb6c91fc9489ad0e2 + type_inferenced_ast: b8ac5ab2d9383543da885cb474f1e9a237c883a8e9facf60692161d439788f90 diff --git a/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out b/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out index 6d62dc3cff..758598b22f 100644 --- a/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out +++ b/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out @@ -19,6 +19,6 @@ outputs: b: type: u32 value: "1" - initial_theorem: c429458b4d201fa548eea62e4a2ff8d581f788b7401a03b5f189ae210c3fe132 - canonicalized_theorem: c429458b4d201fa548eea62e4a2ff8d581f788b7401a03b5f189ae210c3fe132 - type_inferenced_theorem: 1453a4e5252dc0989544abafe9ff5477021ef0f3e8874276e4a989ad23ffaa5a + initial_ast: c429458b4d201fa548eea62e4a2ff8d581f788b7401a03b5f189ae210c3fe132 + canonicalized_ast: c429458b4d201fa548eea62e4a2ff8d581f788b7401a03b5f189ae210c3fe132 + type_inferenced_ast: 1453a4e5252dc0989544abafe9ff5477021ef0f3e8874276e4a989ad23ffaa5a diff --git a/tests/expectations/compiler/compiler/function/value_unchanged.leo.out b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out index cd1751efe0..1dcf66cd82 100644 --- a/tests/expectations/compiler/compiler/function/value_unchanged.leo.out +++ b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 971f88ef638a1ab839c743bdab5de81278f1d02819a1cc37bc40ca4f11898345 - canonicalized_theorem: eedf8caa4a34b266f354efe0723ab7af3a41a748b0f36b8daca8726130e149e1 - type_inferenced_theorem: 53817d02b96405f9ecfbccd9fa024eaab279a0d1be04265a7362377257e97b46 + initial_ast: 971f88ef638a1ab839c743bdab5de81278f1d02819a1cc37bc40ca4f11898345 + canonicalized_ast: eedf8caa4a34b266f354efe0723ab7af3a41a748b0f36b8daca8726130e149e1 + type_inferenced_ast: 53817d02b96405f9ecfbccd9fa024eaab279a0d1be04265a7362377257e97b46 diff --git a/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out b/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out index 460bcdae61..3f2ac74f18 100644 --- a/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out +++ b/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: 8b9ad0b83a216048ab6179c6e223f68290059bab1deb72771f72a672ea7a0bf9 - canonicalized_theorem: acdf383c635404bccf9612be9c14c96e400496fb231cf3062bce9aa269331c0f - type_inferenced_theorem: ab3b8dc3ddfba1affaacf2bc344c658d5b82419544da136e42c810a3f99f3832 + initial_ast: 8b9ad0b83a216048ab6179c6e223f68290059bab1deb72771f72a672ea7a0bf9 + canonicalized_ast: acdf383c635404bccf9612be9c14c96e400496fb231cf3062bce9aa269331c0f + type_inferenced_ast: ab3b8dc3ddfba1affaacf2bc344c658d5b82419544da136e42c810a3f99f3832 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out index 3a7c2cced7..adb443fba9 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: c9a0358dec57807c9afbce3bb523f3677a19873b713b16e15b31be9b58e7e938 - canonicalized_theorem: c9a0358dec57807c9afbce3bb523f3677a19873b713b16e15b31be9b58e7e938 - type_inferenced_theorem: 33c49e9288050147b62513345adee7c22e7326ccef9bcf9b4e6782376a89de8f + initial_ast: c9a0358dec57807c9afbce3bb523f3677a19873b713b16e15b31be9b58e7e938 + canonicalized_ast: c9a0358dec57807c9afbce3bb523f3677a19873b713b16e15b31be9b58e7e938 + type_inferenced_ast: 33c49e9288050147b62513345adee7c22e7326ccef9bcf9b4e6782376a89de8f diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out index 8116d87e15..55dafb3426 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 49288b2a38f96d3b0d7dfafd780a028815c4f3dc033e9083daa9226ac630e9d2 - canonicalized_theorem: 49288b2a38f96d3b0d7dfafd780a028815c4f3dc033e9083daa9226ac630e9d2 - type_inferenced_theorem: 1324a840dafe289197021fddf594be6becdf99b195f37596af43ce300f84b023 + initial_ast: 49288b2a38f96d3b0d7dfafd780a028815c4f3dc033e9083daa9226ac630e9d2 + canonicalized_ast: 49288b2a38f96d3b0d7dfafd780a028815c4f3dc033e9083daa9226ac630e9d2 + type_inferenced_ast: 1324a840dafe289197021fddf594be6becdf99b195f37596af43ce300f84b023 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out index 7f8da2d37d..36a622c2d8 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 812d646edd6b14d9e27244a9da95ce1dc805fcaac8b654f9e3e962837e776f84 - canonicalized_theorem: 812d646edd6b14d9e27244a9da95ce1dc805fcaac8b654f9e3e962837e776f84 - type_inferenced_theorem: 249bacf5d583e861e2e8168fdbb3d3a0219d5a00f5b2ba3ca4dcd94f62ef575d + initial_ast: 812d646edd6b14d9e27244a9da95ce1dc805fcaac8b654f9e3e962837e776f84 + canonicalized_ast: 812d646edd6b14d9e27244a9da95ce1dc805fcaac8b654f9e3e962837e776f84 + type_inferenced_ast: 249bacf5d583e861e2e8168fdbb3d3a0219d5a00f5b2ba3ca4dcd94f62ef575d diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out index 60a19c386f..1ec1f4e7af 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: f3bac684fe095a005d0d4811a3878d9c1ae67df0ad3a6229ac3f098ad413afb2 - canonicalized_theorem: f3bac684fe095a005d0d4811a3878d9c1ae67df0ad3a6229ac3f098ad413afb2 - type_inferenced_theorem: 0ece5b45cc7f746d06d626cce250e212fbd48eeecc61e972394609494937f7bc + initial_ast: f3bac684fe095a005d0d4811a3878d9c1ae67df0ad3a6229ac3f098ad413afb2 + canonicalized_ast: f3bac684fe095a005d0d4811a3878d9c1ae67df0ad3a6229ac3f098ad413afb2 + type_inferenced_ast: 0ece5b45cc7f746d06d626cce250e212fbd48eeecc61e972394609494937f7bc diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out index 3aaf238a89..e2dbc00e2f 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: input/main_group.in output: registers: {} - initial_theorem: b44ed4078cfd47b305648f8b661e63a925d296608b6e05e68922153dc384e5a6 - canonicalized_theorem: f63a180228feec0dd67f648abb07cbf595d43820ea1a98f3fcb746bbd7a6abe9 - type_inferenced_theorem: b3179dda593e9c7cd3607416273206a5ae8d171f2c46e6a724f6877e7f3e94b1 + initial_ast: b44ed4078cfd47b305648f8b661e63a925d296608b6e05e68922153dc384e5a6 + canonicalized_ast: f63a180228feec0dd67f648abb07cbf595d43820ea1a98f3fcb746bbd7a6abe9 + type_inferenced_ast: b3179dda593e9c7cd3607416273206a5ae8d171f2c46e6a724f6877e7f3e94b1 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out index 2a6ae0d82f..bd6d8663ca 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 0b7d9217b441385cf29f20d5e73748627dcea1a608ccfb42ef3f1dc5e68caaac - canonicalized_theorem: 8168a20e4754f86746678eaf7dd23d741b7d81d7ddba1822e0a90fd8c3149651 - type_inferenced_theorem: 43dcf7397576914601b03d1b7fd92f531992aca52f0879646316df0840d9ff6a + initial_ast: 0b7d9217b441385cf29f20d5e73748627dcea1a608ccfb42ef3f1dc5e68caaac + canonicalized_ast: 8168a20e4754f86746678eaf7dd23d741b7d81d7ddba1822e0a90fd8c3149651 + type_inferenced_ast: 43dcf7397576914601b03d1b7fd92f531992aca52f0879646316df0840d9ff6a diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out index 3423a11d0a..f865f6645c 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 - canonicalized_theorem: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 - type_inferenced_theorem: 730367497b7b56381f29321e18eade74d70107a6d8c657b47022215015f53801 + initial_ast: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 + canonicalized_ast: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 + type_inferenced_ast: 730367497b7b56381f29321e18eade74d70107a6d8c657b47022215015f53801 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out index 7427c2d1e2..12267c22b1 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 4d78c30ded08f7db4f66f8fb7a2afe70aeb6aa8e6deb904c559497c776147446 - canonicalized_theorem: a946a3abb84533a9d3b0ea014355920a058aa37b3fd7025946f35a317e0693e9 - type_inferenced_theorem: 0dad4ae7f3f49065239efb989eff41070ad109ae66331c15ae455718ef915563 + initial_ast: 4d78c30ded08f7db4f66f8fb7a2afe70aeb6aa8e6deb904c559497c776147446 + canonicalized_ast: a946a3abb84533a9d3b0ea014355920a058aa37b3fd7025946f35a317e0693e9 + type_inferenced_ast: 0dad4ae7f3f49065239efb989eff41070ad109ae66331c15ae455718ef915563 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out index 248601f71a..5110685fdf 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 0f65ed036cf7ac2bf2d9b1e73406b7f8ea669c3392b24c171697f924a99025b9 - canonicalized_theorem: 0f65ed036cf7ac2bf2d9b1e73406b7f8ea669c3392b24c171697f924a99025b9 - type_inferenced_theorem: 685758ab99acb9f79da0c0665097d1dc34d821d02502011dee82c5564e5f885a + initial_ast: 0f65ed036cf7ac2bf2d9b1e73406b7f8ea669c3392b24c171697f924a99025b9 + canonicalized_ast: 0f65ed036cf7ac2bf2d9b1e73406b7f8ea669c3392b24c171697f924a99025b9 + type_inferenced_ast: 685758ab99acb9f79da0c0665097d1dc34d821d02502011dee82c5564e5f885a diff --git a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out index 67cb3f66e0..31fec7b550 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out @@ -16,6 +16,6 @@ outputs: b: type: bool value: "true" - initial_theorem: 1c5370b54401931103a9aee59aadbc05dd747e758a20dcf9665ba181777d76d5 - canonicalized_theorem: 1c5370b54401931103a9aee59aadbc05dd747e758a20dcf9665ba181777d76d5 - type_inferenced_theorem: 04a1f100613ccf2f49733ecc76c83058d78c14c03fc4817df117eaa9a8296c66 + initial_ast: 1c5370b54401931103a9aee59aadbc05dd747e758a20dcf9665ba181777d76d5 + canonicalized_ast: 1c5370b54401931103a9aee59aadbc05dd747e758a20dcf9665ba181777d76d5 + type_inferenced_ast: 04a1f100613ccf2f49733ecc76c83058d78c14c03fc4817df117eaa9a8296c66 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out index bce194cc1f..9996d2ff80 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 1ef884c7c1e9e5a806bc5dce27cd68f33b3cddf5c1ebf930a292fd6adb5762ce - canonicalized_theorem: 1ef884c7c1e9e5a806bc5dce27cd68f33b3cddf5c1ebf930a292fd6adb5762ce - type_inferenced_theorem: aeedb43de348c034bee08c8df80d0fb2e8f9e7f11989e57cfa4fb8bbf876eb83 + initial_ast: 1ef884c7c1e9e5a806bc5dce27cd68f33b3cddf5c1ebf930a292fd6adb5762ce + canonicalized_ast: 1ef884c7c1e9e5a806bc5dce27cd68f33b3cddf5c1ebf930a292fd6adb5762ce + type_inferenced_ast: aeedb43de348c034bee08c8df80d0fb2e8f9e7f11989e57cfa4fb8bbf876eb83 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out index 19c1045716..8b35d9ab6b 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 0ef02cf93072c348503a723a38e972ef2439ca9160ebc4e68741929b60138aa4 - canonicalized_theorem: 0ef02cf93072c348503a723a38e972ef2439ca9160ebc4e68741929b60138aa4 - type_inferenced_theorem: b3b0114629852238e4488b5be7a1d4af601806674ee6408c2335c3a80ac04b0e + initial_ast: 0ef02cf93072c348503a723a38e972ef2439ca9160ebc4e68741929b60138aa4 + canonicalized_ast: 0ef02cf93072c348503a723a38e972ef2439ca9160ebc4e68741929b60138aa4 + type_inferenced_ast: b3b0114629852238e4488b5be7a1d4af601806674ee6408c2335c3a80ac04b0e diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out index f9e312de29..f99693b95d 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 6726f88925f393f90e09f536b7da48575feb19fb2f30f5fb8ce0968b66a469b1 - canonicalized_theorem: 6726f88925f393f90e09f536b7da48575feb19fb2f30f5fb8ce0968b66a469b1 - type_inferenced_theorem: 3b0f1f17c8876d1e1a644bb425beedbc951e38683f33f726edaf12a6d003d896 + initial_ast: 6726f88925f393f90e09f536b7da48575feb19fb2f30f5fb8ce0968b66a469b1 + canonicalized_ast: 6726f88925f393f90e09f536b7da48575feb19fb2f30f5fb8ce0968b66a469b1 + type_inferenced_ast: 3b0f1f17c8876d1e1a644bb425beedbc951e38683f33f726edaf12a6d003d896 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out index c0abae8219..3ec43c8646 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 0fd985182a4a32bc7b983c13e4f7b188902b6ef37ea1fbaa22da867b388990e8 - canonicalized_theorem: 0fd985182a4a32bc7b983c13e4f7b188902b6ef37ea1fbaa22da867b388990e8 - type_inferenced_theorem: 08864c66bc6890ed6d83cbb214318f7423735533f0146a856a9bdf5b8d48e816 + initial_ast: 0fd985182a4a32bc7b983c13e4f7b188902b6ef37ea1fbaa22da867b388990e8 + canonicalized_ast: 0fd985182a4a32bc7b983c13e4f7b188902b6ef37ea1fbaa22da867b388990e8 + type_inferenced_ast: 08864c66bc6890ed6d83cbb214318f7423735533f0146a856a9bdf5b8d48e816 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out index 9cacd78b35..bbdae9fa2c 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: da17f98e5cf8d90b4d73d797493d752c9d519c61cf900509c866a0649c034cad - canonicalized_theorem: da17f98e5cf8d90b4d73d797493d752c9d519c61cf900509c866a0649c034cad - type_inferenced_theorem: 5842a5364abf56e9a51e69b2ded9fdce009c8851d86beba39ba8ab373394ef66 + initial_ast: da17f98e5cf8d90b4d73d797493d752c9d519c61cf900509c866a0649c034cad + canonicalized_ast: da17f98e5cf8d90b4d73d797493d752c9d519c61cf900509c866a0649c034cad + type_inferenced_ast: 5842a5364abf56e9a51e69b2ded9fdce009c8851d86beba39ba8ab373394ef66 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out index 9f10cbaa20..c3eed3a8a4 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 3d5a53e68eb786c6a74618b539714d3fffbcc890444a5d57409a88cc214cfb7e - canonicalized_theorem: 3d5a53e68eb786c6a74618b539714d3fffbcc890444a5d57409a88cc214cfb7e - type_inferenced_theorem: 2baac7174583b7f6562bd0715d58da99c335c8ccfd56a2286e18ae57ea078694 + initial_ast: 3d5a53e68eb786c6a74618b539714d3fffbcc890444a5d57409a88cc214cfb7e + canonicalized_ast: 3d5a53e68eb786c6a74618b539714d3fffbcc890444a5d57409a88cc214cfb7e + type_inferenced_ast: 2baac7174583b7f6562bd0715d58da99c335c8ccfd56a2286e18ae57ea078694 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out index 9bdf311b07..9dbacb0ff1 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: a42e650c64317b4ee6145da788ff7348dbe61543e87016c7491854edc7104e3b - canonicalized_theorem: ebda82101177805ec323d0cce8325ea29090a7942d6784f074444fdf370c3e2e - type_inferenced_theorem: c034b0dec8b1c4b3aa735137d2294514a7014a223565811054fbf7d69b67c9da + initial_ast: a42e650c64317b4ee6145da788ff7348dbe61543e87016c7491854edc7104e3b + canonicalized_ast: ebda82101177805ec323d0cce8325ea29090a7942d6784f074444fdf370c3e2e + type_inferenced_ast: c034b0dec8b1c4b3aa735137d2294514a7014a223565811054fbf7d69b67c9da diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out index 77ba67208d..685345d493 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: ef8bcab6d5371ef86e4d7e5df90ca23079b9e5fedbfd7917b08be3a1d2ebb5b6 - canonicalized_theorem: ef8bcab6d5371ef86e4d7e5df90ca23079b9e5fedbfd7917b08be3a1d2ebb5b6 - type_inferenced_theorem: c199ab005e42c960beb6ca2b62e6b0d144960e7360530ad4fb89757f412e1c67 + initial_ast: ef8bcab6d5371ef86e4d7e5df90ca23079b9e5fedbfd7917b08be3a1d2ebb5b6 + canonicalized_ast: ef8bcab6d5371ef86e4d7e5df90ca23079b9e5fedbfd7917b08be3a1d2ebb5b6 + type_inferenced_ast: c199ab005e42c960beb6ca2b62e6b0d144960e7360530ad4fb89757f412e1c67 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out index 174ea0ef42..0953a7ca5b 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 54f05a3b9e065ed4a4c9060278ebbfba8c871fc0952928b3247495e3420e6a8f - canonicalized_theorem: 5239f39807679614fa177f6da454d51e73348714e680cc51c4587630525a3d1f - type_inferenced_theorem: 34dc40266a9c59e43ecbb094edbefbe654d89032e57f75fdcd42f5cd6125896a + initial_ast: 54f05a3b9e065ed4a4c9060278ebbfba8c871fc0952928b3247495e3420e6a8f + canonicalized_ast: 5239f39807679614fa177f6da454d51e73348714e680cc51c4587630525a3d1f + type_inferenced_ast: 34dc40266a9c59e43ecbb094edbefbe654d89032e57f75fdcd42f5cd6125896a diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out index c1a196883a..673d8e7b70 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: a5fdbc9ea34c5171ba153bfd9b5078d84d4be9e08c2eb97410082299143ae902 - canonicalized_theorem: a5fdbc9ea34c5171ba153bfd9b5078d84d4be9e08c2eb97410082299143ae902 - type_inferenced_theorem: 2caf7e798653f694eb868a03899e8316d25f4d35df081a287ca1c764d9f45a33 + initial_ast: a5fdbc9ea34c5171ba153bfd9b5078d84d4be9e08c2eb97410082299143ae902 + canonicalized_ast: a5fdbc9ea34c5171ba153bfd9b5078d84d4be9e08c2eb97410082299143ae902 + type_inferenced_ast: 2caf7e798653f694eb868a03899e8316d25f4d35df081a287ca1c764d9f45a33 diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out index 4afd229f1f..108b936235 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out @@ -16,6 +16,6 @@ outputs: r2: type: "[[u8; 4]; 2]" value: "\"[0, 0, 0, 0][0, 0, 0, 0]\"" - initial_theorem: fb540ccd0618e433c2181c6dc9b73080e0a23c3f5b5ebe9f1106276aae38d8ef - canonicalized_theorem: fb540ccd0618e433c2181c6dc9b73080e0a23c3f5b5ebe9f1106276aae38d8ef - type_inferenced_theorem: f6ed6b87a3fb35bf53ef4ba86a9a3e0d2271914a45d773dd7931c6a5d1b83151 + initial_ast: fb540ccd0618e433c2181c6dc9b73080e0a23c3f5b5ebe9f1106276aae38d8ef + canonicalized_ast: fb540ccd0618e433c2181c6dc9b73080e0a23c3f5b5ebe9f1106276aae38d8ef + type_inferenced_ast: f6ed6b87a3fb35bf53ef4ba86a9a3e0d2271914a45d773dd7931c6a5d1b83151 diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out index 8abb760809..513d80da5e 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out @@ -16,6 +16,6 @@ outputs: r: type: u8 value: "101" - initial_theorem: 430d76675273bb92e7af55000e710e2f5d1621db50550a5366325779633577bf - canonicalized_theorem: 430d76675273bb92e7af55000e710e2f5d1621db50550a5366325779633577bf - type_inferenced_theorem: bcde9c109d65d236fb2079bc26490658438c422bc17b09bd0beebe0298feaf03 + initial_ast: 430d76675273bb92e7af55000e710e2f5d1621db50550a5366325779633577bf + canonicalized_ast: 430d76675273bb92e7af55000e710e2f5d1621db50550a5366325779633577bf + type_inferenced_ast: bcde9c109d65d236fb2079bc26490658438c422bc17b09bd0beebe0298feaf03 diff --git a/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out index 741f0918b6..b77180760f 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 6f08333f0f602b1ef25d548da7f5f5a611a4409281e3412fe380c367a76bac24 - canonicalized_theorem: 6f08333f0f602b1ef25d548da7f5f5a611a4409281e3412fe380c367a76bac24 - type_inferenced_theorem: 3a05ae6705cfc5a344631563ed43c3caf73c1762bef0b4a4165ae73e1466e27f + initial_ast: 6f08333f0f602b1ef25d548da7f5f5a611a4409281e3412fe380c367a76bac24 + canonicalized_ast: 6f08333f0f602b1ef25d548da7f5f5a611a4409281e3412fe380c367a76bac24 + type_inferenced_ast: 3a05ae6705cfc5a344631563ed43c3caf73c1762bef0b4a4165ae73e1466e27f diff --git a/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out index 9d3fbaaf1c..b8140088f6 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 0eabec3e7bd9d1b1ca1666329f7bd3ad9d3095d209c94f83a19b60e78857375f - canonicalized_theorem: 0eabec3e7bd9d1b1ca1666329f7bd3ad9d3095d209c94f83a19b60e78857375f - type_inferenced_theorem: c6fb6168c1089361909edf6d76a9d3cba97a2f907821eb7f71198f1fb6bb1310 + initial_ast: 0eabec3e7bd9d1b1ca1666329f7bd3ad9d3095d209c94f83a19b60e78857375f + canonicalized_ast: 0eabec3e7bd9d1b1ca1666329f7bd3ad9d3095d209c94f83a19b60e78857375f + type_inferenced_ast: c6fb6168c1089361909edf6d76a9d3cba97a2f907821eb7f71198f1fb6bb1310 diff --git a/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out index 9c549bcf3b..8859157fd8 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: e94f4826afb8405a883b3c3df074507dbd38db45e8fa5e8d984ed5974f521c6a - canonicalized_theorem: e94f4826afb8405a883b3c3df074507dbd38db45e8fa5e8d984ed5974f521c6a - type_inferenced_theorem: 26596f4778c179462d3365caa87addc607d88bb8f700b6132565b56ff3396dd2 + initial_ast: e94f4826afb8405a883b3c3df074507dbd38db45e8fa5e8d984ed5974f521c6a + canonicalized_ast: e94f4826afb8405a883b3c3df074507dbd38db45e8fa5e8d984ed5974f521c6a + type_inferenced_ast: 26596f4778c179462d3365caa87addc607d88bb8f700b6132565b56ff3396dd2 diff --git a/tests/expectations/compiler/compiler/integers/i128/add.leo.out b/tests/expectations/compiler/compiler/integers/i128/add.leo.out index 0d792431bc..b35d16874e 100644 --- a/tests/expectations/compiler/compiler/integers/i128/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 278b92038c32110995dae24885b81e15d897c16ca4500633b8550557758d76a1 - canonicalized_theorem: 278b92038c32110995dae24885b81e15d897c16ca4500633b8550557758d76a1 - type_inferenced_theorem: 58f145ea9284607029135a8afd9bb00e05c3ae31836c735aeb2cc0c7628f9e98 + initial_ast: 278b92038c32110995dae24885b81e15d897c16ca4500633b8550557758d76a1 + canonicalized_ast: 278b92038c32110995dae24885b81e15d897c16ca4500633b8550557758d76a1 + type_inferenced_ast: 58f145ea9284607029135a8afd9bb00e05c3ae31836c735aeb2cc0c7628f9e98 diff --git a/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out index b6351866a5..93536c2ff2 100644 --- a/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: i128.in output: registers: {} - initial_theorem: 069a5439632b91a257c447f7db4278b6ea59ec794ab3ec3e5805757615d9f3a4 - canonicalized_theorem: 43ea108e255608c03dea9e4cd6e4ac1ab4dc84a3c974372b9902139c83e4434e - type_inferenced_theorem: 3314b8988acb6fa813557f5e87f81b95370a3f15e336b78a1f0575208034d55b + initial_ast: 069a5439632b91a257c447f7db4278b6ea59ec794ab3ec3e5805757615d9f3a4 + canonicalized_ast: 43ea108e255608c03dea9e4cd6e4ac1ab4dc84a3c974372b9902139c83e4434e + type_inferenced_ast: 3314b8988acb6fa813557f5e87f81b95370a3f15e336b78a1f0575208034d55b diff --git a/tests/expectations/compiler/compiler/integers/i128/div.leo.out b/tests/expectations/compiler/compiler/integers/i128/div.leo.out index 5a03c2bbb6..20747983fb 100644 --- a/tests/expectations/compiler/compiler/integers/i128/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 4a1bed67b569a4ca5d986533ae623e685c6cb4b5fcab951ce35e6c6833c75f9e - canonicalized_theorem: 4a1bed67b569a4ca5d986533ae623e685c6cb4b5fcab951ce35e6c6833c75f9e - type_inferenced_theorem: 5327f9c10201daf1c2089780c8d6b03d25ff62ee07c739070c7a50823de4da64 + initial_ast: 4a1bed67b569a4ca5d986533ae623e685c6cb4b5fcab951ce35e6c6833c75f9e + canonicalized_ast: 4a1bed67b569a4ca5d986533ae623e685c6cb4b5fcab951ce35e6c6833c75f9e + type_inferenced_ast: 5327f9c10201daf1c2089780c8d6b03d25ff62ee07c739070c7a50823de4da64 diff --git a/tests/expectations/compiler/compiler/integers/i128/eq.leo.out b/tests/expectations/compiler/compiler/integers/i128/eq.leo.out index fdf76b86bd..e4f7ad781f 100644 --- a/tests/expectations/compiler/compiler/integers/i128/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 74aab1a9bcfc6f3a25c2f7fab9d493e8d687ce86505cd375c22b6258603a72cf - canonicalized_theorem: 74aab1a9bcfc6f3a25c2f7fab9d493e8d687ce86505cd375c22b6258603a72cf - type_inferenced_theorem: 8fd6e1c3e06fe7839d93479c03c4e59eca644ad420955e77312c6749dde5520d + initial_ast: 74aab1a9bcfc6f3a25c2f7fab9d493e8d687ce86505cd375c22b6258603a72cf + canonicalized_ast: 74aab1a9bcfc6f3a25c2f7fab9d493e8d687ce86505cd375c22b6258603a72cf + type_inferenced_ast: 8fd6e1c3e06fe7839d93479c03c4e59eca644ad420955e77312c6749dde5520d diff --git a/tests/expectations/compiler/compiler/integers/i128/ge.leo.out b/tests/expectations/compiler/compiler/integers/i128/ge.leo.out index d0f08578d1..f63a5e8909 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ge.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: bcde5f6ea48309da013de3c4cd2e759f809e8cce72c115f8b5bd2b1272e1c088 - canonicalized_theorem: bcde5f6ea48309da013de3c4cd2e759f809e8cce72c115f8b5bd2b1272e1c088 - type_inferenced_theorem: 0aa48e18e8b7b7857f9ca9808d0eac7ded70cd617e65e527fdb93fa07ff5336b + initial_ast: bcde5f6ea48309da013de3c4cd2e759f809e8cce72c115f8b5bd2b1272e1c088 + canonicalized_ast: bcde5f6ea48309da013de3c4cd2e759f809e8cce72c115f8b5bd2b1272e1c088 + type_inferenced_ast: 0aa48e18e8b7b7857f9ca9808d0eac7ded70cd617e65e527fdb93fa07ff5336b diff --git a/tests/expectations/compiler/compiler/integers/i128/gt.leo.out b/tests/expectations/compiler/compiler/integers/i128/gt.leo.out index f2c40c8ca1..57fb36b2d9 100644 --- a/tests/expectations/compiler/compiler/integers/i128/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/gt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 59236105dd9e8340d9348c60d9b7cd51e615dd4ec6a645b09573a22678e74470 - canonicalized_theorem: 59236105dd9e8340d9348c60d9b7cd51e615dd4ec6a645b09573a22678e74470 - type_inferenced_theorem: 4b84f0d2fd2d0bebcffce6bdb30919e230a5e7f6f0b31f2772efedf4f6fd3c94 + initial_ast: 59236105dd9e8340d9348c60d9b7cd51e615dd4ec6a645b09573a22678e74470 + canonicalized_ast: 59236105dd9e8340d9348c60d9b7cd51e615dd4ec6a645b09573a22678e74470 + type_inferenced_ast: 4b84f0d2fd2d0bebcffce6bdb30919e230a5e7f6f0b31f2772efedf4f6fd3c94 diff --git a/tests/expectations/compiler/compiler/integers/i128/le.leo.out b/tests/expectations/compiler/compiler/integers/i128/le.leo.out index 9cfac5c802..a5e1d57415 100644 --- a/tests/expectations/compiler/compiler/integers/i128/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/le.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 3f8f56d5c17a96d015b50f804dababd4e15d1d2ebf54bd239fe362befc49f98c - canonicalized_theorem: 3f8f56d5c17a96d015b50f804dababd4e15d1d2ebf54bd239fe362befc49f98c - type_inferenced_theorem: 74e997c5107955a418b7e658b649f10bac760ab497a69925642db4e372f8fff7 + initial_ast: 3f8f56d5c17a96d015b50f804dababd4e15d1d2ebf54bd239fe362befc49f98c + canonicalized_ast: 3f8f56d5c17a96d015b50f804dababd4e15d1d2ebf54bd239fe362befc49f98c + type_inferenced_ast: 74e997c5107955a418b7e658b649f10bac760ab497a69925642db4e372f8fff7 diff --git a/tests/expectations/compiler/compiler/integers/i128/lt.leo.out b/tests/expectations/compiler/compiler/integers/i128/lt.leo.out index 3df54ecd6d..ffd95309fd 100644 --- a/tests/expectations/compiler/compiler/integers/i128/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: d6025ab5243349142231d66100fe3e6001606095303d39aaf28663c6f0984369 - canonicalized_theorem: d6025ab5243349142231d66100fe3e6001606095303d39aaf28663c6f0984369 - type_inferenced_theorem: 06ff7de0309de0c4e88adc23d837363f0951bf96859c1dc18076d2deff17474f + initial_ast: d6025ab5243349142231d66100fe3e6001606095303d39aaf28663c6f0984369 + canonicalized_ast: d6025ab5243349142231d66100fe3e6001606095303d39aaf28663c6f0984369 + type_inferenced_ast: 06ff7de0309de0c4e88adc23d837363f0951bf96859c1dc18076d2deff17474f diff --git a/tests/expectations/compiler/compiler/integers/i128/max.leo.out b/tests/expectations/compiler/compiler/integers/i128/max.leo.out index a3e985fbcc..666913438d 100644 --- a/tests/expectations/compiler/compiler/integers/i128/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: fbe3d891245219b62b7444a1a2d145e6aa77ef5a5bb768b0fb058f1b243dd894 - canonicalized_theorem: fbe3d891245219b62b7444a1a2d145e6aa77ef5a5bb768b0fb058f1b243dd894 - type_inferenced_theorem: 926fdd740dd000b2155e292ac0fb4c51ea2c6ca6a1a8dc88addf83b35b07ca94 + initial_ast: fbe3d891245219b62b7444a1a2d145e6aa77ef5a5bb768b0fb058f1b243dd894 + canonicalized_ast: fbe3d891245219b62b7444a1a2d145e6aa77ef5a5bb768b0fb058f1b243dd894 + type_inferenced_ast: 926fdd740dd000b2155e292ac0fb4c51ea2c6ca6a1a8dc88addf83b35b07ca94 diff --git a/tests/expectations/compiler/compiler/integers/i128/min.leo.out b/tests/expectations/compiler/compiler/integers/i128/min.leo.out index 2a4d818df3..a762f4c140 100644 --- a/tests/expectations/compiler/compiler/integers/i128/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 12baf68b32dd0cc27e6c695e4373c68e789a0b7da1e30392ca84dd237602df20 - canonicalized_theorem: 12baf68b32dd0cc27e6c695e4373c68e789a0b7da1e30392ca84dd237602df20 - type_inferenced_theorem: 7b3cd17b290d7c46f014ae424adc4f526e770925fa8ff678c35f0f4283c591d7 + initial_ast: 12baf68b32dd0cc27e6c695e4373c68e789a0b7da1e30392ca84dd237602df20 + canonicalized_ast: 12baf68b32dd0cc27e6c695e4373c68e789a0b7da1e30392ca84dd237602df20 + type_inferenced_ast: 7b3cd17b290d7c46f014ae424adc4f526e770925fa8ff678c35f0f4283c591d7 diff --git a/tests/expectations/compiler/compiler/integers/i128/mul.leo.out b/tests/expectations/compiler/compiler/integers/i128/mul.leo.out index a62b1ae9b2..1659834146 100644 --- a/tests/expectations/compiler/compiler/integers/i128/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 749f276238221a67ee7cc724f2925f47ee72e2de8ce28135f0090ddc70843896 - canonicalized_theorem: 749f276238221a67ee7cc724f2925f47ee72e2de8ce28135f0090ddc70843896 - type_inferenced_theorem: 2e262184d0acfd77343ea357565d5c460b002637df8c1e1d30832373cd4bb348 + initial_ast: 749f276238221a67ee7cc724f2925f47ee72e2de8ce28135f0090ddc70843896 + canonicalized_ast: 749f276238221a67ee7cc724f2925f47ee72e2de8ce28135f0090ddc70843896 + type_inferenced_ast: 2e262184d0acfd77343ea357565d5c460b002637df8c1e1d30832373cd4bb348 diff --git a/tests/expectations/compiler/compiler/integers/i128/ne.leo.out b/tests/expectations/compiler/compiler/integers/i128/ne.leo.out index f314ffcc99..800494ad84 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: b20415db5988fac6c707d5ddf4a1287003395bdb74a96cfc4be4d8b869ace579 - canonicalized_theorem: b20415db5988fac6c707d5ddf4a1287003395bdb74a96cfc4be4d8b869ace579 - type_inferenced_theorem: 55c6b5cc48d8d80c0347d477418168c323d34aee33ea36447192166a9f54d32e + initial_ast: b20415db5988fac6c707d5ddf4a1287003395bdb74a96cfc4be4d8b869ace579 + canonicalized_ast: b20415db5988fac6c707d5ddf4a1287003395bdb74a96cfc4be4d8b869ace579 + type_inferenced_ast: 55c6b5cc48d8d80c0347d477418168c323d34aee33ea36447192166a9f54d32e diff --git a/tests/expectations/compiler/compiler/integers/i128/negate.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate.leo.out index 21565b37eb..7e4374c184 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 77b18a83d019f104049c3d1c6bf7b3a159e56024184304d42508d1be58a12e4a - canonicalized_theorem: 77b18a83d019f104049c3d1c6bf7b3a159e56024184304d42508d1be58a12e4a - type_inferenced_theorem: e08006c78ca1dfede635303eeab1b764d86c25d1e64c9f1584e67b2903cbbcc6 + initial_ast: 77b18a83d019f104049c3d1c6bf7b3a159e56024184304d42508d1be58a12e4a + canonicalized_ast: 77b18a83d019f104049c3d1c6bf7b3a159e56024184304d42508d1be58a12e4a + type_inferenced_ast: e08006c78ca1dfede635303eeab1b764d86c25d1e64c9f1584e67b2903cbbcc6 diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out index 1ae265a31c..ca5604d14b 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: b3d531ff16ea167af0dde295b141fb88045336204cfad4eb1ef39a3491ac5b21 - canonicalized_theorem: b3d531ff16ea167af0dde295b141fb88045336204cfad4eb1ef39a3491ac5b21 - type_inferenced_theorem: 01cf1e13b4c7b489855c33559bd632a3fddb2b49077922cbbe1a4a6f7d200a14 + initial_ast: b3d531ff16ea167af0dde295b141fb88045336204cfad4eb1ef39a3491ac5b21 + canonicalized_ast: b3d531ff16ea167af0dde295b141fb88045336204cfad4eb1ef39a3491ac5b21 + type_inferenced_ast: 01cf1e13b4c7b489855c33559bd632a3fddb2b49077922cbbe1a4a6f7d200a14 diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out index b1bab3f02a..e1a3dbb3c4 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: dd7a24b71e74622ec5620629aa7f60e928009e12aea0fadea259f2d62258cd8d - canonicalized_theorem: dd7a24b71e74622ec5620629aa7f60e928009e12aea0fadea259f2d62258cd8d - type_inferenced_theorem: 186f2e3226cb21c39e67390ea3ebc1e2863ed44ee3cc85278b512db4829d20f3 + initial_ast: dd7a24b71e74622ec5620629aa7f60e928009e12aea0fadea259f2d62258cd8d + canonicalized_ast: dd7a24b71e74622ec5620629aa7f60e928009e12aea0fadea259f2d62258cd8d + type_inferenced_ast: 186f2e3226cb21c39e67390ea3ebc1e2863ed44ee3cc85278b512db4829d20f3 diff --git a/tests/expectations/compiler/compiler/integers/i128/sub.leo.out b/tests/expectations/compiler/compiler/integers/i128/sub.leo.out index 8687cc4072..3191d89ca4 100644 --- a/tests/expectations/compiler/compiler/integers/i128/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: cbc3426682d111bcc624772a9e331194e91afe090c7fad60b6a26f7bbfc80c52 - canonicalized_theorem: cbc3426682d111bcc624772a9e331194e91afe090c7fad60b6a26f7bbfc80c52 - type_inferenced_theorem: 6590ef64c4fea22ae40610713fd9ab9c8099db62dfa03dbb4b52544745add887 + initial_ast: cbc3426682d111bcc624772a9e331194e91afe090c7fad60b6a26f7bbfc80c52 + canonicalized_ast: cbc3426682d111bcc624772a9e331194e91afe090c7fad60b6a26f7bbfc80c52 + type_inferenced_ast: 6590ef64c4fea22ae40610713fd9ab9c8099db62dfa03dbb4b52544745add887 diff --git a/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out index b7ed5b0cc5..b147f39f98 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: ba1d5d680a9efb9ec10633ea657d4671b3e68bf496ae75a9f6a21c39572ab928 - canonicalized_theorem: ba1d5d680a9efb9ec10633ea657d4671b3e68bf496ae75a9f6a21c39572ab928 - type_inferenced_theorem: 24933918f7ad7589c86ee29dcb310034c6061ac0f30447cd90e1909812388494 + initial_ast: ba1d5d680a9efb9ec10633ea657d4671b3e68bf496ae75a9f6a21c39572ab928 + canonicalized_ast: ba1d5d680a9efb9ec10633ea657d4671b3e68bf496ae75a9f6a21c39572ab928 + type_inferenced_ast: 24933918f7ad7589c86ee29dcb310034c6061ac0f30447cd90e1909812388494 diff --git a/tests/expectations/compiler/compiler/integers/i16/add.leo.out b/tests/expectations/compiler/compiler/integers/i16/add.leo.out index c915ffb23b..9d7f2683fc 100644 --- a/tests/expectations/compiler/compiler/integers/i16/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: c6e60e90f02eedaf8209c76aaf12e2fe10ae13dc6061c36f5e49b72bf6b0a65a - canonicalized_theorem: c6e60e90f02eedaf8209c76aaf12e2fe10ae13dc6061c36f5e49b72bf6b0a65a - type_inferenced_theorem: cbd5e50cfc56419e9406f490d626035c8337a1bdaf35bc62a4600fcf76c391b9 + initial_ast: c6e60e90f02eedaf8209c76aaf12e2fe10ae13dc6061c36f5e49b72bf6b0a65a + canonicalized_ast: c6e60e90f02eedaf8209c76aaf12e2fe10ae13dc6061c36f5e49b72bf6b0a65a + type_inferenced_ast: cbd5e50cfc56419e9406f490d626035c8337a1bdaf35bc62a4600fcf76c391b9 diff --git a/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out index add36d8fe1..fe1d0245f0 100644 --- a/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: i16.in output: registers: {} - initial_theorem: dc4639a138bd4abe35fdb62f4276a1dd7d9fff035da9e307f3522ebcd0d85242 - canonicalized_theorem: 11c7e7171c6ae7c1cbb12c7e27dee4786d5689c83d4e60c1c1860f78372e9ae7 - type_inferenced_theorem: 8d5f15f30bfa9b61498011cd4c66e7980a6a30d43112fb54f80247764f5ccaca + initial_ast: dc4639a138bd4abe35fdb62f4276a1dd7d9fff035da9e307f3522ebcd0d85242 + canonicalized_ast: 11c7e7171c6ae7c1cbb12c7e27dee4786d5689c83d4e60c1c1860f78372e9ae7 + type_inferenced_ast: 8d5f15f30bfa9b61498011cd4c66e7980a6a30d43112fb54f80247764f5ccaca diff --git a/tests/expectations/compiler/compiler/integers/i16/div.leo.out b/tests/expectations/compiler/compiler/integers/i16/div.leo.out index 2b8b5adc93..e12a869a36 100644 --- a/tests/expectations/compiler/compiler/integers/i16/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 9ba56478095b7f7ed43019d532d9b21817ecb729458843de0ee84f64ccbeaad5 - canonicalized_theorem: 9ba56478095b7f7ed43019d532d9b21817ecb729458843de0ee84f64ccbeaad5 - type_inferenced_theorem: 0313c0eb6ab4ee2bf5c8a0b2e5936a6ee62e73897fb2da20f4278f0627f1c9db + initial_ast: 9ba56478095b7f7ed43019d532d9b21817ecb729458843de0ee84f64ccbeaad5 + canonicalized_ast: 9ba56478095b7f7ed43019d532d9b21817ecb729458843de0ee84f64ccbeaad5 + type_inferenced_ast: 0313c0eb6ab4ee2bf5c8a0b2e5936a6ee62e73897fb2da20f4278f0627f1c9db diff --git a/tests/expectations/compiler/compiler/integers/i16/eq.leo.out b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out index c84d3f446a..4b6b4482b6 100644 --- a/tests/expectations/compiler/compiler/integers/i16/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 5d901a32aea72e5e08d1150961941b53637e7586f617ee1b5975022e7efcc597 - canonicalized_theorem: 5d901a32aea72e5e08d1150961941b53637e7586f617ee1b5975022e7efcc597 - type_inferenced_theorem: b1044cf20a97768d2dc751289415634cc43c63642a0db05f08546c5ce4337615 + initial_ast: 5d901a32aea72e5e08d1150961941b53637e7586f617ee1b5975022e7efcc597 + canonicalized_ast: 5d901a32aea72e5e08d1150961941b53637e7586f617ee1b5975022e7efcc597 + type_inferenced_ast: b1044cf20a97768d2dc751289415634cc43c63642a0db05f08546c5ce4337615 diff --git a/tests/expectations/compiler/compiler/integers/i16/ge.leo.out b/tests/expectations/compiler/compiler/integers/i16/ge.leo.out index 087897d4fa..306ebd0fcf 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ge.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: acbe69247b7e93d134e08bb50b235fb0fdcedc5aaf0d064dd32d1955eb7530f1 - canonicalized_theorem: acbe69247b7e93d134e08bb50b235fb0fdcedc5aaf0d064dd32d1955eb7530f1 - type_inferenced_theorem: 8c762e804e44a6ec7aee1106bc0742266f34f7136a35878675ac239ffb4e2f9c + initial_ast: acbe69247b7e93d134e08bb50b235fb0fdcedc5aaf0d064dd32d1955eb7530f1 + canonicalized_ast: acbe69247b7e93d134e08bb50b235fb0fdcedc5aaf0d064dd32d1955eb7530f1 + type_inferenced_ast: 8c762e804e44a6ec7aee1106bc0742266f34f7136a35878675ac239ffb4e2f9c diff --git a/tests/expectations/compiler/compiler/integers/i16/gt.leo.out b/tests/expectations/compiler/compiler/integers/i16/gt.leo.out index 34204ea799..abaf5d0480 100644 --- a/tests/expectations/compiler/compiler/integers/i16/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/gt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 79c5123b8d5fdde1e774ce298e69fec5a6ac561d42f2cff1620ee90868a1a788 - canonicalized_theorem: 79c5123b8d5fdde1e774ce298e69fec5a6ac561d42f2cff1620ee90868a1a788 - type_inferenced_theorem: 2f5c103f24367e1b7d38073a41b039c94fd2d4138ed6ededd1f1a526ed741653 + initial_ast: 79c5123b8d5fdde1e774ce298e69fec5a6ac561d42f2cff1620ee90868a1a788 + canonicalized_ast: 79c5123b8d5fdde1e774ce298e69fec5a6ac561d42f2cff1620ee90868a1a788 + type_inferenced_ast: 2f5c103f24367e1b7d38073a41b039c94fd2d4138ed6ededd1f1a526ed741653 diff --git a/tests/expectations/compiler/compiler/integers/i16/le.leo.out b/tests/expectations/compiler/compiler/integers/i16/le.leo.out index 3c852c9810..a1d3093d45 100644 --- a/tests/expectations/compiler/compiler/integers/i16/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/le.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 0ec2096fbd8fdfa796b104aef9e28458e18a25951bb610f61f4ea4fbaae9757f - canonicalized_theorem: 0ec2096fbd8fdfa796b104aef9e28458e18a25951bb610f61f4ea4fbaae9757f - type_inferenced_theorem: 7ddd6341403c131f721540b6cb1a7e3daaff0ec9615f8c35e4c07f32591f9eaf + initial_ast: 0ec2096fbd8fdfa796b104aef9e28458e18a25951bb610f61f4ea4fbaae9757f + canonicalized_ast: 0ec2096fbd8fdfa796b104aef9e28458e18a25951bb610f61f4ea4fbaae9757f + type_inferenced_ast: 7ddd6341403c131f721540b6cb1a7e3daaff0ec9615f8c35e4c07f32591f9eaf diff --git a/tests/expectations/compiler/compiler/integers/i16/lt.leo.out b/tests/expectations/compiler/compiler/integers/i16/lt.leo.out index ff448ddd8f..ef870cb29a 100644 --- a/tests/expectations/compiler/compiler/integers/i16/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 4fd8570e10354fb6f8fe19d8d822ed3d8d9149f464c0bbdcc5967d903875234e - canonicalized_theorem: 4fd8570e10354fb6f8fe19d8d822ed3d8d9149f464c0bbdcc5967d903875234e - type_inferenced_theorem: 0cd72ea5eaf563bfc2a2ba82ad6e2e9d65df60730c8cf87aa9d09848448cbdca + initial_ast: 4fd8570e10354fb6f8fe19d8d822ed3d8d9149f464c0bbdcc5967d903875234e + canonicalized_ast: 4fd8570e10354fb6f8fe19d8d822ed3d8d9149f464c0bbdcc5967d903875234e + type_inferenced_ast: 0cd72ea5eaf563bfc2a2ba82ad6e2e9d65df60730c8cf87aa9d09848448cbdca diff --git a/tests/expectations/compiler/compiler/integers/i16/max.leo.out b/tests/expectations/compiler/compiler/integers/i16/max.leo.out index 421beaa304..5d469b4f44 100644 --- a/tests/expectations/compiler/compiler/integers/i16/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 8cc319fae5a195cc91c1b906a4945d60fe8f4a2649ecae5910523f20ab29a80e - canonicalized_theorem: 8cc319fae5a195cc91c1b906a4945d60fe8f4a2649ecae5910523f20ab29a80e - type_inferenced_theorem: 79c7c35ea8546567ff0faef52f0a90e945a3cd835859b96f5e25d457eac51212 + initial_ast: 8cc319fae5a195cc91c1b906a4945d60fe8f4a2649ecae5910523f20ab29a80e + canonicalized_ast: 8cc319fae5a195cc91c1b906a4945d60fe8f4a2649ecae5910523f20ab29a80e + type_inferenced_ast: 79c7c35ea8546567ff0faef52f0a90e945a3cd835859b96f5e25d457eac51212 diff --git a/tests/expectations/compiler/compiler/integers/i16/min.leo.out b/tests/expectations/compiler/compiler/integers/i16/min.leo.out index d73fb5f7af..2cf8d929d0 100644 --- a/tests/expectations/compiler/compiler/integers/i16/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 01194f1d3e40d631c4b4f2d57d7c6d9906a2dd53299f0246fe259d49a81aaf1e - canonicalized_theorem: 01194f1d3e40d631c4b4f2d57d7c6d9906a2dd53299f0246fe259d49a81aaf1e - type_inferenced_theorem: 384165664aac2ff844fb06836db88f9e92de2aff6bf9745a56c6924e1f5ed63a + initial_ast: 01194f1d3e40d631c4b4f2d57d7c6d9906a2dd53299f0246fe259d49a81aaf1e + canonicalized_ast: 01194f1d3e40d631c4b4f2d57d7c6d9906a2dd53299f0246fe259d49a81aaf1e + type_inferenced_ast: 384165664aac2ff844fb06836db88f9e92de2aff6bf9745a56c6924e1f5ed63a diff --git a/tests/expectations/compiler/compiler/integers/i16/mul.leo.out b/tests/expectations/compiler/compiler/integers/i16/mul.leo.out index c8b3de0e31..e69cf863fe 100644 --- a/tests/expectations/compiler/compiler/integers/i16/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: e4d59a5cf7736b6fe993c348eb71c77e19339f9f48c71288858ee57f8afea1a2 - canonicalized_theorem: e4d59a5cf7736b6fe993c348eb71c77e19339f9f48c71288858ee57f8afea1a2 - type_inferenced_theorem: fdbdf403033c6317a5767b06b27454c40055dfb3f58893021e6abd7325b0eba7 + initial_ast: e4d59a5cf7736b6fe993c348eb71c77e19339f9f48c71288858ee57f8afea1a2 + canonicalized_ast: e4d59a5cf7736b6fe993c348eb71c77e19339f9f48c71288858ee57f8afea1a2 + type_inferenced_ast: fdbdf403033c6317a5767b06b27454c40055dfb3f58893021e6abd7325b0eba7 diff --git a/tests/expectations/compiler/compiler/integers/i16/ne.leo.out b/tests/expectations/compiler/compiler/integers/i16/ne.leo.out index 2c8bdf8697..897c2deec0 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 8c6fea5199db90bc83b06a665def03d3d3f9dc21d0880e870afd5316e882d020 - canonicalized_theorem: 8c6fea5199db90bc83b06a665def03d3d3f9dc21d0880e870afd5316e882d020 - type_inferenced_theorem: 55b7d570fcaafdbd2f19c3bfae73c089e92ed89837f5d71bd8a72800870bc0fd + initial_ast: 8c6fea5199db90bc83b06a665def03d3d3f9dc21d0880e870afd5316e882d020 + canonicalized_ast: 8c6fea5199db90bc83b06a665def03d3d3f9dc21d0880e870afd5316e882d020 + type_inferenced_ast: 55b7d570fcaafdbd2f19c3bfae73c089e92ed89837f5d71bd8a72800870bc0fd diff --git a/tests/expectations/compiler/compiler/integers/i16/negate.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate.leo.out index e3934a5af2..2ec74aaf6c 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 3d30aa34b4b8c3dc2e1e63c4e82f829562c037e9ce1025e157e84fbc445e5b8d - canonicalized_theorem: 3d30aa34b4b8c3dc2e1e63c4e82f829562c037e9ce1025e157e84fbc445e5b8d - type_inferenced_theorem: 0f85cf3686a22da3196600a5f511095ad54a892716001eb3970ab128eed84908 + initial_ast: 3d30aa34b4b8c3dc2e1e63c4e82f829562c037e9ce1025e157e84fbc445e5b8d + canonicalized_ast: 3d30aa34b4b8c3dc2e1e63c4e82f829562c037e9ce1025e157e84fbc445e5b8d + type_inferenced_ast: 0f85cf3686a22da3196600a5f511095ad54a892716001eb3970ab128eed84908 diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out index 7cd5357c3c..35a490d861 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 2b5fdbe8e706501b0de7ac1f58e189ff4a712cd8a0fb19ee96a0a58f2d64ec47 - canonicalized_theorem: 2b5fdbe8e706501b0de7ac1f58e189ff4a712cd8a0fb19ee96a0a58f2d64ec47 - type_inferenced_theorem: cf0a37b8845d1545cd46b8b850eaad1aa2e227fd2d8268da7e8d4c087ba1745c + initial_ast: 2b5fdbe8e706501b0de7ac1f58e189ff4a712cd8a0fb19ee96a0a58f2d64ec47 + canonicalized_ast: 2b5fdbe8e706501b0de7ac1f58e189ff4a712cd8a0fb19ee96a0a58f2d64ec47 + type_inferenced_ast: cf0a37b8845d1545cd46b8b850eaad1aa2e227fd2d8268da7e8d4c087ba1745c diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out index d68956807c..779aec7d9a 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: a7bc8fb723de623e653ecada1109a7a6c658af1430c36a817062445ce546049b - canonicalized_theorem: a7bc8fb723de623e653ecada1109a7a6c658af1430c36a817062445ce546049b - type_inferenced_theorem: 87cbf23ee8ad59885301deda7c1d5aae8bc683ff6addc80454d43d477800a4d7 + initial_ast: a7bc8fb723de623e653ecada1109a7a6c658af1430c36a817062445ce546049b + canonicalized_ast: a7bc8fb723de623e653ecada1109a7a6c658af1430c36a817062445ce546049b + type_inferenced_ast: 87cbf23ee8ad59885301deda7c1d5aae8bc683ff6addc80454d43d477800a4d7 diff --git a/tests/expectations/compiler/compiler/integers/i16/sub.leo.out b/tests/expectations/compiler/compiler/integers/i16/sub.leo.out index 467dfd8d06..82752349cc 100644 --- a/tests/expectations/compiler/compiler/integers/i16/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 0ed8af4e184becf59423bef3f18a8282e14797fa65605cde3ec662b3495c17b6 - canonicalized_theorem: 0ed8af4e184becf59423bef3f18a8282e14797fa65605cde3ec662b3495c17b6 - type_inferenced_theorem: 692c5aa63291373cd59ace973c18581c08e1713a80a07d4e49a94384e00f5b4d + initial_ast: 0ed8af4e184becf59423bef3f18a8282e14797fa65605cde3ec662b3495c17b6 + canonicalized_ast: 0ed8af4e184becf59423bef3f18a8282e14797fa65605cde3ec662b3495c17b6 + type_inferenced_ast: 692c5aa63291373cd59ace973c18581c08e1713a80a07d4e49a94384e00f5b4d diff --git a/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out index 3dd6d0cf0f..742b78acff 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 9bcb3368b7c5c54401805a92c0a38a5e2790ce1404928ce53c5f11fc91facda6 - canonicalized_theorem: 9bcb3368b7c5c54401805a92c0a38a5e2790ce1404928ce53c5f11fc91facda6 - type_inferenced_theorem: 24a9f154beda36f615d7b8eb20d82d2302f5a98e530ec5d6f7178248c54fc485 + initial_ast: 9bcb3368b7c5c54401805a92c0a38a5e2790ce1404928ce53c5f11fc91facda6 + canonicalized_ast: 9bcb3368b7c5c54401805a92c0a38a5e2790ce1404928ce53c5f11fc91facda6 + type_inferenced_ast: 24a9f154beda36f615d7b8eb20d82d2302f5a98e530ec5d6f7178248c54fc485 diff --git a/tests/expectations/compiler/compiler/integers/i32/add.leo.out b/tests/expectations/compiler/compiler/integers/i32/add.leo.out index d001ebc54c..54ba1d7251 100644 --- a/tests/expectations/compiler/compiler/integers/i32/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: f42260573fe4d4c93a3ef5d4ce6178361696d80a6d59c29bbc45c2f91372524d - canonicalized_theorem: f42260573fe4d4c93a3ef5d4ce6178361696d80a6d59c29bbc45c2f91372524d - type_inferenced_theorem: 53a55ce50552159c54febcc31f2f02f3b2b60264dfc53fece8b6cb12c80774f6 + initial_ast: f42260573fe4d4c93a3ef5d4ce6178361696d80a6d59c29bbc45c2f91372524d + canonicalized_ast: f42260573fe4d4c93a3ef5d4ce6178361696d80a6d59c29bbc45c2f91372524d + type_inferenced_ast: 53a55ce50552159c54febcc31f2f02f3b2b60264dfc53fece8b6cb12c80774f6 diff --git a/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out index 020a3eda38..800a1bd630 100644 --- a/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: i32.in output: registers: {} - initial_theorem: 0827f6332d1efc21bf2d0875dbe60a00ca0af5b8fac88831402c1289d5cb561a - canonicalized_theorem: 2744510f89a25b5b0cac8cdd335cfaad65f6df030b01b3bbf543d1766c7392b4 - type_inferenced_theorem: 03dfb3c4eabf1f32ffc24ef5cd2f682346a9b9aa03a081dae718954070ac4460 + initial_ast: 0827f6332d1efc21bf2d0875dbe60a00ca0af5b8fac88831402c1289d5cb561a + canonicalized_ast: 2744510f89a25b5b0cac8cdd335cfaad65f6df030b01b3bbf543d1766c7392b4 + type_inferenced_ast: 03dfb3c4eabf1f32ffc24ef5cd2f682346a9b9aa03a081dae718954070ac4460 diff --git a/tests/expectations/compiler/compiler/integers/i32/div.leo.out b/tests/expectations/compiler/compiler/integers/i32/div.leo.out index dd7fc4119d..9f0716e8f6 100644 --- a/tests/expectations/compiler/compiler/integers/i32/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: a86f5aafe6577bb0be490afcc9e0837c068aab15ad2d130d47c1eda9dd754515 - canonicalized_theorem: a86f5aafe6577bb0be490afcc9e0837c068aab15ad2d130d47c1eda9dd754515 - type_inferenced_theorem: f25c7ba9ed10a4ad8e102f0af326a396b94169721251986531ba68313af8a40a + initial_ast: a86f5aafe6577bb0be490afcc9e0837c068aab15ad2d130d47c1eda9dd754515 + canonicalized_ast: a86f5aafe6577bb0be490afcc9e0837c068aab15ad2d130d47c1eda9dd754515 + type_inferenced_ast: f25c7ba9ed10a4ad8e102f0af326a396b94169721251986531ba68313af8a40a diff --git a/tests/expectations/compiler/compiler/integers/i32/eq.leo.out b/tests/expectations/compiler/compiler/integers/i32/eq.leo.out index 41eb64f4b7..9736cf0fa7 100644 --- a/tests/expectations/compiler/compiler/integers/i32/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 3ad98a090977f2aea01478afbf703c1f657e4db04668129faa515e4111de74cf - canonicalized_theorem: 3ad98a090977f2aea01478afbf703c1f657e4db04668129faa515e4111de74cf - type_inferenced_theorem: 4587277f48dfa604f067c16208b2abbedfa2b349205641db8bf7e386a1a6f4a5 + initial_ast: 3ad98a090977f2aea01478afbf703c1f657e4db04668129faa515e4111de74cf + canonicalized_ast: 3ad98a090977f2aea01478afbf703c1f657e4db04668129faa515e4111de74cf + type_inferenced_ast: 4587277f48dfa604f067c16208b2abbedfa2b349205641db8bf7e386a1a6f4a5 diff --git a/tests/expectations/compiler/compiler/integers/i32/ge.leo.out b/tests/expectations/compiler/compiler/integers/i32/ge.leo.out index 842520415b..df84e1b17f 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ge.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: cf1aa79b2597a82e8347b093417a2281829e3c07fd74973b42bf7cc2018c7cb1 - canonicalized_theorem: cf1aa79b2597a82e8347b093417a2281829e3c07fd74973b42bf7cc2018c7cb1 - type_inferenced_theorem: 0810a1676362bcd258b306296590dc9ffa325dd3150b7e241a0c755979fa0b48 + initial_ast: cf1aa79b2597a82e8347b093417a2281829e3c07fd74973b42bf7cc2018c7cb1 + canonicalized_ast: cf1aa79b2597a82e8347b093417a2281829e3c07fd74973b42bf7cc2018c7cb1 + type_inferenced_ast: 0810a1676362bcd258b306296590dc9ffa325dd3150b7e241a0c755979fa0b48 diff --git a/tests/expectations/compiler/compiler/integers/i32/gt.leo.out b/tests/expectations/compiler/compiler/integers/i32/gt.leo.out index bf74246ad1..da1462579f 100644 --- a/tests/expectations/compiler/compiler/integers/i32/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/gt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: aa75c9b492684e06ea45996ac25a23ee47617312b986e9ce6756ff76f22be3b0 - canonicalized_theorem: aa75c9b492684e06ea45996ac25a23ee47617312b986e9ce6756ff76f22be3b0 - type_inferenced_theorem: b84a67583559c2d8794b0c4bee5038864b54649134deb088a4a72309b664e0a5 + initial_ast: aa75c9b492684e06ea45996ac25a23ee47617312b986e9ce6756ff76f22be3b0 + canonicalized_ast: aa75c9b492684e06ea45996ac25a23ee47617312b986e9ce6756ff76f22be3b0 + type_inferenced_ast: b84a67583559c2d8794b0c4bee5038864b54649134deb088a4a72309b664e0a5 diff --git a/tests/expectations/compiler/compiler/integers/i32/le.leo.out b/tests/expectations/compiler/compiler/integers/i32/le.leo.out index b19b5a7e34..3f06095739 100644 --- a/tests/expectations/compiler/compiler/integers/i32/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/le.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 496c0f9332973aeac3f7f10a663d7449dfb5ee3bb800dde47eda82f1e61beea3 - canonicalized_theorem: 496c0f9332973aeac3f7f10a663d7449dfb5ee3bb800dde47eda82f1e61beea3 - type_inferenced_theorem: 9e9611c48ffd078fdb36febf75b0294f2adad7e43e044f0fa80791a2a49f1b35 + initial_ast: 496c0f9332973aeac3f7f10a663d7449dfb5ee3bb800dde47eda82f1e61beea3 + canonicalized_ast: 496c0f9332973aeac3f7f10a663d7449dfb5ee3bb800dde47eda82f1e61beea3 + type_inferenced_ast: 9e9611c48ffd078fdb36febf75b0294f2adad7e43e044f0fa80791a2a49f1b35 diff --git a/tests/expectations/compiler/compiler/integers/i32/lt.leo.out b/tests/expectations/compiler/compiler/integers/i32/lt.leo.out index 6ca0a7ffec..7621bd18aa 100644 --- a/tests/expectations/compiler/compiler/integers/i32/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: aba1dbe634cb3a7ff87cfff3af689a49807d98b7068c6a8500f305d8cdc7d9a5 - canonicalized_theorem: aba1dbe634cb3a7ff87cfff3af689a49807d98b7068c6a8500f305d8cdc7d9a5 - type_inferenced_theorem: c0d77512c6581e6998277754ce5abf3acf4864a5f6d7440de3525e207b67e401 + initial_ast: aba1dbe634cb3a7ff87cfff3af689a49807d98b7068c6a8500f305d8cdc7d9a5 + canonicalized_ast: aba1dbe634cb3a7ff87cfff3af689a49807d98b7068c6a8500f305d8cdc7d9a5 + type_inferenced_ast: c0d77512c6581e6998277754ce5abf3acf4864a5f6d7440de3525e207b67e401 diff --git a/tests/expectations/compiler/compiler/integers/i32/max.leo.out b/tests/expectations/compiler/compiler/integers/i32/max.leo.out index af7739094d..5bb9d85e93 100644 --- a/tests/expectations/compiler/compiler/integers/i32/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: bc6011a5b62f3a74a2279d10e8cc2a80309b7a72717fc6a3f21f3ef3dcdfd561 - canonicalized_theorem: bc6011a5b62f3a74a2279d10e8cc2a80309b7a72717fc6a3f21f3ef3dcdfd561 - type_inferenced_theorem: 000c069c25da11a48ed3d7e4a0a806a7cc482e62830e52bdc36f21843c855b8b + initial_ast: bc6011a5b62f3a74a2279d10e8cc2a80309b7a72717fc6a3f21f3ef3dcdfd561 + canonicalized_ast: bc6011a5b62f3a74a2279d10e8cc2a80309b7a72717fc6a3f21f3ef3dcdfd561 + type_inferenced_ast: 000c069c25da11a48ed3d7e4a0a806a7cc482e62830e52bdc36f21843c855b8b diff --git a/tests/expectations/compiler/compiler/integers/i32/min.leo.out b/tests/expectations/compiler/compiler/integers/i32/min.leo.out index 5d2a7cfc1a..5418513b1f 100644 --- a/tests/expectations/compiler/compiler/integers/i32/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: fca7ee4eba546b4b481f1686b3db4c82c863b7aa122c3d38ff435672271dd609 - canonicalized_theorem: fca7ee4eba546b4b481f1686b3db4c82c863b7aa122c3d38ff435672271dd609 - type_inferenced_theorem: dab4b2cd49c1a69873fa82bb37f61013cdaf8d04e65023cd670514ca93ff9081 + initial_ast: fca7ee4eba546b4b481f1686b3db4c82c863b7aa122c3d38ff435672271dd609 + canonicalized_ast: fca7ee4eba546b4b481f1686b3db4c82c863b7aa122c3d38ff435672271dd609 + type_inferenced_ast: dab4b2cd49c1a69873fa82bb37f61013cdaf8d04e65023cd670514ca93ff9081 diff --git a/tests/expectations/compiler/compiler/integers/i32/mul.leo.out b/tests/expectations/compiler/compiler/integers/i32/mul.leo.out index edd1c67c6d..9ae88132ce 100644 --- a/tests/expectations/compiler/compiler/integers/i32/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 2db6f04149f1e4f57186156a57f6a03acba8c67d1fba6a1b1014e1f1b7a13aa8 - canonicalized_theorem: 2db6f04149f1e4f57186156a57f6a03acba8c67d1fba6a1b1014e1f1b7a13aa8 - type_inferenced_theorem: 3813b4f84021ed964cb335c399de9d5baacb695f0c881d6c15fdb557c3cb0ba4 + initial_ast: 2db6f04149f1e4f57186156a57f6a03acba8c67d1fba6a1b1014e1f1b7a13aa8 + canonicalized_ast: 2db6f04149f1e4f57186156a57f6a03acba8c67d1fba6a1b1014e1f1b7a13aa8 + type_inferenced_ast: 3813b4f84021ed964cb335c399de9d5baacb695f0c881d6c15fdb557c3cb0ba4 diff --git a/tests/expectations/compiler/compiler/integers/i32/ne.leo.out b/tests/expectations/compiler/compiler/integers/i32/ne.leo.out index 708a542533..91e0f511bb 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 04055130f6fd1b07e2ac9d07a669d27d0152b5bf5b3ef2553bdffa819e555e9e - canonicalized_theorem: 04055130f6fd1b07e2ac9d07a669d27d0152b5bf5b3ef2553bdffa819e555e9e - type_inferenced_theorem: a6d7c40fc41874564a3d562e7c912fdda4a28803cb244d925a26110142cc3c36 + initial_ast: 04055130f6fd1b07e2ac9d07a669d27d0152b5bf5b3ef2553bdffa819e555e9e + canonicalized_ast: 04055130f6fd1b07e2ac9d07a669d27d0152b5bf5b3ef2553bdffa819e555e9e + type_inferenced_ast: a6d7c40fc41874564a3d562e7c912fdda4a28803cb244d925a26110142cc3c36 diff --git a/tests/expectations/compiler/compiler/integers/i32/negate.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate.leo.out index e0aef14e3d..ff6e862e5b 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 2ae478eb637f8e59b53f6750c726e728aa6bcdc702a9434f290a15ce091c2fd8 - canonicalized_theorem: 2ae478eb637f8e59b53f6750c726e728aa6bcdc702a9434f290a15ce091c2fd8 - type_inferenced_theorem: 0fe0731c61c040d0221066408c5bb64204db82b9521fb8bc6ebd0e9d7fb8e46c + initial_ast: 2ae478eb637f8e59b53f6750c726e728aa6bcdc702a9434f290a15ce091c2fd8 + canonicalized_ast: 2ae478eb637f8e59b53f6750c726e728aa6bcdc702a9434f290a15ce091c2fd8 + type_inferenced_ast: 0fe0731c61c040d0221066408c5bb64204db82b9521fb8bc6ebd0e9d7fb8e46c diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out index 8383b39234..bfb0711ac8 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 21c23d4b0a17a10c30503e42bc1bf9e0316f7f901b967f3373d66913641727ef - canonicalized_theorem: 21c23d4b0a17a10c30503e42bc1bf9e0316f7f901b967f3373d66913641727ef - type_inferenced_theorem: 0d28e064d20397ee01c71459fc7830663bd7dd571d311e5fa2d2c141069052a3 + initial_ast: 21c23d4b0a17a10c30503e42bc1bf9e0316f7f901b967f3373d66913641727ef + canonicalized_ast: 21c23d4b0a17a10c30503e42bc1bf9e0316f7f901b967f3373d66913641727ef + type_inferenced_ast: 0d28e064d20397ee01c71459fc7830663bd7dd571d311e5fa2d2c141069052a3 diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out index fd0fc1b4dc..9e16052d8c 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: f1101ce333dfdb4c59192eeec160deb86e46be82cf0add2014740c389f9353e4 - canonicalized_theorem: f1101ce333dfdb4c59192eeec160deb86e46be82cf0add2014740c389f9353e4 - type_inferenced_theorem: 2951a32c512d7d681b20c5f6b750aec9dade991b777fc9789278461b4a9bb954 + initial_ast: f1101ce333dfdb4c59192eeec160deb86e46be82cf0add2014740c389f9353e4 + canonicalized_ast: f1101ce333dfdb4c59192eeec160deb86e46be82cf0add2014740c389f9353e4 + type_inferenced_ast: 2951a32c512d7d681b20c5f6b750aec9dade991b777fc9789278461b4a9bb954 diff --git a/tests/expectations/compiler/compiler/integers/i32/sub.leo.out b/tests/expectations/compiler/compiler/integers/i32/sub.leo.out index 8607c2d4e3..87b0c99def 100644 --- a/tests/expectations/compiler/compiler/integers/i32/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: ccb65cb15b43a9dc74925cca1128198439de34c4208a8ca6674cc11d775f4a6c - canonicalized_theorem: ccb65cb15b43a9dc74925cca1128198439de34c4208a8ca6674cc11d775f4a6c - type_inferenced_theorem: 53f17f158869f377d8feb3d63b4f8885d0a1e826d0e4d4faaa770a47fb2bea4d + initial_ast: ccb65cb15b43a9dc74925cca1128198439de34c4208a8ca6674cc11d775f4a6c + canonicalized_ast: ccb65cb15b43a9dc74925cca1128198439de34c4208a8ca6674cc11d775f4a6c + type_inferenced_ast: 53f17f158869f377d8feb3d63b4f8885d0a1e826d0e4d4faaa770a47fb2bea4d diff --git a/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out index 4dc8624611..2adbd0b653 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: d9f544c8d3c1f2b5f75e43aaa6ad136262668bb8f52961b0890d6e417f1b7cd4 - canonicalized_theorem: d9f544c8d3c1f2b5f75e43aaa6ad136262668bb8f52961b0890d6e417f1b7cd4 - type_inferenced_theorem: 7f557bec0085efc8317c8061c4bb8b1d31d898e5d0d75e07b0ebc3bb958de770 + initial_ast: d9f544c8d3c1f2b5f75e43aaa6ad136262668bb8f52961b0890d6e417f1b7cd4 + canonicalized_ast: d9f544c8d3c1f2b5f75e43aaa6ad136262668bb8f52961b0890d6e417f1b7cd4 + type_inferenced_ast: 7f557bec0085efc8317c8061c4bb8b1d31d898e5d0d75e07b0ebc3bb958de770 diff --git a/tests/expectations/compiler/compiler/integers/i64/add.leo.out b/tests/expectations/compiler/compiler/integers/i64/add.leo.out index e4a168bbdf..4289fbc21e 100644 --- a/tests/expectations/compiler/compiler/integers/i64/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 95021c02880a3b85d58be6a8f0ddba2732ba35322af9c767c232a47c9a9e66a8 - canonicalized_theorem: 95021c02880a3b85d58be6a8f0ddba2732ba35322af9c767c232a47c9a9e66a8 - type_inferenced_theorem: f6befcf4a7ebde46dd5434464cb0ead1900294e5704000350667d1763d614c72 + initial_ast: 95021c02880a3b85d58be6a8f0ddba2732ba35322af9c767c232a47c9a9e66a8 + canonicalized_ast: 95021c02880a3b85d58be6a8f0ddba2732ba35322af9c767c232a47c9a9e66a8 + type_inferenced_ast: f6befcf4a7ebde46dd5434464cb0ead1900294e5704000350667d1763d614c72 diff --git a/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out index a9decb1830..60bdae93b5 100644 --- a/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: i64.in output: registers: {} - initial_theorem: e602573b4419a65c310de826337dc34bfc1dc2e215546d27c84be8f958f2fbe7 - canonicalized_theorem: 66e33af7b62390b864dc4d488ecffaa3fbc1673788394ea87a94e650b6a4fcd2 - type_inferenced_theorem: 1d22b0a31160d820841f5c8b5b85a683e878d35c237f45d0e5cf0f98151a7577 + initial_ast: e602573b4419a65c310de826337dc34bfc1dc2e215546d27c84be8f958f2fbe7 + canonicalized_ast: 66e33af7b62390b864dc4d488ecffaa3fbc1673788394ea87a94e650b6a4fcd2 + type_inferenced_ast: 1d22b0a31160d820841f5c8b5b85a683e878d35c237f45d0e5cf0f98151a7577 diff --git a/tests/expectations/compiler/compiler/integers/i64/div.leo.out b/tests/expectations/compiler/compiler/integers/i64/div.leo.out index e9c7d231ec..d7fe287e91 100644 --- a/tests/expectations/compiler/compiler/integers/i64/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 9cbb95349371703905da55fff0b264d4ef85d754ac942d4e3f6e8079bb903c28 - canonicalized_theorem: 9cbb95349371703905da55fff0b264d4ef85d754ac942d4e3f6e8079bb903c28 - type_inferenced_theorem: 00e413b039c152dff6d27afb5c8ac135debc9774f9cb4bb3c58c56de3368552b + initial_ast: 9cbb95349371703905da55fff0b264d4ef85d754ac942d4e3f6e8079bb903c28 + canonicalized_ast: 9cbb95349371703905da55fff0b264d4ef85d754ac942d4e3f6e8079bb903c28 + type_inferenced_ast: 00e413b039c152dff6d27afb5c8ac135debc9774f9cb4bb3c58c56de3368552b diff --git a/tests/expectations/compiler/compiler/integers/i64/eq.leo.out b/tests/expectations/compiler/compiler/integers/i64/eq.leo.out index efbce65c1a..95ceb0cb7e 100644 --- a/tests/expectations/compiler/compiler/integers/i64/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 9d56aeda85fd6ffb426a28be08896b044758b35faf9dde99e2f26df642e0c765 - canonicalized_theorem: 9d56aeda85fd6ffb426a28be08896b044758b35faf9dde99e2f26df642e0c765 - type_inferenced_theorem: 0f6b7a99b49ac61d636b1dc0ba226e545ed51f55eddc962a5cf83c06705f00f7 + initial_ast: 9d56aeda85fd6ffb426a28be08896b044758b35faf9dde99e2f26df642e0c765 + canonicalized_ast: 9d56aeda85fd6ffb426a28be08896b044758b35faf9dde99e2f26df642e0c765 + type_inferenced_ast: 0f6b7a99b49ac61d636b1dc0ba226e545ed51f55eddc962a5cf83c06705f00f7 diff --git a/tests/expectations/compiler/compiler/integers/i64/ge.leo.out b/tests/expectations/compiler/compiler/integers/i64/ge.leo.out index 99e37d4824..afc6bc7604 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ge.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 2bcccde7177cfd914485ebdaee98cdedccad44284d9bdcea03f17d6d20c57270 - canonicalized_theorem: 2bcccde7177cfd914485ebdaee98cdedccad44284d9bdcea03f17d6d20c57270 - type_inferenced_theorem: a6d083260a3b5596c2dc24424f95a5ccaf6e46998e3cea8d998416888e0b95b6 + initial_ast: 2bcccde7177cfd914485ebdaee98cdedccad44284d9bdcea03f17d6d20c57270 + canonicalized_ast: 2bcccde7177cfd914485ebdaee98cdedccad44284d9bdcea03f17d6d20c57270 + type_inferenced_ast: a6d083260a3b5596c2dc24424f95a5ccaf6e46998e3cea8d998416888e0b95b6 diff --git a/tests/expectations/compiler/compiler/integers/i64/gt.leo.out b/tests/expectations/compiler/compiler/integers/i64/gt.leo.out index c06e4f104c..c05baefc04 100644 --- a/tests/expectations/compiler/compiler/integers/i64/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/gt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 55fd60c9cf7fef6cafa09678da081f9eedf33af39a7d04ec6ba9da4bbf4d3dd7 - canonicalized_theorem: 55fd60c9cf7fef6cafa09678da081f9eedf33af39a7d04ec6ba9da4bbf4d3dd7 - type_inferenced_theorem: 816b7aa988cbfc5fa868facbce6533c4a721ff7e8a6123c83329a1effd65f1c3 + initial_ast: 55fd60c9cf7fef6cafa09678da081f9eedf33af39a7d04ec6ba9da4bbf4d3dd7 + canonicalized_ast: 55fd60c9cf7fef6cafa09678da081f9eedf33af39a7d04ec6ba9da4bbf4d3dd7 + type_inferenced_ast: 816b7aa988cbfc5fa868facbce6533c4a721ff7e8a6123c83329a1effd65f1c3 diff --git a/tests/expectations/compiler/compiler/integers/i64/le.leo.out b/tests/expectations/compiler/compiler/integers/i64/le.leo.out index a499d485e1..c271ce463d 100644 --- a/tests/expectations/compiler/compiler/integers/i64/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/le.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 109dd9e920a3e1bd6cddad99ead2f7061810a22e1f5d0dc624c23a4f73058788 - canonicalized_theorem: 109dd9e920a3e1bd6cddad99ead2f7061810a22e1f5d0dc624c23a4f73058788 - type_inferenced_theorem: 242bb938c88a667b0591a25633163be323767851bbbc2867340742d5314d9a1e + initial_ast: 109dd9e920a3e1bd6cddad99ead2f7061810a22e1f5d0dc624c23a4f73058788 + canonicalized_ast: 109dd9e920a3e1bd6cddad99ead2f7061810a22e1f5d0dc624c23a4f73058788 + type_inferenced_ast: 242bb938c88a667b0591a25633163be323767851bbbc2867340742d5314d9a1e diff --git a/tests/expectations/compiler/compiler/integers/i64/lt.leo.out b/tests/expectations/compiler/compiler/integers/i64/lt.leo.out index 08c4390ccd..79ec4271b8 100644 --- a/tests/expectations/compiler/compiler/integers/i64/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 027c84f3937e34053a8f35500c77fb58f751b974b73d1fa569aa935be1b25968 - canonicalized_theorem: 027c84f3937e34053a8f35500c77fb58f751b974b73d1fa569aa935be1b25968 - type_inferenced_theorem: 38992b9114c318fe9740fa924107c6aa52b8ca956815a4aaaf6d47e151414434 + initial_ast: 027c84f3937e34053a8f35500c77fb58f751b974b73d1fa569aa935be1b25968 + canonicalized_ast: 027c84f3937e34053a8f35500c77fb58f751b974b73d1fa569aa935be1b25968 + type_inferenced_ast: 38992b9114c318fe9740fa924107c6aa52b8ca956815a4aaaf6d47e151414434 diff --git a/tests/expectations/compiler/compiler/integers/i64/max.leo.out b/tests/expectations/compiler/compiler/integers/i64/max.leo.out index 1c297fa7fa..d29514b8f6 100644 --- a/tests/expectations/compiler/compiler/integers/i64/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 698a82d44fbb01e2c3c65df9190bac740af75cd5425cdff9e4bbf34b1eb928c7 - canonicalized_theorem: 698a82d44fbb01e2c3c65df9190bac740af75cd5425cdff9e4bbf34b1eb928c7 - type_inferenced_theorem: af2a509e627e3ee3ab2f4d3a47c4c97162c510a27e4aa30bbe0ff2461f9942af + initial_ast: 698a82d44fbb01e2c3c65df9190bac740af75cd5425cdff9e4bbf34b1eb928c7 + canonicalized_ast: 698a82d44fbb01e2c3c65df9190bac740af75cd5425cdff9e4bbf34b1eb928c7 + type_inferenced_ast: af2a509e627e3ee3ab2f4d3a47c4c97162c510a27e4aa30bbe0ff2461f9942af diff --git a/tests/expectations/compiler/compiler/integers/i64/min.leo.out b/tests/expectations/compiler/compiler/integers/i64/min.leo.out index 50f10d55af..bf3f3fcc4c 100644 --- a/tests/expectations/compiler/compiler/integers/i64/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 662b9ccc5756661ad9a5433665c235452e5602af433d5174a9a7d35575d58e50 - canonicalized_theorem: 662b9ccc5756661ad9a5433665c235452e5602af433d5174a9a7d35575d58e50 - type_inferenced_theorem: 1cca602cda64194082da2aeda13e806abfd1dec6f2f6e33b8f59e684a7f8a9f6 + initial_ast: 662b9ccc5756661ad9a5433665c235452e5602af433d5174a9a7d35575d58e50 + canonicalized_ast: 662b9ccc5756661ad9a5433665c235452e5602af433d5174a9a7d35575d58e50 + type_inferenced_ast: 1cca602cda64194082da2aeda13e806abfd1dec6f2f6e33b8f59e684a7f8a9f6 diff --git a/tests/expectations/compiler/compiler/integers/i64/mul.leo.out b/tests/expectations/compiler/compiler/integers/i64/mul.leo.out index cddbdacfd6..15a2dcf5e2 100644 --- a/tests/expectations/compiler/compiler/integers/i64/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 56e7098f4df6632cd2182397b87055079912107712b141e5752c733fd205ea5d - canonicalized_theorem: 56e7098f4df6632cd2182397b87055079912107712b141e5752c733fd205ea5d - type_inferenced_theorem: 46df0d390bd68d1309e24be5d7a442884a6d7b1f001649d0ebc529c31d4850b6 + initial_ast: 56e7098f4df6632cd2182397b87055079912107712b141e5752c733fd205ea5d + canonicalized_ast: 56e7098f4df6632cd2182397b87055079912107712b141e5752c733fd205ea5d + type_inferenced_ast: 46df0d390bd68d1309e24be5d7a442884a6d7b1f001649d0ebc529c31d4850b6 diff --git a/tests/expectations/compiler/compiler/integers/i64/ne.leo.out b/tests/expectations/compiler/compiler/integers/i64/ne.leo.out index 1de0eacc10..ee69ef8348 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: f973603815c81c6de14edfbfe5bcbb5adab0be5f45dd6b517dccaa7ace0b6396 - canonicalized_theorem: f973603815c81c6de14edfbfe5bcbb5adab0be5f45dd6b517dccaa7ace0b6396 - type_inferenced_theorem: ebff9ab7ae18bf3c44aeb65e54e4d47e084c9f82eeb82ae99c5093f0e5150843 + initial_ast: f973603815c81c6de14edfbfe5bcbb5adab0be5f45dd6b517dccaa7ace0b6396 + canonicalized_ast: f973603815c81c6de14edfbfe5bcbb5adab0be5f45dd6b517dccaa7ace0b6396 + type_inferenced_ast: ebff9ab7ae18bf3c44aeb65e54e4d47e084c9f82eeb82ae99c5093f0e5150843 diff --git a/tests/expectations/compiler/compiler/integers/i64/negate.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate.leo.out index 266ef579d2..7be1dbf0cb 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 928bb21b0da55474b51aa036c31fabe00ba68f3ff051159871a99493503edcb8 - canonicalized_theorem: 928bb21b0da55474b51aa036c31fabe00ba68f3ff051159871a99493503edcb8 - type_inferenced_theorem: 5e9aea6325f193622ecd68c7c7c7c05864d05b37b0b122432119243939153f49 + initial_ast: 928bb21b0da55474b51aa036c31fabe00ba68f3ff051159871a99493503edcb8 + canonicalized_ast: 928bb21b0da55474b51aa036c31fabe00ba68f3ff051159871a99493503edcb8 + type_inferenced_ast: 5e9aea6325f193622ecd68c7c7c7c05864d05b37b0b122432119243939153f49 diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out index e8e1b07976..c40cedf8f8 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: dcc877091aff3aff01bbb075ab6b7f64c26a743bac10f51010cc45157711a65a - canonicalized_theorem: dcc877091aff3aff01bbb075ab6b7f64c26a743bac10f51010cc45157711a65a - type_inferenced_theorem: d86e07433c967775af7fccc46195317dd8abc41b52852918084aa4eabe63466f + initial_ast: dcc877091aff3aff01bbb075ab6b7f64c26a743bac10f51010cc45157711a65a + canonicalized_ast: dcc877091aff3aff01bbb075ab6b7f64c26a743bac10f51010cc45157711a65a + type_inferenced_ast: d86e07433c967775af7fccc46195317dd8abc41b52852918084aa4eabe63466f diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out index c0fb72069d..6cbcc54055 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 8ff367f167d482baba64ec752418d09d68a8ef7790a5b877a888b4e3b42ae5ab - canonicalized_theorem: 8ff367f167d482baba64ec752418d09d68a8ef7790a5b877a888b4e3b42ae5ab - type_inferenced_theorem: 868614ead4954c1561beb808880c2d2a4da60658753773febe82e7031d512c3c + initial_ast: 8ff367f167d482baba64ec752418d09d68a8ef7790a5b877a888b4e3b42ae5ab + canonicalized_ast: 8ff367f167d482baba64ec752418d09d68a8ef7790a5b877a888b4e3b42ae5ab + type_inferenced_ast: 868614ead4954c1561beb808880c2d2a4da60658753773febe82e7031d512c3c diff --git a/tests/expectations/compiler/compiler/integers/i64/sub.leo.out b/tests/expectations/compiler/compiler/integers/i64/sub.leo.out index 069d2f3c10..154c393b2e 100644 --- a/tests/expectations/compiler/compiler/integers/i64/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 5912057d08a97f306a50eee0b5fc41b703ac08625a2a52948f2efe1fd88e9e22 - canonicalized_theorem: 5912057d08a97f306a50eee0b5fc41b703ac08625a2a52948f2efe1fd88e9e22 - type_inferenced_theorem: a8402fdcd9a7806c0abb5a5f251d843cbdaa78a9c8b3a4732caff52e91ebb405 + initial_ast: 5912057d08a97f306a50eee0b5fc41b703ac08625a2a52948f2efe1fd88e9e22 + canonicalized_ast: 5912057d08a97f306a50eee0b5fc41b703ac08625a2a52948f2efe1fd88e9e22 + type_inferenced_ast: a8402fdcd9a7806c0abb5a5f251d843cbdaa78a9c8b3a4732caff52e91ebb405 diff --git a/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out index a4825dc6d3..9161f1403d 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 855c17c617a81e8c5b10eba1f7eecd695209bf976a80eea338263afa18916800 - canonicalized_theorem: 855c17c617a81e8c5b10eba1f7eecd695209bf976a80eea338263afa18916800 - type_inferenced_theorem: 4fa3ab3a8fc73e4d758fa6cfbe3417a71135b5073328d1227bcd8695d61880a3 + initial_ast: 855c17c617a81e8c5b10eba1f7eecd695209bf976a80eea338263afa18916800 + canonicalized_ast: 855c17c617a81e8c5b10eba1f7eecd695209bf976a80eea338263afa18916800 + type_inferenced_ast: 4fa3ab3a8fc73e4d758fa6cfbe3417a71135b5073328d1227bcd8695d61880a3 diff --git a/tests/expectations/compiler/compiler/integers/i8/add.leo.out b/tests/expectations/compiler/compiler/integers/i8/add.leo.out index 02f779336c..54f2b7ab59 100644 --- a/tests/expectations/compiler/compiler/integers/i8/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 24eace7d2b0f99fb7a1a0d1d5089047c0805945d98d55e27fe2794cf68b46a9a - canonicalized_theorem: 24eace7d2b0f99fb7a1a0d1d5089047c0805945d98d55e27fe2794cf68b46a9a - type_inferenced_theorem: f3aa44fe027d17b02b2751d91483ed27a14039fdf523952236b89c345d2359fa + initial_ast: 24eace7d2b0f99fb7a1a0d1d5089047c0805945d98d55e27fe2794cf68b46a9a + canonicalized_ast: 24eace7d2b0f99fb7a1a0d1d5089047c0805945d98d55e27fe2794cf68b46a9a + type_inferenced_ast: f3aa44fe027d17b02b2751d91483ed27a14039fdf523952236b89c345d2359fa diff --git a/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out index 5fd74a0b80..ce2b929fbd 100644 --- a/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: i8.in output: registers: {} - initial_theorem: a579aa5a1bc5185d4dc4e8d463edc176d1fbf8d2761f64f276c2bc89ea57a8e7 - canonicalized_theorem: 852adf503c72cc27c6555b37f6742c195f9c5b9dc837734954caec31b519a85d - type_inferenced_theorem: 9a3ebea7ab65abf6dc23811657dbdae791bf72cc5b28ccbc7dc4e89515d97463 + initial_ast: a579aa5a1bc5185d4dc4e8d463edc176d1fbf8d2761f64f276c2bc89ea57a8e7 + canonicalized_ast: 852adf503c72cc27c6555b37f6742c195f9c5b9dc837734954caec31b519a85d + type_inferenced_ast: 9a3ebea7ab65abf6dc23811657dbdae791bf72cc5b28ccbc7dc4e89515d97463 diff --git a/tests/expectations/compiler/compiler/integers/i8/div.leo.out b/tests/expectations/compiler/compiler/integers/i8/div.leo.out index d47b2740a4..00569e69d6 100644 --- a/tests/expectations/compiler/compiler/integers/i8/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 2ad50f87d6336c8436def71a47ed317220eadf07ef90717be8ef2567c60913f9 - canonicalized_theorem: 2ad50f87d6336c8436def71a47ed317220eadf07ef90717be8ef2567c60913f9 - type_inferenced_theorem: a818fdc8b79bc6b68364a686a6b17b6167fcbdd5d4a80123419cabfa526f46aa + initial_ast: 2ad50f87d6336c8436def71a47ed317220eadf07ef90717be8ef2567c60913f9 + canonicalized_ast: 2ad50f87d6336c8436def71a47ed317220eadf07ef90717be8ef2567c60913f9 + type_inferenced_ast: a818fdc8b79bc6b68364a686a6b17b6167fcbdd5d4a80123419cabfa526f46aa diff --git a/tests/expectations/compiler/compiler/integers/i8/eq.leo.out b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out index 48f0bba95c..e4c44eba23 100644 --- a/tests/expectations/compiler/compiler/integers/i8/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 035d136c5a2b9d429f6202d9c5967099e73312e0fbfa8bf669899a983ed1f1fa - canonicalized_theorem: 035d136c5a2b9d429f6202d9c5967099e73312e0fbfa8bf669899a983ed1f1fa - type_inferenced_theorem: 5e552e93b709e9931695f42df9f43459b4321ca23d91ccec7496a908e0e9d0b0 + initial_ast: 035d136c5a2b9d429f6202d9c5967099e73312e0fbfa8bf669899a983ed1f1fa + canonicalized_ast: 035d136c5a2b9d429f6202d9c5967099e73312e0fbfa8bf669899a983ed1f1fa + type_inferenced_ast: 5e552e93b709e9931695f42df9f43459b4321ca23d91ccec7496a908e0e9d0b0 diff --git a/tests/expectations/compiler/compiler/integers/i8/ge.leo.out b/tests/expectations/compiler/compiler/integers/i8/ge.leo.out index d004c50f73..80468ae674 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ge.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: be98a456d3f1a866fbb1793db4a6da15b6c23e5bcfe1ea820808c50df523d269 - canonicalized_theorem: be98a456d3f1a866fbb1793db4a6da15b6c23e5bcfe1ea820808c50df523d269 - type_inferenced_theorem: 6291f19c100f11c11cee46c98a7ed78de16f2bd8527bdb2926cc7c0e7212b084 + initial_ast: be98a456d3f1a866fbb1793db4a6da15b6c23e5bcfe1ea820808c50df523d269 + canonicalized_ast: be98a456d3f1a866fbb1793db4a6da15b6c23e5bcfe1ea820808c50df523d269 + type_inferenced_ast: 6291f19c100f11c11cee46c98a7ed78de16f2bd8527bdb2926cc7c0e7212b084 diff --git a/tests/expectations/compiler/compiler/integers/i8/gt.leo.out b/tests/expectations/compiler/compiler/integers/i8/gt.leo.out index bd9c73ef7e..7622e185fb 100644 --- a/tests/expectations/compiler/compiler/integers/i8/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/gt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 7f40bef3810a98a6069ee9f27d91902b8c21779e27790fd44d80e6b798e26214 - canonicalized_theorem: 7f40bef3810a98a6069ee9f27d91902b8c21779e27790fd44d80e6b798e26214 - type_inferenced_theorem: c83944355f670629d6cefc4e35dc52b86d5f42a6b6f4b20e0e6b712b661d5261 + initial_ast: 7f40bef3810a98a6069ee9f27d91902b8c21779e27790fd44d80e6b798e26214 + canonicalized_ast: 7f40bef3810a98a6069ee9f27d91902b8c21779e27790fd44d80e6b798e26214 + type_inferenced_ast: c83944355f670629d6cefc4e35dc52b86d5f42a6b6f4b20e0e6b712b661d5261 diff --git a/tests/expectations/compiler/compiler/integers/i8/le.leo.out b/tests/expectations/compiler/compiler/integers/i8/le.leo.out index d67b8a16b6..6a040c562f 100644 --- a/tests/expectations/compiler/compiler/integers/i8/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/le.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 57bdf9ca35c48812e16a9d4cb6531c96a625ed9995804ed4b8b31edc1837c124 - canonicalized_theorem: 57bdf9ca35c48812e16a9d4cb6531c96a625ed9995804ed4b8b31edc1837c124 - type_inferenced_theorem: 6fe044c68d21ad1379c1a74967a420cf0ffa182785d294bdabe75b624b9dad6d + initial_ast: 57bdf9ca35c48812e16a9d4cb6531c96a625ed9995804ed4b8b31edc1837c124 + canonicalized_ast: 57bdf9ca35c48812e16a9d4cb6531c96a625ed9995804ed4b8b31edc1837c124 + type_inferenced_ast: 6fe044c68d21ad1379c1a74967a420cf0ffa182785d294bdabe75b624b9dad6d diff --git a/tests/expectations/compiler/compiler/integers/i8/lt.leo.out b/tests/expectations/compiler/compiler/integers/i8/lt.leo.out index d8850ed654..03bab656d2 100644 --- a/tests/expectations/compiler/compiler/integers/i8/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: bb0cf928abcdf4b3492dd75699a6726f11600b55021bc56b4fd45f6fd3df4b54 - canonicalized_theorem: bb0cf928abcdf4b3492dd75699a6726f11600b55021bc56b4fd45f6fd3df4b54 - type_inferenced_theorem: 5b41154e37f1f4976f75493b49cef9b8d0b2b2ca1a7f42b586e1390c0767bb5e + initial_ast: bb0cf928abcdf4b3492dd75699a6726f11600b55021bc56b4fd45f6fd3df4b54 + canonicalized_ast: bb0cf928abcdf4b3492dd75699a6726f11600b55021bc56b4fd45f6fd3df4b54 + type_inferenced_ast: 5b41154e37f1f4976f75493b49cef9b8d0b2b2ca1a7f42b586e1390c0767bb5e diff --git a/tests/expectations/compiler/compiler/integers/i8/max.leo.out b/tests/expectations/compiler/compiler/integers/i8/max.leo.out index f5e2397a04..83bb3b0bf9 100644 --- a/tests/expectations/compiler/compiler/integers/i8/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 5b36c3f9e174c3e003993e13992f35b1b2b381bb600999205fcb6099b56b521e - canonicalized_theorem: 5b36c3f9e174c3e003993e13992f35b1b2b381bb600999205fcb6099b56b521e - type_inferenced_theorem: 8175e64b383fb53a548b58cc463e2edd55a87d133fa60246b794dde5b9119ef6 + initial_ast: 5b36c3f9e174c3e003993e13992f35b1b2b381bb600999205fcb6099b56b521e + canonicalized_ast: 5b36c3f9e174c3e003993e13992f35b1b2b381bb600999205fcb6099b56b521e + type_inferenced_ast: 8175e64b383fb53a548b58cc463e2edd55a87d133fa60246b794dde5b9119ef6 diff --git a/tests/expectations/compiler/compiler/integers/i8/min.leo.out b/tests/expectations/compiler/compiler/integers/i8/min.leo.out index 2ff7d5b992..ac027570ba 100644 --- a/tests/expectations/compiler/compiler/integers/i8/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 09df9882f6b902d6148316917e8ed9e62408e85c2248e111f87cbb505f7705fd - canonicalized_theorem: 09df9882f6b902d6148316917e8ed9e62408e85c2248e111f87cbb505f7705fd - type_inferenced_theorem: dbe09fecd41cbf9d4027140464ce6e87e57f4ee32f60dd1272a5cec82d088a1c + initial_ast: 09df9882f6b902d6148316917e8ed9e62408e85c2248e111f87cbb505f7705fd + canonicalized_ast: 09df9882f6b902d6148316917e8ed9e62408e85c2248e111f87cbb505f7705fd + type_inferenced_ast: dbe09fecd41cbf9d4027140464ce6e87e57f4ee32f60dd1272a5cec82d088a1c diff --git a/tests/expectations/compiler/compiler/integers/i8/mul.leo.out b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out index 00e23b0c62..920fc6a184 100644 --- a/tests/expectations/compiler/compiler/integers/i8/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: ad9b97cdc654da8d5c850e7d79b38f26dae3fcb90711c18a0c3b34df60349c7e - canonicalized_theorem: ad9b97cdc654da8d5c850e7d79b38f26dae3fcb90711c18a0c3b34df60349c7e - type_inferenced_theorem: de1670f9a5fc69c24fdd5607d6789af9d5a59e6f87f170857d8c29f3414013e5 + initial_ast: ad9b97cdc654da8d5c850e7d79b38f26dae3fcb90711c18a0c3b34df60349c7e + canonicalized_ast: ad9b97cdc654da8d5c850e7d79b38f26dae3fcb90711c18a0c3b34df60349c7e + type_inferenced_ast: de1670f9a5fc69c24fdd5607d6789af9d5a59e6f87f170857d8c29f3414013e5 diff --git a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out index 3d87bcea8b..45c6169f50 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: bf4147e29bd455cee755fac32078c7ab45c13bdb18d9b2ea3a27cf2f454ed3cb - canonicalized_theorem: bf4147e29bd455cee755fac32078c7ab45c13bdb18d9b2ea3a27cf2f454ed3cb - type_inferenced_theorem: 1f6abffa9fa5dbca11e43b1c4f228937bf100a4013e8f83e920fbff3d8d22f44 + initial_ast: bf4147e29bd455cee755fac32078c7ab45c13bdb18d9b2ea3a27cf2f454ed3cb + canonicalized_ast: bf4147e29bd455cee755fac32078c7ab45c13bdb18d9b2ea3a27cf2f454ed3cb + type_inferenced_ast: 1f6abffa9fa5dbca11e43b1c4f228937bf100a4013e8f83e920fbff3d8d22f44 diff --git a/tests/expectations/compiler/compiler/integers/i8/negate.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out index 4804ca5658..2da8a458dd 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 2698a8d7153a02a13dfb9450652465cae7b807f53ed1b1429eaecfb888300334 - canonicalized_theorem: 2698a8d7153a02a13dfb9450652465cae7b807f53ed1b1429eaecfb888300334 - type_inferenced_theorem: fe061e3467bfcabc7a36ea290be2f04aff27efa6dae8e1164bd03ce1af8664c1 + initial_ast: 2698a8d7153a02a13dfb9450652465cae7b807f53ed1b1429eaecfb888300334 + canonicalized_ast: 2698a8d7153a02a13dfb9450652465cae7b807f53ed1b1429eaecfb888300334 + type_inferenced_ast: fe061e3467bfcabc7a36ea290be2f04aff27efa6dae8e1164bd03ce1af8664c1 diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out index 539990264c..2b44ce1b67 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 04a3369b02921bfec3d0753adaea9adee8d90c31e65cf53bd1beb14965dd22e5 - canonicalized_theorem: 04a3369b02921bfec3d0753adaea9adee8d90c31e65cf53bd1beb14965dd22e5 - type_inferenced_theorem: 5d9f2f6b87a16f82e9995c59a3f456254ffd3a04ea8e802ca7e8e42779219ee8 + initial_ast: 04a3369b02921bfec3d0753adaea9adee8d90c31e65cf53bd1beb14965dd22e5 + canonicalized_ast: 04a3369b02921bfec3d0753adaea9adee8d90c31e65cf53bd1beb14965dd22e5 + type_inferenced_ast: 5d9f2f6b87a16f82e9995c59a3f456254ffd3a04ea8e802ca7e8e42779219ee8 diff --git a/tests/expectations/compiler/compiler/integers/i8/sub.leo.out b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out index 7f4f0dd2ab..d34883de25 100644 --- a/tests/expectations/compiler/compiler/integers/i8/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 59c47c65fa77729fdb64f325d9498a52b13e57f92e57f64c0b65f32a81b5d0b5 - canonicalized_theorem: 59c47c65fa77729fdb64f325d9498a52b13e57f92e57f64c0b65f32a81b5d0b5 - type_inferenced_theorem: 46fbeb4b3b044958e67d0ae0b89a149729a982b9c02fc9e0892bc907c93b3b5b + initial_ast: 59c47c65fa77729fdb64f325d9498a52b13e57f92e57f64c0b65f32a81b5d0b5 + canonicalized_ast: 59c47c65fa77729fdb64f325d9498a52b13e57f92e57f64c0b65f32a81b5d0b5 + type_inferenced_ast: 46fbeb4b3b044958e67d0ae0b89a149729a982b9c02fc9e0892bc907c93b3b5b diff --git a/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out index 7f317f8c3b..d8f0274229 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 807f6d204c511da0de8677fec27d64b461d505be3f756a5cf2430c4e5fe16d6d - canonicalized_theorem: 807f6d204c511da0de8677fec27d64b461d505be3f756a5cf2430c4e5fe16d6d - type_inferenced_theorem: 90970cdd4a45182dac1861ed3cd4ce397f3d0117c596b8ed388b98a28e4718ca + initial_ast: 807f6d204c511da0de8677fec27d64b461d505be3f756a5cf2430c4e5fe16d6d + canonicalized_ast: 807f6d204c511da0de8677fec27d64b461d505be3f756a5cf2430c4e5fe16d6d + type_inferenced_ast: 90970cdd4a45182dac1861ed3cd4ce397f3d0117c596b8ed388b98a28e4718ca diff --git a/tests/expectations/compiler/compiler/integers/u128/add.leo.out b/tests/expectations/compiler/compiler/integers/u128/add.leo.out index ce8c382cfd..661fd1b9a7 100644 --- a/tests/expectations/compiler/compiler/integers/u128/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: d45e6866a79c28636a5333b057f577ddb9af3528c72cfb0292d6cb30e9a84c34 - canonicalized_theorem: d45e6866a79c28636a5333b057f577ddb9af3528c72cfb0292d6cb30e9a84c34 - type_inferenced_theorem: d5500f11415075486f76f4f88a98f48f89ba30b9c7829527481004f05563be56 + initial_ast: d45e6866a79c28636a5333b057f577ddb9af3528c72cfb0292d6cb30e9a84c34 + canonicalized_ast: d45e6866a79c28636a5333b057f577ddb9af3528c72cfb0292d6cb30e9a84c34 + type_inferenced_ast: d5500f11415075486f76f4f88a98f48f89ba30b9c7829527481004f05563be56 diff --git a/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out index 72d80d2bf9..ffdc4b659c 100644 --- a/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: a50e90edf35c1c2d69c6ab04a5024c951caf54e37677cba8aed3e5f653ffcf5e - canonicalized_theorem: a50e90edf35c1c2d69c6ab04a5024c951caf54e37677cba8aed3e5f653ffcf5e - type_inferenced_theorem: 62efd6e15269c60fd45fbd873fc2a120ea98ba0a9bf96d774eb85847c36d482e + initial_ast: a50e90edf35c1c2d69c6ab04a5024c951caf54e37677cba8aed3e5f653ffcf5e + canonicalized_ast: a50e90edf35c1c2d69c6ab04a5024c951caf54e37677cba8aed3e5f653ffcf5e + type_inferenced_ast: 62efd6e15269c60fd45fbd873fc2a120ea98ba0a9bf96d774eb85847c36d482e diff --git a/tests/expectations/compiler/compiler/integers/u128/div.leo.out b/tests/expectations/compiler/compiler/integers/u128/div.leo.out index afd4521eca..573334652c 100644 --- a/tests/expectations/compiler/compiler/integers/u128/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: f50f65ba74e0e2c2cf146d66f83beb18023692e90b664e0217a19486b9b5fd67 - canonicalized_theorem: f50f65ba74e0e2c2cf146d66f83beb18023692e90b664e0217a19486b9b5fd67 - type_inferenced_theorem: d851da0f7cf5b7dacc0186f963b33564fde73427d10b84d13635923d12998963 + initial_ast: f50f65ba74e0e2c2cf146d66f83beb18023692e90b664e0217a19486b9b5fd67 + canonicalized_ast: f50f65ba74e0e2c2cf146d66f83beb18023692e90b664e0217a19486b9b5fd67 + type_inferenced_ast: d851da0f7cf5b7dacc0186f963b33564fde73427d10b84d13635923d12998963 diff --git a/tests/expectations/compiler/compiler/integers/u128/eq.leo.out b/tests/expectations/compiler/compiler/integers/u128/eq.leo.out index 75bb23feb8..301e133895 100644 --- a/tests/expectations/compiler/compiler/integers/u128/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 573187768b9c075767e7798068a4bfb0a1b9081f1ed0f8952560bd12d5bf15af - canonicalized_theorem: 573187768b9c075767e7798068a4bfb0a1b9081f1ed0f8952560bd12d5bf15af - type_inferenced_theorem: 136eb2cb152b93f02856d911f3381d24895a77739220e3026d9b4a1d2c2ceb68 + initial_ast: 573187768b9c075767e7798068a4bfb0a1b9081f1ed0f8952560bd12d5bf15af + canonicalized_ast: 573187768b9c075767e7798068a4bfb0a1b9081f1ed0f8952560bd12d5bf15af + type_inferenced_ast: 136eb2cb152b93f02856d911f3381d24895a77739220e3026d9b4a1d2c2ceb68 diff --git a/tests/expectations/compiler/compiler/integers/u128/ge.leo.out b/tests/expectations/compiler/compiler/integers/u128/ge.leo.out index 106bd592f0..852abf0857 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ge.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: c398a4f1f04fc9ebe97c65cb33c26ac5faf161417493db8bd8c50f0c0da7fad6 - canonicalized_theorem: c398a4f1f04fc9ebe97c65cb33c26ac5faf161417493db8bd8c50f0c0da7fad6 - type_inferenced_theorem: f5052bd40c74aee7da886eb480ccbb24136ee7d2fed1c70d5e8d38e819a9a697 + initial_ast: c398a4f1f04fc9ebe97c65cb33c26ac5faf161417493db8bd8c50f0c0da7fad6 + canonicalized_ast: c398a4f1f04fc9ebe97c65cb33c26ac5faf161417493db8bd8c50f0c0da7fad6 + type_inferenced_ast: f5052bd40c74aee7da886eb480ccbb24136ee7d2fed1c70d5e8d38e819a9a697 diff --git a/tests/expectations/compiler/compiler/integers/u128/gt.leo.out b/tests/expectations/compiler/compiler/integers/u128/gt.leo.out index 4a4b63bb99..2d45d8a801 100644 --- a/tests/expectations/compiler/compiler/integers/u128/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/gt.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: u128_f.in output: registers: {} - initial_theorem: 8c2309bdacd6b025d2462e08376db93e25406d164abc8955e039a338a0a58c00 - canonicalized_theorem: 7bec6018459ad543c408f4f911200b81dc05f855ef680a3b12c6b8f58558f216 - type_inferenced_theorem: d495e9868687b702dc07201da22b59dfd91212f2d6632e67f0a967b0fc748995 + initial_ast: 8c2309bdacd6b025d2462e08376db93e25406d164abc8955e039a338a0a58c00 + canonicalized_ast: 7bec6018459ad543c408f4f911200b81dc05f855ef680a3b12c6b8f58558f216 + type_inferenced_ast: d495e9868687b702dc07201da22b59dfd91212f2d6632e67f0a967b0fc748995 diff --git a/tests/expectations/compiler/compiler/integers/u128/input.leo.out b/tests/expectations/compiler/compiler/integers/u128/input.leo.out index 43e5af16e1..fa5c449606 100644 --- a/tests/expectations/compiler/compiler/integers/u128/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 564026493df81fbcbea34b98737e3aade0b3a0a410f19534c61b8132b2796a58 - canonicalized_theorem: 564026493df81fbcbea34b98737e3aade0b3a0a410f19534c61b8132b2796a58 - type_inferenced_theorem: c64ae9e0e4aefcc4897de172b9107ab0a824b49dbd1e678d88ae15a33c85ce41 + initial_ast: 564026493df81fbcbea34b98737e3aade0b3a0a410f19534c61b8132b2796a58 + canonicalized_ast: 564026493df81fbcbea34b98737e3aade0b3a0a410f19534c61b8132b2796a58 + type_inferenced_ast: c64ae9e0e4aefcc4897de172b9107ab0a824b49dbd1e678d88ae15a33c85ce41 diff --git a/tests/expectations/compiler/compiler/integers/u128/le.leo.out b/tests/expectations/compiler/compiler/integers/u128/le.leo.out index d29420a0bc..173211016b 100644 --- a/tests/expectations/compiler/compiler/integers/u128/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/le.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: 07514fbeb1b81b4c2c99555ab2b7402b71997838ab48cf8a00c859441a93bfaa - canonicalized_theorem: 07514fbeb1b81b4c2c99555ab2b7402b71997838ab48cf8a00c859441a93bfaa - type_inferenced_theorem: b3aad22da78779bbc4982cc8ee42b1d68ffc77cdea0000d31f8ec23710f088b5 + initial_ast: 07514fbeb1b81b4c2c99555ab2b7402b71997838ab48cf8a00c859441a93bfaa + canonicalized_ast: 07514fbeb1b81b4c2c99555ab2b7402b71997838ab48cf8a00c859441a93bfaa + type_inferenced_ast: b3aad22da78779bbc4982cc8ee42b1d68ffc77cdea0000d31f8ec23710f088b5 diff --git a/tests/expectations/compiler/compiler/integers/u128/lt.leo.out b/tests/expectations/compiler/compiler/integers/u128/lt.leo.out index 61b6e2ff20..d5da5718d7 100644 --- a/tests/expectations/compiler/compiler/integers/u128/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: 6cc9a99c85b53360a020faa95b45beda98089442160343df3c0b5705430a8d0d - canonicalized_theorem: 6cc9a99c85b53360a020faa95b45beda98089442160343df3c0b5705430a8d0d - type_inferenced_theorem: 63fcd7cf6ba3b36bbeed4bd7a234502a427b93289f0253693226692fe7dd457b + initial_ast: 6cc9a99c85b53360a020faa95b45beda98089442160343df3c0b5705430a8d0d + canonicalized_ast: 6cc9a99c85b53360a020faa95b45beda98089442160343df3c0b5705430a8d0d + type_inferenced_ast: 63fcd7cf6ba3b36bbeed4bd7a234502a427b93289f0253693226692fe7dd457b diff --git a/tests/expectations/compiler/compiler/integers/u128/max.leo.out b/tests/expectations/compiler/compiler/integers/u128/max.leo.out index 4dfd557023..a7a86662e4 100644 --- a/tests/expectations/compiler/compiler/integers/u128/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 22e031b9484b25549efe77735034b7868fe15cb482fb2b9866c4eb6a97d66a9b - canonicalized_theorem: 22e031b9484b25549efe77735034b7868fe15cb482fb2b9866c4eb6a97d66a9b - type_inferenced_theorem: 1a18559f37943d7863243f97f204a7967bd5ca421cf614db3a454eb62570fa55 + initial_ast: 22e031b9484b25549efe77735034b7868fe15cb482fb2b9866c4eb6a97d66a9b + canonicalized_ast: 22e031b9484b25549efe77735034b7868fe15cb482fb2b9866c4eb6a97d66a9b + type_inferenced_ast: 1a18559f37943d7863243f97f204a7967bd5ca421cf614db3a454eb62570fa55 diff --git a/tests/expectations/compiler/compiler/integers/u128/min.leo.out b/tests/expectations/compiler/compiler/integers/u128/min.leo.out index 3f62d18ad4..954a505ee5 100644 --- a/tests/expectations/compiler/compiler/integers/u128/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 2e69e9af36727a547e5494e3c77f80a55c18daf0d13398df6c2101a76264d695 - canonicalized_theorem: 2e69e9af36727a547e5494e3c77f80a55c18daf0d13398df6c2101a76264d695 - type_inferenced_theorem: 4586f887e2d6d10833c6f556c1e6a0a3c53d3da89f1e0659967e6da60692106f + initial_ast: 2e69e9af36727a547e5494e3c77f80a55c18daf0d13398df6c2101a76264d695 + canonicalized_ast: 2e69e9af36727a547e5494e3c77f80a55c18daf0d13398df6c2101a76264d695 + type_inferenced_ast: 4586f887e2d6d10833c6f556c1e6a0a3c53d3da89f1e0659967e6da60692106f diff --git a/tests/expectations/compiler/compiler/integers/u128/mul.leo.out b/tests/expectations/compiler/compiler/integers/u128/mul.leo.out index a0ed6056bd..a081b7d925 100644 --- a/tests/expectations/compiler/compiler/integers/u128/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: 21a49e719d3cf8ef9c34775b584b8ef46213f5c4df384f0780d8233eb9f8c09c - canonicalized_theorem: 21a49e719d3cf8ef9c34775b584b8ef46213f5c4df384f0780d8233eb9f8c09c - type_inferenced_theorem: af6b3537bf7508bd97b7049bb76df13456dac4d4bdb526cba43aba952f9da9ae + initial_ast: 21a49e719d3cf8ef9c34775b584b8ef46213f5c4df384f0780d8233eb9f8c09c + canonicalized_ast: 21a49e719d3cf8ef9c34775b584b8ef46213f5c4df384f0780d8233eb9f8c09c + type_inferenced_ast: af6b3537bf7508bd97b7049bb76df13456dac4d4bdb526cba43aba952f9da9ae diff --git a/tests/expectations/compiler/compiler/integers/u128/ne.leo.out b/tests/expectations/compiler/compiler/integers/u128/ne.leo.out index 82c2685a60..7f787417b8 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 8165065b0ab14fa4f6e793d588fd02a535b58ee0a62732f1a9ac13b5fbf96cb6 - canonicalized_theorem: 8165065b0ab14fa4f6e793d588fd02a535b58ee0a62732f1a9ac13b5fbf96cb6 - type_inferenced_theorem: 54a6fe96befb6664f53f8024515e853f6b760ceaa3155782b33edc6c45f8ca89 + initial_ast: 8165065b0ab14fa4f6e793d588fd02a535b58ee0a62732f1a9ac13b5fbf96cb6 + canonicalized_ast: 8165065b0ab14fa4f6e793d588fd02a535b58ee0a62732f1a9ac13b5fbf96cb6 + type_inferenced_ast: 54a6fe96befb6664f53f8024515e853f6b760ceaa3155782b33edc6c45f8ca89 diff --git a/tests/expectations/compiler/compiler/integers/u128/sub.leo.out b/tests/expectations/compiler/compiler/integers/u128/sub.leo.out index b240caf22f..9d816dc7ad 100644 --- a/tests/expectations/compiler/compiler/integers/u128/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: ab2437dbf56e0d28c7b0d370e95fa38d326cdcff9f8cc1f016c8b5ad317d38ce - canonicalized_theorem: ab2437dbf56e0d28c7b0d370e95fa38d326cdcff9f8cc1f016c8b5ad317d38ce - type_inferenced_theorem: 46fab75c453ebe6ce6ba360a8b5d82e1d6d89799b4a280a27772d66a450bde9f + initial_ast: ab2437dbf56e0d28c7b0d370e95fa38d326cdcff9f8cc1f016c8b5ad317d38ce + canonicalized_ast: ab2437dbf56e0d28c7b0d370e95fa38d326cdcff9f8cc1f016c8b5ad317d38ce + type_inferenced_ast: 46fab75c453ebe6ce6ba360a8b5d82e1d6d89799b4a280a27772d66a450bde9f diff --git a/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out index 0d74c81713..87ec61f49e 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 35127d5f289d7f1dd3e1c79c919ceafaff778ea857b4035d6d90d0abc6804533 - canonicalized_theorem: 35127d5f289d7f1dd3e1c79c919ceafaff778ea857b4035d6d90d0abc6804533 - type_inferenced_theorem: 257c366629f72e71847216b24d14bb81d6125b75c7ade6b0335c82370c3e8550 + initial_ast: 35127d5f289d7f1dd3e1c79c919ceafaff778ea857b4035d6d90d0abc6804533 + canonicalized_ast: 35127d5f289d7f1dd3e1c79c919ceafaff778ea857b4035d6d90d0abc6804533 + type_inferenced_ast: 257c366629f72e71847216b24d14bb81d6125b75c7ade6b0335c82370c3e8550 diff --git a/tests/expectations/compiler/compiler/integers/u16/add.leo.out b/tests/expectations/compiler/compiler/integers/u16/add.leo.out index 9126e194a4..a13f6ef6bc 100644 --- a/tests/expectations/compiler/compiler/integers/u16/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 41be1c43cd89daed5f9d28b5a5a9788989f2618cb157259329be41ae06b89e7c - canonicalized_theorem: 41be1c43cd89daed5f9d28b5a5a9788989f2618cb157259329be41ae06b89e7c - type_inferenced_theorem: 9a775f976c931eca2318f74c0dde3e4b207d10ed1e8398e64533b7870d73e98a + initial_ast: 41be1c43cd89daed5f9d28b5a5a9788989f2618cb157259329be41ae06b89e7c + canonicalized_ast: 41be1c43cd89daed5f9d28b5a5a9788989f2618cb157259329be41ae06b89e7c + type_inferenced_ast: 9a775f976c931eca2318f74c0dde3e4b207d10ed1e8398e64533b7870d73e98a diff --git a/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out index ad18a3b6ba..7a8e41ab92 100644 --- a/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: c19ce080448a618611bb810bc73339a31e6f4be3afd3ed782ef848d448105ff4 - canonicalized_theorem: c19ce080448a618611bb810bc73339a31e6f4be3afd3ed782ef848d448105ff4 - type_inferenced_theorem: 5cedb974c91a3131d6c74d6ad59df8c02c365a0f3bc2717f19020125507354ea + initial_ast: c19ce080448a618611bb810bc73339a31e6f4be3afd3ed782ef848d448105ff4 + canonicalized_ast: c19ce080448a618611bb810bc73339a31e6f4be3afd3ed782ef848d448105ff4 + type_inferenced_ast: 5cedb974c91a3131d6c74d6ad59df8c02c365a0f3bc2717f19020125507354ea diff --git a/tests/expectations/compiler/compiler/integers/u16/div.leo.out b/tests/expectations/compiler/compiler/integers/u16/div.leo.out index b71a1d73f8..d6b0f8f69f 100644 --- a/tests/expectations/compiler/compiler/integers/u16/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 9951c318a725992029658c3a45ba687e51b9025bd7e209471e1dac83fda7ae00 - canonicalized_theorem: 9951c318a725992029658c3a45ba687e51b9025bd7e209471e1dac83fda7ae00 - type_inferenced_theorem: e85bde99e42c696418bb61214dfdc22d0481f413e81ac5890ef63bf4c29a3f6e + initial_ast: 9951c318a725992029658c3a45ba687e51b9025bd7e209471e1dac83fda7ae00 + canonicalized_ast: 9951c318a725992029658c3a45ba687e51b9025bd7e209471e1dac83fda7ae00 + type_inferenced_ast: e85bde99e42c696418bb61214dfdc22d0481f413e81ac5890ef63bf4c29a3f6e diff --git a/tests/expectations/compiler/compiler/integers/u16/eq.leo.out b/tests/expectations/compiler/compiler/integers/u16/eq.leo.out index 9df7ae37a6..40d842f950 100644 --- a/tests/expectations/compiler/compiler/integers/u16/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 8e267a226869f49793d77d6b5038ec61ad7c00df58fe761880633e276733d9b8 - canonicalized_theorem: 8e267a226869f49793d77d6b5038ec61ad7c00df58fe761880633e276733d9b8 - type_inferenced_theorem: 502ee92ed049003c911de3290cd7dbfaff3d15e86cb8f8b9eb3fcdbba7829023 + initial_ast: 8e267a226869f49793d77d6b5038ec61ad7c00df58fe761880633e276733d9b8 + canonicalized_ast: 8e267a226869f49793d77d6b5038ec61ad7c00df58fe761880633e276733d9b8 + type_inferenced_ast: 502ee92ed049003c911de3290cd7dbfaff3d15e86cb8f8b9eb3fcdbba7829023 diff --git a/tests/expectations/compiler/compiler/integers/u16/ge.leo.out b/tests/expectations/compiler/compiler/integers/u16/ge.leo.out index 5f7e8a0d8f..9e2988d080 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ge.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 55b790c06884aa8e3b3c90d14020080ef8f80e87ecb56bc0b3cf98d522906e91 - canonicalized_theorem: 55b790c06884aa8e3b3c90d14020080ef8f80e87ecb56bc0b3cf98d522906e91 - type_inferenced_theorem: fcfdcd073d22c15e7018e171c82efc6dc8aa2a77df8557f51991b2265ec39fea + initial_ast: 55b790c06884aa8e3b3c90d14020080ef8f80e87ecb56bc0b3cf98d522906e91 + canonicalized_ast: 55b790c06884aa8e3b3c90d14020080ef8f80e87ecb56bc0b3cf98d522906e91 + type_inferenced_ast: fcfdcd073d22c15e7018e171c82efc6dc8aa2a77df8557f51991b2265ec39fea diff --git a/tests/expectations/compiler/compiler/integers/u16/gt.leo.out b/tests/expectations/compiler/compiler/integers/u16/gt.leo.out index bd2e86a62e..81ff5179cd 100644 --- a/tests/expectations/compiler/compiler/integers/u16/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/gt.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: u16_f.in output: registers: {} - initial_theorem: 475f4077b47b7cb63c07bab29c7acc6781e7c5693484c36c982951c0e1850ac7 - canonicalized_theorem: 0808701df629a9df6b534097d0e87536c93c8ccd693747085d1f5254214212a4 - type_inferenced_theorem: 810d18f1fdbd7769db52937df22f1f27ea1be7923e74fbe2cd2a645cb4d27f1e + initial_ast: 475f4077b47b7cb63c07bab29c7acc6781e7c5693484c36c982951c0e1850ac7 + canonicalized_ast: 0808701df629a9df6b534097d0e87536c93c8ccd693747085d1f5254214212a4 + type_inferenced_ast: 810d18f1fdbd7769db52937df22f1f27ea1be7923e74fbe2cd2a645cb4d27f1e diff --git a/tests/expectations/compiler/compiler/integers/u16/input.leo.out b/tests/expectations/compiler/compiler/integers/u16/input.leo.out index b628e79609..2856ff4a5b 100644 --- a/tests/expectations/compiler/compiler/integers/u16/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: d3aaf23c5b1383351acd6c0696e70e14c84e9cae56019730a35818fd142b9204 - canonicalized_theorem: d3aaf23c5b1383351acd6c0696e70e14c84e9cae56019730a35818fd142b9204 - type_inferenced_theorem: 62f1318f2117ce10ca73d902572e8af6d3f97d37fce108403877f50f277e9963 + initial_ast: d3aaf23c5b1383351acd6c0696e70e14c84e9cae56019730a35818fd142b9204 + canonicalized_ast: d3aaf23c5b1383351acd6c0696e70e14c84e9cae56019730a35818fd142b9204 + type_inferenced_ast: 62f1318f2117ce10ca73d902572e8af6d3f97d37fce108403877f50f277e9963 diff --git a/tests/expectations/compiler/compiler/integers/u16/le.leo.out b/tests/expectations/compiler/compiler/integers/u16/le.leo.out index da1a3db76b..692df5267f 100644 --- a/tests/expectations/compiler/compiler/integers/u16/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/le.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: 34fc9cb86dd1d3ace79e57d9ba989cc2f995d3b61c18f55c2aae502b0fb51ea4 - canonicalized_theorem: 34fc9cb86dd1d3ace79e57d9ba989cc2f995d3b61c18f55c2aae502b0fb51ea4 - type_inferenced_theorem: 089d93f92c53431f63aabc1d113c1f6dcd6562228d1c2dd3761c937aa91d88ee + initial_ast: 34fc9cb86dd1d3ace79e57d9ba989cc2f995d3b61c18f55c2aae502b0fb51ea4 + canonicalized_ast: 34fc9cb86dd1d3ace79e57d9ba989cc2f995d3b61c18f55c2aae502b0fb51ea4 + type_inferenced_ast: 089d93f92c53431f63aabc1d113c1f6dcd6562228d1c2dd3761c937aa91d88ee diff --git a/tests/expectations/compiler/compiler/integers/u16/lt.leo.out b/tests/expectations/compiler/compiler/integers/u16/lt.leo.out index 43461e0fcb..232b0e0a61 100644 --- a/tests/expectations/compiler/compiler/integers/u16/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: dccf5d8cd58b2dbf1680f04107dfe9ab1644ecced22a6256f0d6f1d5ff2d2270 - canonicalized_theorem: dccf5d8cd58b2dbf1680f04107dfe9ab1644ecced22a6256f0d6f1d5ff2d2270 - type_inferenced_theorem: 66b374f00e25551d6b8f613c65c3cdfca98819252c7b76677837cadb0159eda0 + initial_ast: dccf5d8cd58b2dbf1680f04107dfe9ab1644ecced22a6256f0d6f1d5ff2d2270 + canonicalized_ast: dccf5d8cd58b2dbf1680f04107dfe9ab1644ecced22a6256f0d6f1d5ff2d2270 + type_inferenced_ast: 66b374f00e25551d6b8f613c65c3cdfca98819252c7b76677837cadb0159eda0 diff --git a/tests/expectations/compiler/compiler/integers/u16/max.leo.out b/tests/expectations/compiler/compiler/integers/u16/max.leo.out index 54ee635afc..bb67ba07be 100644 --- a/tests/expectations/compiler/compiler/integers/u16/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: baa6d3c3d700d25eba38c74347a712dc94d47fd44283437649601e60173c0d74 - canonicalized_theorem: baa6d3c3d700d25eba38c74347a712dc94d47fd44283437649601e60173c0d74 - type_inferenced_theorem: ae44c093359df948b236fd0db5bbfb38c8a793af7bb4ad0491d9ed71f9cd5f5b + initial_ast: baa6d3c3d700d25eba38c74347a712dc94d47fd44283437649601e60173c0d74 + canonicalized_ast: baa6d3c3d700d25eba38c74347a712dc94d47fd44283437649601e60173c0d74 + type_inferenced_ast: ae44c093359df948b236fd0db5bbfb38c8a793af7bb4ad0491d9ed71f9cd5f5b diff --git a/tests/expectations/compiler/compiler/integers/u16/min.leo.out b/tests/expectations/compiler/compiler/integers/u16/min.leo.out index c835a52158..ec6c1482a7 100644 --- a/tests/expectations/compiler/compiler/integers/u16/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: cde26bef80f68049390ccde167fa99e92595c4f28049540922710fcd5c848c03 - canonicalized_theorem: cde26bef80f68049390ccde167fa99e92595c4f28049540922710fcd5c848c03 - type_inferenced_theorem: 22350cdbf4a782784b7d68022fda1db95e089d3f548517a34fbce0beb7189682 + initial_ast: cde26bef80f68049390ccde167fa99e92595c4f28049540922710fcd5c848c03 + canonicalized_ast: cde26bef80f68049390ccde167fa99e92595c4f28049540922710fcd5c848c03 + type_inferenced_ast: 22350cdbf4a782784b7d68022fda1db95e089d3f548517a34fbce0beb7189682 diff --git a/tests/expectations/compiler/compiler/integers/u16/mul.leo.out b/tests/expectations/compiler/compiler/integers/u16/mul.leo.out index 5871c208ee..1239a88cee 100644 --- a/tests/expectations/compiler/compiler/integers/u16/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: 2eefc41f982ec20bc145b7a5dd34d87aad66e0852abf44a9415ee4e0401aca04 - canonicalized_theorem: 2eefc41f982ec20bc145b7a5dd34d87aad66e0852abf44a9415ee4e0401aca04 - type_inferenced_theorem: e8898c8abc5eea0b22fc9f8eb61b6b37f79351f1fed4c490a83256da66a84b58 + initial_ast: 2eefc41f982ec20bc145b7a5dd34d87aad66e0852abf44a9415ee4e0401aca04 + canonicalized_ast: 2eefc41f982ec20bc145b7a5dd34d87aad66e0852abf44a9415ee4e0401aca04 + type_inferenced_ast: e8898c8abc5eea0b22fc9f8eb61b6b37f79351f1fed4c490a83256da66a84b58 diff --git a/tests/expectations/compiler/compiler/integers/u16/ne.leo.out b/tests/expectations/compiler/compiler/integers/u16/ne.leo.out index 6becc419a3..6d640b9859 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 299e893c8e424583eb27648b0d2aae54c922da31a7e46e5891c57fce3dff0424 - canonicalized_theorem: 299e893c8e424583eb27648b0d2aae54c922da31a7e46e5891c57fce3dff0424 - type_inferenced_theorem: 6e80b43bd2e4d8e8be23b159eca4f6212aa9aa32b49fb04c99d8d8754702561d + initial_ast: 299e893c8e424583eb27648b0d2aae54c922da31a7e46e5891c57fce3dff0424 + canonicalized_ast: 299e893c8e424583eb27648b0d2aae54c922da31a7e46e5891c57fce3dff0424 + type_inferenced_ast: 6e80b43bd2e4d8e8be23b159eca4f6212aa9aa32b49fb04c99d8d8754702561d diff --git a/tests/expectations/compiler/compiler/integers/u16/sub.leo.out b/tests/expectations/compiler/compiler/integers/u16/sub.leo.out index 7a61b89619..5a34c65a38 100644 --- a/tests/expectations/compiler/compiler/integers/u16/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 7f4ed5b88303c057d83ac580c857cca2fa3a38ab7e8d381bc0efc1fb280edc85 - canonicalized_theorem: 7f4ed5b88303c057d83ac580c857cca2fa3a38ab7e8d381bc0efc1fb280edc85 - type_inferenced_theorem: 8afc96f5b6a18bb7677735c62e478e49cf801ca9832311ebe95c89f6df422f88 + initial_ast: 7f4ed5b88303c057d83ac580c857cca2fa3a38ab7e8d381bc0efc1fb280edc85 + canonicalized_ast: 7f4ed5b88303c057d83ac580c857cca2fa3a38ab7e8d381bc0efc1fb280edc85 + type_inferenced_ast: 8afc96f5b6a18bb7677735c62e478e49cf801ca9832311ebe95c89f6df422f88 diff --git a/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out index 82a427d2ab..45a5ddd8f7 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: f927dbe131a6f1be4cfc941aebdd4670591edd75215d54e2dc98a86f8dcfc3de - canonicalized_theorem: f927dbe131a6f1be4cfc941aebdd4670591edd75215d54e2dc98a86f8dcfc3de - type_inferenced_theorem: e4ca23e9cbea206e5c32d057ec7a93f5ef36d5745314f44f9467fa173fb7bf6f + initial_ast: f927dbe131a6f1be4cfc941aebdd4670591edd75215d54e2dc98a86f8dcfc3de + canonicalized_ast: f927dbe131a6f1be4cfc941aebdd4670591edd75215d54e2dc98a86f8dcfc3de + type_inferenced_ast: e4ca23e9cbea206e5c32d057ec7a93f5ef36d5745314f44f9467fa173fb7bf6f diff --git a/tests/expectations/compiler/compiler/integers/u32/add.leo.out b/tests/expectations/compiler/compiler/integers/u32/add.leo.out index 4866fdde7a..d327d27a52 100644 --- a/tests/expectations/compiler/compiler/integers/u32/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 3cdca25e10098f45cf439da379aed56b4fe78e35632cb1bac655c8478f51d9cd - canonicalized_theorem: 3cdca25e10098f45cf439da379aed56b4fe78e35632cb1bac655c8478f51d9cd - type_inferenced_theorem: 84e885f56b08587f875e94a570bf977844b511fb85f7689df660e6ce69b2706e + initial_ast: 3cdca25e10098f45cf439da379aed56b4fe78e35632cb1bac655c8478f51d9cd + canonicalized_ast: 3cdca25e10098f45cf439da379aed56b4fe78e35632cb1bac655c8478f51d9cd + type_inferenced_ast: 84e885f56b08587f875e94a570bf977844b511fb85f7689df660e6ce69b2706e diff --git a/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out index c63b14e286..0bf7ff83ec 100644 --- a/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 76b7c73c53d4e59406ba165352d155bf05d5c3615c89ef53ddc2b8ae931bfb85 - canonicalized_theorem: 76b7c73c53d4e59406ba165352d155bf05d5c3615c89ef53ddc2b8ae931bfb85 - type_inferenced_theorem: ea4d79e6a2877efdc838d54fb7112dfef314b8e82369e91ebf102db9b393ab76 + initial_ast: 76b7c73c53d4e59406ba165352d155bf05d5c3615c89ef53ddc2b8ae931bfb85 + canonicalized_ast: 76b7c73c53d4e59406ba165352d155bf05d5c3615c89ef53ddc2b8ae931bfb85 + type_inferenced_ast: ea4d79e6a2877efdc838d54fb7112dfef314b8e82369e91ebf102db9b393ab76 diff --git a/tests/expectations/compiler/compiler/integers/u32/div.leo.out b/tests/expectations/compiler/compiler/integers/u32/div.leo.out index 3a37d110a0..cb9779a7af 100644 --- a/tests/expectations/compiler/compiler/integers/u32/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 0023392b04189309efb4fc89df4887595d3824e51cb2bf33c3159a88bcd3f7b5 - canonicalized_theorem: 0023392b04189309efb4fc89df4887595d3824e51cb2bf33c3159a88bcd3f7b5 - type_inferenced_theorem: 50641a3a2bd7b33c4ff6698b185066cd3ecfcf52497ea39151c3d7d34ce12510 + initial_ast: 0023392b04189309efb4fc89df4887595d3824e51cb2bf33c3159a88bcd3f7b5 + canonicalized_ast: 0023392b04189309efb4fc89df4887595d3824e51cb2bf33c3159a88bcd3f7b5 + type_inferenced_ast: 50641a3a2bd7b33c4ff6698b185066cd3ecfcf52497ea39151c3d7d34ce12510 diff --git a/tests/expectations/compiler/compiler/integers/u32/eq.leo.out b/tests/expectations/compiler/compiler/integers/u32/eq.leo.out index 50859d1945..2c039e8d84 100644 --- a/tests/expectations/compiler/compiler/integers/u32/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: bb0bb3d8085da2fbffe1982b31452a8d8f5c442fc80313e4123eb9bcfd9280c7 - canonicalized_theorem: bb0bb3d8085da2fbffe1982b31452a8d8f5c442fc80313e4123eb9bcfd9280c7 - type_inferenced_theorem: 36c871ce90092fa7123b5eefd31232386955559f421cc5f21250ce89988e5463 + initial_ast: bb0bb3d8085da2fbffe1982b31452a8d8f5c442fc80313e4123eb9bcfd9280c7 + canonicalized_ast: bb0bb3d8085da2fbffe1982b31452a8d8f5c442fc80313e4123eb9bcfd9280c7 + type_inferenced_ast: 36c871ce90092fa7123b5eefd31232386955559f421cc5f21250ce89988e5463 diff --git a/tests/expectations/compiler/compiler/integers/u32/ge.leo.out b/tests/expectations/compiler/compiler/integers/u32/ge.leo.out index b2b8b5d01c..03ede53117 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ge.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: d53d5822cea427e9892561559b8a7fe3a3a4ee92f5dfc07e52dd554bec2e0812 - canonicalized_theorem: d53d5822cea427e9892561559b8a7fe3a3a4ee92f5dfc07e52dd554bec2e0812 - type_inferenced_theorem: 89b7a155fdf0333d66156431437983de4d818b754a18ed00693697e7dc71277a + initial_ast: d53d5822cea427e9892561559b8a7fe3a3a4ee92f5dfc07e52dd554bec2e0812 + canonicalized_ast: d53d5822cea427e9892561559b8a7fe3a3a4ee92f5dfc07e52dd554bec2e0812 + type_inferenced_ast: 89b7a155fdf0333d66156431437983de4d818b754a18ed00693697e7dc71277a diff --git a/tests/expectations/compiler/compiler/integers/u32/gt.leo.out b/tests/expectations/compiler/compiler/integers/u32/gt.leo.out index 210e340dae..215e301f1a 100644 --- a/tests/expectations/compiler/compiler/integers/u32/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/gt.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: u32_f.in output: registers: {} - initial_theorem: f6b0f84faf3d622d320ea867bf9bd76485633dfae6a41158e0e265880b5fb750 - canonicalized_theorem: 5e63641393a51590ce9940712bd01ddb445cf3af3b5c5ffa02d9ca1dddccf03e - type_inferenced_theorem: 79dc9917db6925b4d5a1f5aaa15362b55172133be5d088eb73cd7e8029ff710c + initial_ast: f6b0f84faf3d622d320ea867bf9bd76485633dfae6a41158e0e265880b5fb750 + canonicalized_ast: 5e63641393a51590ce9940712bd01ddb445cf3af3b5c5ffa02d9ca1dddccf03e + type_inferenced_ast: 79dc9917db6925b4d5a1f5aaa15362b55172133be5d088eb73cd7e8029ff710c diff --git a/tests/expectations/compiler/compiler/integers/u32/input.leo.out b/tests/expectations/compiler/compiler/integers/u32/input.leo.out index 5813d8dd3c..cd14f2e972 100644 --- a/tests/expectations/compiler/compiler/integers/u32/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 7f3c18f7e6aa4bf261d1778234a885ff1da3627e74e45498f059c4e616847f5b - canonicalized_theorem: 7f3c18f7e6aa4bf261d1778234a885ff1da3627e74e45498f059c4e616847f5b - type_inferenced_theorem: 8db8e90395fff2d51dbe280f9aa1825129eeaa45bd84d228017927d2f6bea467 + initial_ast: 7f3c18f7e6aa4bf261d1778234a885ff1da3627e74e45498f059c4e616847f5b + canonicalized_ast: 7f3c18f7e6aa4bf261d1778234a885ff1da3627e74e45498f059c4e616847f5b + type_inferenced_ast: 8db8e90395fff2d51dbe280f9aa1825129eeaa45bd84d228017927d2f6bea467 diff --git a/tests/expectations/compiler/compiler/integers/u32/le.leo.out b/tests/expectations/compiler/compiler/integers/u32/le.leo.out index e3bf63adc4..75b54b5fb6 100644 --- a/tests/expectations/compiler/compiler/integers/u32/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/le.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: 18af75f75099b7ed0d8337cbc39602d0276d9be538b27f07931e3310e6b674a0 - canonicalized_theorem: 18af75f75099b7ed0d8337cbc39602d0276d9be538b27f07931e3310e6b674a0 - type_inferenced_theorem: 9da02a49544ec4496d6189199c628b313d4b3d2b792627a71bf11015380cae38 + initial_ast: 18af75f75099b7ed0d8337cbc39602d0276d9be538b27f07931e3310e6b674a0 + canonicalized_ast: 18af75f75099b7ed0d8337cbc39602d0276d9be538b27f07931e3310e6b674a0 + type_inferenced_ast: 9da02a49544ec4496d6189199c628b313d4b3d2b792627a71bf11015380cae38 diff --git a/tests/expectations/compiler/compiler/integers/u32/lt.leo.out b/tests/expectations/compiler/compiler/integers/u32/lt.leo.out index a4bff6b705..69996e84f0 100644 --- a/tests/expectations/compiler/compiler/integers/u32/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: 75eaf809a1c09171ebc028382936ee07c942774f2b20c143590049afe7474c4f - canonicalized_theorem: 75eaf809a1c09171ebc028382936ee07c942774f2b20c143590049afe7474c4f - type_inferenced_theorem: ac0f96eae8db0d2820c9fa737a9a5571fda10507f3f5f7a50cf989c797d181c3 + initial_ast: 75eaf809a1c09171ebc028382936ee07c942774f2b20c143590049afe7474c4f + canonicalized_ast: 75eaf809a1c09171ebc028382936ee07c942774f2b20c143590049afe7474c4f + type_inferenced_ast: ac0f96eae8db0d2820c9fa737a9a5571fda10507f3f5f7a50cf989c797d181c3 diff --git a/tests/expectations/compiler/compiler/integers/u32/max.leo.out b/tests/expectations/compiler/compiler/integers/u32/max.leo.out index ce19241ecf..63325d2dbb 100644 --- a/tests/expectations/compiler/compiler/integers/u32/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 86fb7cf305725e7fe097d418ce22135a3e5385bfc6b8d31701aef7d5dad25282 - canonicalized_theorem: 86fb7cf305725e7fe097d418ce22135a3e5385bfc6b8d31701aef7d5dad25282 - type_inferenced_theorem: b369199bcd968cc175d6f634bc2de4cb8c73b0addc64ac7b457216bfc955e8fa + initial_ast: 86fb7cf305725e7fe097d418ce22135a3e5385bfc6b8d31701aef7d5dad25282 + canonicalized_ast: 86fb7cf305725e7fe097d418ce22135a3e5385bfc6b8d31701aef7d5dad25282 + type_inferenced_ast: b369199bcd968cc175d6f634bc2de4cb8c73b0addc64ac7b457216bfc955e8fa diff --git a/tests/expectations/compiler/compiler/integers/u32/min.leo.out b/tests/expectations/compiler/compiler/integers/u32/min.leo.out index 797eec3523..78f5fd210e 100644 --- a/tests/expectations/compiler/compiler/integers/u32/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 0f47e2dde68637ea7d0c54a8fcbd2b0cd767e4c35c646154e5519287d3f015ef - canonicalized_theorem: 0f47e2dde68637ea7d0c54a8fcbd2b0cd767e4c35c646154e5519287d3f015ef - type_inferenced_theorem: a94c8bd9f0535c2c705cb6124179a9106c9e75d2a29ef5b704096e37e58b0878 + initial_ast: 0f47e2dde68637ea7d0c54a8fcbd2b0cd767e4c35c646154e5519287d3f015ef + canonicalized_ast: 0f47e2dde68637ea7d0c54a8fcbd2b0cd767e4c35c646154e5519287d3f015ef + type_inferenced_ast: a94c8bd9f0535c2c705cb6124179a9106c9e75d2a29ef5b704096e37e58b0878 diff --git a/tests/expectations/compiler/compiler/integers/u32/mul.leo.out b/tests/expectations/compiler/compiler/integers/u32/mul.leo.out index 6213226fed..4da19d0cd6 100644 --- a/tests/expectations/compiler/compiler/integers/u32/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: ac19676e4ebd9d5aefb5d5baa0fa477a6b4783efc6b1a599c8128259fa7aa55f - canonicalized_theorem: ac19676e4ebd9d5aefb5d5baa0fa477a6b4783efc6b1a599c8128259fa7aa55f - type_inferenced_theorem: 34d947a7132f4fd5693babadabb9c05cab523a6d2bce9dbd7da41ad435ac9702 + initial_ast: ac19676e4ebd9d5aefb5d5baa0fa477a6b4783efc6b1a599c8128259fa7aa55f + canonicalized_ast: ac19676e4ebd9d5aefb5d5baa0fa477a6b4783efc6b1a599c8128259fa7aa55f + type_inferenced_ast: 34d947a7132f4fd5693babadabb9c05cab523a6d2bce9dbd7da41ad435ac9702 diff --git a/tests/expectations/compiler/compiler/integers/u32/ne.leo.out b/tests/expectations/compiler/compiler/integers/u32/ne.leo.out index f427ff1115..cc832fb3e4 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: fb7abac0ceaebcc4f63ab26965fc3a13516faade4b1e0310d69cd8b4deec71a0 - canonicalized_theorem: fb7abac0ceaebcc4f63ab26965fc3a13516faade4b1e0310d69cd8b4deec71a0 - type_inferenced_theorem: 1032259782493fc5d09794722283c912b7c3e7ed2bcf660830e2d5de9f227979 + initial_ast: fb7abac0ceaebcc4f63ab26965fc3a13516faade4b1e0310d69cd8b4deec71a0 + canonicalized_ast: fb7abac0ceaebcc4f63ab26965fc3a13516faade4b1e0310d69cd8b4deec71a0 + type_inferenced_ast: 1032259782493fc5d09794722283c912b7c3e7ed2bcf660830e2d5de9f227979 diff --git a/tests/expectations/compiler/compiler/integers/u32/sub.leo.out b/tests/expectations/compiler/compiler/integers/u32/sub.leo.out index a066f655b7..9c227add1c 100644 --- a/tests/expectations/compiler/compiler/integers/u32/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: f55fe0801c2e593e2599fffd34a89073ff85f9aa462cbfbcd20c0e38e42eaa4d - canonicalized_theorem: f55fe0801c2e593e2599fffd34a89073ff85f9aa462cbfbcd20c0e38e42eaa4d - type_inferenced_theorem: 8640b596fc3d7e4b3999808a51eff9a72422fc02f2ea3b690b62a6ec56e215c0 + initial_ast: f55fe0801c2e593e2599fffd34a89073ff85f9aa462cbfbcd20c0e38e42eaa4d + canonicalized_ast: f55fe0801c2e593e2599fffd34a89073ff85f9aa462cbfbcd20c0e38e42eaa4d + type_inferenced_ast: 8640b596fc3d7e4b3999808a51eff9a72422fc02f2ea3b690b62a6ec56e215c0 diff --git a/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out index d621b38051..b3d0e27ea5 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 348ad049a3930eb4f477d98447b8172cca5d163e320e9774111d739d95017c83 - canonicalized_theorem: 348ad049a3930eb4f477d98447b8172cca5d163e320e9774111d739d95017c83 - type_inferenced_theorem: 7daa91267c1c26560e7e557d7f14d473283c40bf86ffcbff6944d251fb0e1fc5 + initial_ast: 348ad049a3930eb4f477d98447b8172cca5d163e320e9774111d739d95017c83 + canonicalized_ast: 348ad049a3930eb4f477d98447b8172cca5d163e320e9774111d739d95017c83 + type_inferenced_ast: 7daa91267c1c26560e7e557d7f14d473283c40bf86ffcbff6944d251fb0e1fc5 diff --git a/tests/expectations/compiler/compiler/integers/u64/add.leo.out b/tests/expectations/compiler/compiler/integers/u64/add.leo.out index 82d9498853..61f673a7f2 100644 --- a/tests/expectations/compiler/compiler/integers/u64/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: d95c70849974223610dd12a4f9f19e2bb8f5c4e1420cae873a6c49043b7cc9ae - canonicalized_theorem: d95c70849974223610dd12a4f9f19e2bb8f5c4e1420cae873a6c49043b7cc9ae - type_inferenced_theorem: e8eaafd43cafab1cb14addae2196b1d21fc66ce46bedd84580f4654d646bd5de + initial_ast: d95c70849974223610dd12a4f9f19e2bb8f5c4e1420cae873a6c49043b7cc9ae + canonicalized_ast: d95c70849974223610dd12a4f9f19e2bb8f5c4e1420cae873a6c49043b7cc9ae + type_inferenced_ast: e8eaafd43cafab1cb14addae2196b1d21fc66ce46bedd84580f4654d646bd5de diff --git a/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out index 0d6d530fe0..52a21b85fb 100644 --- a/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 1253b2000d11aaa4395514ee30cefe4027f5cda72bf58cc45a4f873ef4832ea3 - canonicalized_theorem: 1253b2000d11aaa4395514ee30cefe4027f5cda72bf58cc45a4f873ef4832ea3 - type_inferenced_theorem: 778f30fa8a0cf65b670c1365a71090c4360bad18d4d7f4e65d60d014c9bf6f44 + initial_ast: 1253b2000d11aaa4395514ee30cefe4027f5cda72bf58cc45a4f873ef4832ea3 + canonicalized_ast: 1253b2000d11aaa4395514ee30cefe4027f5cda72bf58cc45a4f873ef4832ea3 + type_inferenced_ast: 778f30fa8a0cf65b670c1365a71090c4360bad18d4d7f4e65d60d014c9bf6f44 diff --git a/tests/expectations/compiler/compiler/integers/u64/div.leo.out b/tests/expectations/compiler/compiler/integers/u64/div.leo.out index 7091715331..ba72904ddd 100644 --- a/tests/expectations/compiler/compiler/integers/u64/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: e303c8ef226f3d7681188a7b97762123b0a4e6bb420a6b26cd4edba8ba068538 - canonicalized_theorem: e303c8ef226f3d7681188a7b97762123b0a4e6bb420a6b26cd4edba8ba068538 - type_inferenced_theorem: 5f16462ba03f7c86f94bc47e8b0f6996cd72e22a538ac2adc5db52f68162aa40 + initial_ast: e303c8ef226f3d7681188a7b97762123b0a4e6bb420a6b26cd4edba8ba068538 + canonicalized_ast: e303c8ef226f3d7681188a7b97762123b0a4e6bb420a6b26cd4edba8ba068538 + type_inferenced_ast: 5f16462ba03f7c86f94bc47e8b0f6996cd72e22a538ac2adc5db52f68162aa40 diff --git a/tests/expectations/compiler/compiler/integers/u64/eq.leo.out b/tests/expectations/compiler/compiler/integers/u64/eq.leo.out index 6446910fea..707f790ee1 100644 --- a/tests/expectations/compiler/compiler/integers/u64/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: af0deffc16ff4e1b3d07d3e1160e48788ecb1b80563fc43a28d9c89fd85f40b9 - canonicalized_theorem: af0deffc16ff4e1b3d07d3e1160e48788ecb1b80563fc43a28d9c89fd85f40b9 - type_inferenced_theorem: a8fe2f4d446fb7eff91d9f77b638806be0454ae732d6608276f3151a8d4e4921 + initial_ast: af0deffc16ff4e1b3d07d3e1160e48788ecb1b80563fc43a28d9c89fd85f40b9 + canonicalized_ast: af0deffc16ff4e1b3d07d3e1160e48788ecb1b80563fc43a28d9c89fd85f40b9 + type_inferenced_ast: a8fe2f4d446fb7eff91d9f77b638806be0454ae732d6608276f3151a8d4e4921 diff --git a/tests/expectations/compiler/compiler/integers/u64/ge.leo.out b/tests/expectations/compiler/compiler/integers/u64/ge.leo.out index 0d10014816..888845a32b 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ge.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: c6293b8d2605a06f84a32975756d8a7ae7ad6537fc6ed0dedf01c9046f159331 - canonicalized_theorem: c6293b8d2605a06f84a32975756d8a7ae7ad6537fc6ed0dedf01c9046f159331 - type_inferenced_theorem: b594f5f48db0a85abdf9fd0b0f76ca69b5405558e1382dfdaa24fce91513c744 + initial_ast: c6293b8d2605a06f84a32975756d8a7ae7ad6537fc6ed0dedf01c9046f159331 + canonicalized_ast: c6293b8d2605a06f84a32975756d8a7ae7ad6537fc6ed0dedf01c9046f159331 + type_inferenced_ast: b594f5f48db0a85abdf9fd0b0f76ca69b5405558e1382dfdaa24fce91513c744 diff --git a/tests/expectations/compiler/compiler/integers/u64/gt.leo.out b/tests/expectations/compiler/compiler/integers/u64/gt.leo.out index 4ee35f41bc..98c227889f 100644 --- a/tests/expectations/compiler/compiler/integers/u64/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/gt.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: u64_f.in output: registers: {} - initial_theorem: 524f0311db9ed25bfbd275b2b8432619759d34e1e7d3fcdee179fbb6748a03e1 - canonicalized_theorem: cd942d4aa34b649b89e03c308dc28d17e6fbae052382b6e50989b4c6ce600c96 - type_inferenced_theorem: f61e2cdef40c057d782467f2b9ad84e7b2163de25af72c6ed2498e5d4b9517cd + initial_ast: 524f0311db9ed25bfbd275b2b8432619759d34e1e7d3fcdee179fbb6748a03e1 + canonicalized_ast: cd942d4aa34b649b89e03c308dc28d17e6fbae052382b6e50989b4c6ce600c96 + type_inferenced_ast: f61e2cdef40c057d782467f2b9ad84e7b2163de25af72c6ed2498e5d4b9517cd diff --git a/tests/expectations/compiler/compiler/integers/u64/input.leo.out b/tests/expectations/compiler/compiler/integers/u64/input.leo.out index a9f278da01..2c1b6bd0b6 100644 --- a/tests/expectations/compiler/compiler/integers/u64/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: f2efb64bbf451e4e1c7c1e9b24ceb40894b72f1769604c62314b729a9fc75a6e - canonicalized_theorem: f2efb64bbf451e4e1c7c1e9b24ceb40894b72f1769604c62314b729a9fc75a6e - type_inferenced_theorem: bf576998fff80ab652bbcc2aaba9f374650d94c9327d19bc436957360505024b + initial_ast: f2efb64bbf451e4e1c7c1e9b24ceb40894b72f1769604c62314b729a9fc75a6e + canonicalized_ast: f2efb64bbf451e4e1c7c1e9b24ceb40894b72f1769604c62314b729a9fc75a6e + type_inferenced_ast: bf576998fff80ab652bbcc2aaba9f374650d94c9327d19bc436957360505024b diff --git a/tests/expectations/compiler/compiler/integers/u64/le.leo.out b/tests/expectations/compiler/compiler/integers/u64/le.leo.out index 1349cf3349..13bd185de7 100644 --- a/tests/expectations/compiler/compiler/integers/u64/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/le.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: 3b6aa21f4293ef2b0557303f8ba98a62a72afda56be36f9feff58ede48c87aae - canonicalized_theorem: 3b6aa21f4293ef2b0557303f8ba98a62a72afda56be36f9feff58ede48c87aae - type_inferenced_theorem: 854beacb056af4a0e44c2f824467105a8ac4334efd0d2b51e7e09b44ff300d79 + initial_ast: 3b6aa21f4293ef2b0557303f8ba98a62a72afda56be36f9feff58ede48c87aae + canonicalized_ast: 3b6aa21f4293ef2b0557303f8ba98a62a72afda56be36f9feff58ede48c87aae + type_inferenced_ast: 854beacb056af4a0e44c2f824467105a8ac4334efd0d2b51e7e09b44ff300d79 diff --git a/tests/expectations/compiler/compiler/integers/u64/lt.leo.out b/tests/expectations/compiler/compiler/integers/u64/lt.leo.out index cbe9599c32..cbedd2cda9 100644 --- a/tests/expectations/compiler/compiler/integers/u64/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: 1ed483794437131fc09605e7032fecb72d3e3f9534ff26cd4e5b8ac3017609fe - canonicalized_theorem: 1ed483794437131fc09605e7032fecb72d3e3f9534ff26cd4e5b8ac3017609fe - type_inferenced_theorem: eb1c5645868ccde01d29ac0c07986cbb95e021879228d8e14330851de369090c + initial_ast: 1ed483794437131fc09605e7032fecb72d3e3f9534ff26cd4e5b8ac3017609fe + canonicalized_ast: 1ed483794437131fc09605e7032fecb72d3e3f9534ff26cd4e5b8ac3017609fe + type_inferenced_ast: eb1c5645868ccde01d29ac0c07986cbb95e021879228d8e14330851de369090c diff --git a/tests/expectations/compiler/compiler/integers/u64/max.leo.out b/tests/expectations/compiler/compiler/integers/u64/max.leo.out index 31b06230a3..7ad47d005d 100644 --- a/tests/expectations/compiler/compiler/integers/u64/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: b49c4593620c14da622903ba513c21a1d6111c001fb424b7d96be11b354917eb - canonicalized_theorem: b49c4593620c14da622903ba513c21a1d6111c001fb424b7d96be11b354917eb - type_inferenced_theorem: 8b3f84f71975ef760fe9d6eeff136fd8512472ad3abc996adf690d3878b74648 + initial_ast: b49c4593620c14da622903ba513c21a1d6111c001fb424b7d96be11b354917eb + canonicalized_ast: b49c4593620c14da622903ba513c21a1d6111c001fb424b7d96be11b354917eb + type_inferenced_ast: 8b3f84f71975ef760fe9d6eeff136fd8512472ad3abc996adf690d3878b74648 diff --git a/tests/expectations/compiler/compiler/integers/u64/min.leo.out b/tests/expectations/compiler/compiler/integers/u64/min.leo.out index f206485879..a3fccfd66c 100644 --- a/tests/expectations/compiler/compiler/integers/u64/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: e47e8d39fbf56125e94cd55a805a9bbe8c9fbc5098703f4996cd98e693fccd1e - canonicalized_theorem: e47e8d39fbf56125e94cd55a805a9bbe8c9fbc5098703f4996cd98e693fccd1e - type_inferenced_theorem: 6231c1ee6ec45f84e45f21b304beadc0cff11ef5865609e0d495cc6f4bf674df + initial_ast: e47e8d39fbf56125e94cd55a805a9bbe8c9fbc5098703f4996cd98e693fccd1e + canonicalized_ast: e47e8d39fbf56125e94cd55a805a9bbe8c9fbc5098703f4996cd98e693fccd1e + type_inferenced_ast: 6231c1ee6ec45f84e45f21b304beadc0cff11ef5865609e0d495cc6f4bf674df diff --git a/tests/expectations/compiler/compiler/integers/u64/mul.leo.out b/tests/expectations/compiler/compiler/integers/u64/mul.leo.out index f57946f4e9..95b772863a 100644 --- a/tests/expectations/compiler/compiler/integers/u64/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: 065d2d9b6131ac01f764c77939c52ee25cd43f3d770d99662bb02c534ecb4bab - canonicalized_theorem: 065d2d9b6131ac01f764c77939c52ee25cd43f3d770d99662bb02c534ecb4bab - type_inferenced_theorem: aad04434079abde88be6fa0e2cd2426a66f75c2f3c25d6805bb229ab9f94319e + initial_ast: 065d2d9b6131ac01f764c77939c52ee25cd43f3d770d99662bb02c534ecb4bab + canonicalized_ast: 065d2d9b6131ac01f764c77939c52ee25cd43f3d770d99662bb02c534ecb4bab + type_inferenced_ast: aad04434079abde88be6fa0e2cd2426a66f75c2f3c25d6805bb229ab9f94319e diff --git a/tests/expectations/compiler/compiler/integers/u64/ne.leo.out b/tests/expectations/compiler/compiler/integers/u64/ne.leo.out index 52df4b58f4..1789950538 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 61c78cb5e1dca4b8136778b1d937e6468ebbd8e99714c94243640b20053a48f2 - canonicalized_theorem: 61c78cb5e1dca4b8136778b1d937e6468ebbd8e99714c94243640b20053a48f2 - type_inferenced_theorem: bdde4f012730d3fa17cb1708ae04ac483ea8d3b8ecb4b4cef04081bb4a36e277 + initial_ast: 61c78cb5e1dca4b8136778b1d937e6468ebbd8e99714c94243640b20053a48f2 + canonicalized_ast: 61c78cb5e1dca4b8136778b1d937e6468ebbd8e99714c94243640b20053a48f2 + type_inferenced_ast: bdde4f012730d3fa17cb1708ae04ac483ea8d3b8ecb4b4cef04081bb4a36e277 diff --git a/tests/expectations/compiler/compiler/integers/u64/sub.leo.out b/tests/expectations/compiler/compiler/integers/u64/sub.leo.out index 4b051b27f7..7153642a30 100644 --- a/tests/expectations/compiler/compiler/integers/u64/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 51ea52d83e589316bb16309f9422ad9949832077bd036c61ac1f3de873bb2b62 - canonicalized_theorem: 51ea52d83e589316bb16309f9422ad9949832077bd036c61ac1f3de873bb2b62 - type_inferenced_theorem: 3409439c9ba061104e4aa8df5d70283bc7f87fa92076f8a0459660dc8f7f1aed + initial_ast: 51ea52d83e589316bb16309f9422ad9949832077bd036c61ac1f3de873bb2b62 + canonicalized_ast: 51ea52d83e589316bb16309f9422ad9949832077bd036c61ac1f3de873bb2b62 + type_inferenced_ast: 3409439c9ba061104e4aa8df5d70283bc7f87fa92076f8a0459660dc8f7f1aed diff --git a/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out index ede0e73d16..f092d03536 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 9522a94841df58a5171753bc8ca01db576432511995dc5841107314293af41e1 - canonicalized_theorem: 9522a94841df58a5171753bc8ca01db576432511995dc5841107314293af41e1 - type_inferenced_theorem: 8759d4926622054977f1171605a87ff6a1b42fd9ff04c4154f01251bb928834e + initial_ast: 9522a94841df58a5171753bc8ca01db576432511995dc5841107314293af41e1 + canonicalized_ast: 9522a94841df58a5171753bc8ca01db576432511995dc5841107314293af41e1 + type_inferenced_ast: 8759d4926622054977f1171605a87ff6a1b42fd9ff04c4154f01251bb928834e diff --git a/tests/expectations/compiler/compiler/integers/u8/add.leo.out b/tests/expectations/compiler/compiler/integers/u8/add.leo.out index 465b5edc33..e28e85c6b3 100644 --- a/tests/expectations/compiler/compiler/integers/u8/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 46143561de12f971f373f582a5d89ab12cbf3b2e4f05c1f748f9b42a004cd783 - canonicalized_theorem: 46143561de12f971f373f582a5d89ab12cbf3b2e4f05c1f748f9b42a004cd783 - type_inferenced_theorem: e18f8efbb8b287363a35743db48e443093c3e8528da6bdb59769d93272bce295 + initial_ast: 46143561de12f971f373f582a5d89ab12cbf3b2e4f05c1f748f9b42a004cd783 + canonicalized_ast: 46143561de12f971f373f582a5d89ab12cbf3b2e4f05c1f748f9b42a004cd783 + type_inferenced_ast: e18f8efbb8b287363a35743db48e443093c3e8528da6bdb59769d93272bce295 diff --git a/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out index 92223bcd37..190629c870 100644 --- a/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 0fd5c6b2d0a72defe0e73199cc66c2602cecb5bab6432afb11a5cff0da574fac - canonicalized_theorem: 0fd5c6b2d0a72defe0e73199cc66c2602cecb5bab6432afb11a5cff0da574fac - type_inferenced_theorem: 35cd62b7d5e5848a87a7702ca3574b1e525ec44b57a203042ebf2371f6577eb5 + initial_ast: 0fd5c6b2d0a72defe0e73199cc66c2602cecb5bab6432afb11a5cff0da574fac + canonicalized_ast: 0fd5c6b2d0a72defe0e73199cc66c2602cecb5bab6432afb11a5cff0da574fac + type_inferenced_ast: 35cd62b7d5e5848a87a7702ca3574b1e525ec44b57a203042ebf2371f6577eb5 diff --git a/tests/expectations/compiler/compiler/integers/u8/div.leo.out b/tests/expectations/compiler/compiler/integers/u8/div.leo.out index 4a63eda82e..e2af5aacec 100644 --- a/tests/expectations/compiler/compiler/integers/u8/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 14e39ff28ecd780e1cac8d6f6b4d1225837f014233130ad709550fc7771a3191 - canonicalized_theorem: 14e39ff28ecd780e1cac8d6f6b4d1225837f014233130ad709550fc7771a3191 - type_inferenced_theorem: 9773336c82e254fc8bb0df35b41d06ce3cc112dc625bb1f913a2ab712d50336c + initial_ast: 14e39ff28ecd780e1cac8d6f6b4d1225837f014233130ad709550fc7771a3191 + canonicalized_ast: 14e39ff28ecd780e1cac8d6f6b4d1225837f014233130ad709550fc7771a3191 + type_inferenced_ast: 9773336c82e254fc8bb0df35b41d06ce3cc112dc625bb1f913a2ab712d50336c diff --git a/tests/expectations/compiler/compiler/integers/u8/eq.leo.out b/tests/expectations/compiler/compiler/integers/u8/eq.leo.out index 906231a422..09f7fa8a5d 100644 --- a/tests/expectations/compiler/compiler/integers/u8/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 132aa07033dcffd3e2e834e1dcfe34e6b3f1ff80012a9142c39b7fc88aa99174 - canonicalized_theorem: 132aa07033dcffd3e2e834e1dcfe34e6b3f1ff80012a9142c39b7fc88aa99174 - type_inferenced_theorem: 88354ad0bdb4d2f6b762c4cd5545ea532bb545928ad7c15f3f091ca468d809f4 + initial_ast: 132aa07033dcffd3e2e834e1dcfe34e6b3f1ff80012a9142c39b7fc88aa99174 + canonicalized_ast: 132aa07033dcffd3e2e834e1dcfe34e6b3f1ff80012a9142c39b7fc88aa99174 + type_inferenced_ast: 88354ad0bdb4d2f6b762c4cd5545ea532bb545928ad7c15f3f091ca468d809f4 diff --git a/tests/expectations/compiler/compiler/integers/u8/ge.leo.out b/tests/expectations/compiler/compiler/integers/u8/ge.leo.out index 2b9d3e322e..5d0cf91b89 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ge.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 2fbb4f0e49def7c8576b9201a8b0880cdbc7a84cb101ad717b69b49d0cdd69a9 - canonicalized_theorem: 2fbb4f0e49def7c8576b9201a8b0880cdbc7a84cb101ad717b69b49d0cdd69a9 - type_inferenced_theorem: 820a374b48ec40e6c7b27321007465fc235c679dc49c01e383acecb1b64d2574 + initial_ast: 2fbb4f0e49def7c8576b9201a8b0880cdbc7a84cb101ad717b69b49d0cdd69a9 + canonicalized_ast: 2fbb4f0e49def7c8576b9201a8b0880cdbc7a84cb101ad717b69b49d0cdd69a9 + type_inferenced_ast: 820a374b48ec40e6c7b27321007465fc235c679dc49c01e383acecb1b64d2574 diff --git a/tests/expectations/compiler/compiler/integers/u8/gt.leo.out b/tests/expectations/compiler/compiler/integers/u8/gt.leo.out index 8422eff2c7..1cd2419f25 100644 --- a/tests/expectations/compiler/compiler/integers/u8/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/gt.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: u8_f.in output: registers: {} - initial_theorem: c5690d672e1ed1d36f698ee7f2cdd39d3dbb190c899435de7b4a71eb2f3d125c - canonicalized_theorem: 6eb02fba96f74190b7aacdea8da5eb00964cb25d93e89aff4b0f047d7239a704 - type_inferenced_theorem: 446a1de27bf2d3927b4bfcfcd65817cecf8a95c9e09b17901fb283e05ce9a82f + initial_ast: c5690d672e1ed1d36f698ee7f2cdd39d3dbb190c899435de7b4a71eb2f3d125c + canonicalized_ast: 6eb02fba96f74190b7aacdea8da5eb00964cb25d93e89aff4b0f047d7239a704 + type_inferenced_ast: 446a1de27bf2d3927b4bfcfcd65817cecf8a95c9e09b17901fb283e05ce9a82f diff --git a/tests/expectations/compiler/compiler/integers/u8/input.leo.out b/tests/expectations/compiler/compiler/integers/u8/input.leo.out index 83e360bd40..5d774835b4 100644 --- a/tests/expectations/compiler/compiler/integers/u8/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 41cd9d639298b0dd1c84b8fdcb624a12b6fabade022c97738d19e8cdd4796956 - canonicalized_theorem: 41cd9d639298b0dd1c84b8fdcb624a12b6fabade022c97738d19e8cdd4796956 - type_inferenced_theorem: ed93dbc932db00cbbf765f2908bc27860780102a3a884c6684c91abc3d1ca4d0 + initial_ast: 41cd9d639298b0dd1c84b8fdcb624a12b6fabade022c97738d19e8cdd4796956 + canonicalized_ast: 41cd9d639298b0dd1c84b8fdcb624a12b6fabade022c97738d19e8cdd4796956 + type_inferenced_ast: ed93dbc932db00cbbf765f2908bc27860780102a3a884c6684c91abc3d1ca4d0 diff --git a/tests/expectations/compiler/compiler/integers/u8/le.leo.out b/tests/expectations/compiler/compiler/integers/u8/le.leo.out index 66928ce408..14ac84b05f 100644 --- a/tests/expectations/compiler/compiler/integers/u8/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/le.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: aeaa0daf3457c8c5425b98f0ee5ce1818062b3e319237a1a2f3060f5f76593d9 - canonicalized_theorem: aeaa0daf3457c8c5425b98f0ee5ce1818062b3e319237a1a2f3060f5f76593d9 - type_inferenced_theorem: 670d28a03f291083985c74c5f5e6aab6dff9e481443ceae2fce033dc9df03c83 + initial_ast: aeaa0daf3457c8c5425b98f0ee5ce1818062b3e319237a1a2f3060f5f76593d9 + canonicalized_ast: aeaa0daf3457c8c5425b98f0ee5ce1818062b3e319237a1a2f3060f5f76593d9 + type_inferenced_ast: 670d28a03f291083985c74c5f5e6aab6dff9e481443ceae2fce033dc9df03c83 diff --git a/tests/expectations/compiler/compiler/integers/u8/lt.leo.out b/tests/expectations/compiler/compiler/integers/u8/lt.leo.out index 5cf8f28621..175ef6b0b4 100644 --- a/tests/expectations/compiler/compiler/integers/u8/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: 6053db7befe79c361e783fdf841d7955b78b0b5cea6aa82de8ba15de73943927 - canonicalized_theorem: 6053db7befe79c361e783fdf841d7955b78b0b5cea6aa82de8ba15de73943927 - type_inferenced_theorem: 097e4cc4579f4298a73e5f65283dc92792b75c4c1a542456523d949344cb17f6 + initial_ast: 6053db7befe79c361e783fdf841d7955b78b0b5cea6aa82de8ba15de73943927 + canonicalized_ast: 6053db7befe79c361e783fdf841d7955b78b0b5cea6aa82de8ba15de73943927 + type_inferenced_ast: 097e4cc4579f4298a73e5f65283dc92792b75c4c1a542456523d949344cb17f6 diff --git a/tests/expectations/compiler/compiler/integers/u8/max.leo.out b/tests/expectations/compiler/compiler/integers/u8/max.leo.out index 826d22a626..0fe0295311 100644 --- a/tests/expectations/compiler/compiler/integers/u8/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: c76876fb75e6a86c9f75dee04598fd43dc6ab73e62c92fd4ae8cb0f58d4eaf35 - canonicalized_theorem: c76876fb75e6a86c9f75dee04598fd43dc6ab73e62c92fd4ae8cb0f58d4eaf35 - type_inferenced_theorem: 3bd166f8a614dca66a55c11e8a88e45c8ec836746fdb18c2b28cd8c19a98fd6f + initial_ast: c76876fb75e6a86c9f75dee04598fd43dc6ab73e62c92fd4ae8cb0f58d4eaf35 + canonicalized_ast: c76876fb75e6a86c9f75dee04598fd43dc6ab73e62c92fd4ae8cb0f58d4eaf35 + type_inferenced_ast: 3bd166f8a614dca66a55c11e8a88e45c8ec836746fdb18c2b28cd8c19a98fd6f diff --git a/tests/expectations/compiler/compiler/integers/u8/min.leo.out b/tests/expectations/compiler/compiler/integers/u8/min.leo.out index edff17f4b1..51d92ce45c 100644 --- a/tests/expectations/compiler/compiler/integers/u8/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 88343847b6fce997c39196a99ea382fdd560e804a04363efa75fff7aa9632550 - canonicalized_theorem: 88343847b6fce997c39196a99ea382fdd560e804a04363efa75fff7aa9632550 - type_inferenced_theorem: 2ab03d470fda1fb7747fd1868113bf107f90ad4a5e578763475d08d0127df37f + initial_ast: 88343847b6fce997c39196a99ea382fdd560e804a04363efa75fff7aa9632550 + canonicalized_ast: 88343847b6fce997c39196a99ea382fdd560e804a04363efa75fff7aa9632550 + type_inferenced_ast: 2ab03d470fda1fb7747fd1868113bf107f90ad4a5e578763475d08d0127df37f diff --git a/tests/expectations/compiler/compiler/integers/u8/mul.leo.out b/tests/expectations/compiler/compiler/integers/u8/mul.leo.out index c70819519c..4928a6fcd0 100644 --- a/tests/expectations/compiler/compiler/integers/u8/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: bd3039edc007709bcb436aa637183ad209cfe911e664630a51164fb816e0457c - canonicalized_theorem: bd3039edc007709bcb436aa637183ad209cfe911e664630a51164fb816e0457c - type_inferenced_theorem: bd4154abb8f63cc329ca278d8d1d881396439f9fc0e0b1824b453b648a9a95a8 + initial_ast: bd3039edc007709bcb436aa637183ad209cfe911e664630a51164fb816e0457c + canonicalized_ast: bd3039edc007709bcb436aa637183ad209cfe911e664630a51164fb816e0457c + type_inferenced_ast: bd4154abb8f63cc329ca278d8d1d881396439f9fc0e0b1824b453b648a9a95a8 diff --git a/tests/expectations/compiler/compiler/integers/u8/ne.leo.out b/tests/expectations/compiler/compiler/integers/u8/ne.leo.out index 37cfd4ceb6..cb91f4c036 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 0ab5c6b9b456638bc02751352328eddb194c0823c5d2861fbef8b4bc5c15d2cd - canonicalized_theorem: 0ab5c6b9b456638bc02751352328eddb194c0823c5d2861fbef8b4bc5c15d2cd - type_inferenced_theorem: 03cb77b44cd5a28632d0f203c9354af48f104390262dd58fe2ef10929f3a1e5d + initial_ast: 0ab5c6b9b456638bc02751352328eddb194c0823c5d2861fbef8b4bc5c15d2cd + canonicalized_ast: 0ab5c6b9b456638bc02751352328eddb194c0823c5d2861fbef8b4bc5c15d2cd + type_inferenced_ast: 03cb77b44cd5a28632d0f203c9354af48f104390262dd58fe2ef10929f3a1e5d diff --git a/tests/expectations/compiler/compiler/integers/u8/sub.leo.out b/tests/expectations/compiler/compiler/integers/u8/sub.leo.out index b9f8488d36..e2f9e50e16 100644 --- a/tests/expectations/compiler/compiler/integers/u8/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 8ff67855790ac3e64c77531a999f06a2546567754204428dfb3d8519f9575678 - canonicalized_theorem: 8ff67855790ac3e64c77531a999f06a2546567754204428dfb3d8519f9575678 - type_inferenced_theorem: 6ad282b40daaae8a4b96531c8a467f189157270bffb31ed07f7ba786b5543ab9 + initial_ast: 8ff67855790ac3e64c77531a999f06a2546567754204428dfb3d8519f9575678 + canonicalized_ast: 8ff67855790ac3e64c77531a999f06a2546567754204428dfb3d8519f9575678 + type_inferenced_ast: 6ad282b40daaae8a4b96531c8a467f189157270bffb31ed07f7ba786b5543ab9 diff --git a/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out index fac3dacd24..7e9a221f24 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 3a52d53376039a10517157e2c8f25287b85b50f9c46b59b914e417186e8fb245 - canonicalized_theorem: 3a52d53376039a10517157e2c8f25287b85b50f9c46b59b914e417186e8fb245 - type_inferenced_theorem: 643e93414412b4d6a5b20cc6490f119d277ce6afaedb948247ce028cf9f9b68b + initial_ast: 3a52d53376039a10517157e2c8f25287b85b50f9c46b59b914e417186e8fb245 + canonicalized_ast: 3a52d53376039a10517157e2c8f25287b85b50f9c46b59b914e417186e8fb245 + type_inferenced_ast: 643e93414412b4d6a5b20cc6490f119d277ce6afaedb948247ce028cf9f9b68b diff --git a/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out index b5b9a2b97c..4345fe734b 100644 --- a/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: "[u32; 3]" value: "\"150\"" - initial_theorem: e040115f45af0248976ed3dfbf9c3440d73005c2fa62ee12199298f5e375c14f - canonicalized_theorem: 9b095b10f8f9c8538cfa8a371cd23e1abbac7385df1ef3ef9b4d0a13ae122335 - type_inferenced_theorem: eb4f4325a50b1c5a5e3ab7b89ec2a19a6dd9e3cab55005540ed61206e439b737 + initial_ast: e040115f45af0248976ed3dfbf9c3440d73005c2fa62ee12199298f5e375c14f + canonicalized_ast: 9b095b10f8f9c8538cfa8a371cd23e1abbac7385df1ef3ef9b4d0a13ae122335 + type_inferenced_ast: eb4f4325a50b1c5a5e3ab7b89ec2a19a6dd9e3cab55005540ed61206e439b737 diff --git a/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out b/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out index 68294e3dee..abb56b0a4f 100644 --- a/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: "[(u32, u32); 3]" value: "\"(1, 1)(2, 2)(0, 1)\"" - initial_theorem: fb18710f2c196b07de8bf83e68dfe03d41241ddf7c407bc10780dd1fa19c4cc2 - canonicalized_theorem: fb18710f2c196b07de8bf83e68dfe03d41241ddf7c407bc10780dd1fa19c4cc2 - type_inferenced_theorem: 65df378f0e3f7b77b83d197dd2d8bfc78b9091a2f1d92629e6956d0f4e96ef06 + initial_ast: fb18710f2c196b07de8bf83e68dfe03d41241ddf7c407bc10780dd1fa19c4cc2 + canonicalized_ast: fb18710f2c196b07de8bf83e68dfe03d41241ddf7c407bc10780dd1fa19c4cc2 + type_inferenced_ast: 65df378f0e3f7b77b83d197dd2d8bfc78b9091a2f1d92629e6956d0f4e96ef06 diff --git a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out index 16fc82dc0c..25a649b061 100644 --- a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 9f12a9096f69d21c58c4605d81f237d47e45b31cd76e0e774d952861223b6ce5 - canonicalized_theorem: 9f12a9096f69d21c58c4605d81f237d47e45b31cd76e0e774d952861223b6ce5 - type_inferenced_theorem: e938979bb8701986dec52ecca670054ddeb988500ec62018f36e2f9db23b7e3f + initial_ast: 9f12a9096f69d21c58c4605d81f237d47e45b31cd76e0e774d952861223b6ce5 + canonicalized_ast: 9f12a9096f69d21c58c4605d81f237d47e45b31cd76e0e774d952861223b6ce5 + type_inferenced_ast: e938979bb8701986dec52ecca670054ddeb988500ec62018f36e2f9db23b7e3f diff --git a/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out index d416f58f76..e7799a32f1 100644 --- a/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 87d5f27ec3dd5c4f9a338186e40021725b7b55b70447164dcb85452b06e2afdb - canonicalized_theorem: 87d5f27ec3dd5c4f9a338186e40021725b7b55b70447164dcb85452b06e2afdb - type_inferenced_theorem: 257f0fe5d7f985ed49cbc0e8b7501d71433d4dbc401cf746d30e7fde337771a2 + initial_ast: 87d5f27ec3dd5c4f9a338186e40021725b7b55b70447164dcb85452b06e2afdb + canonicalized_ast: 87d5f27ec3dd5c4f9a338186e40021725b7b55b70447164dcb85452b06e2afdb + type_inferenced_ast: 257f0fe5d7f985ed49cbc0e8b7501d71433d4dbc401cf746d30e7fde337771a2 diff --git a/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out index 4cb2ef663a..9d3bf1ac13 100644 --- a/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: a0bdf5a95e0938c0493418f2280d7d9a6c7f484f8c0a16bb262d06364ecedcf6 - canonicalized_theorem: a0bdf5a95e0938c0493418f2280d7d9a6c7f484f8c0a16bb262d06364ecedcf6 - type_inferenced_theorem: 463c1646c892aadb9b851fb8d73a749183a404ff74c4c7470718b9a4fb95e1a4 + initial_ast: a0bdf5a95e0938c0493418f2280d7d9a6c7f484f8c0a16bb262d06364ecedcf6 + canonicalized_ast: a0bdf5a95e0938c0493418f2280d7d9a6c7f484f8c0a16bb262d06364ecedcf6 + type_inferenced_ast: 463c1646c892aadb9b851fb8d73a749183a404ff74c4c7470718b9a4fb95e1a4 diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out index 1215071588..2d3b7e3ad2 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: 09811b7139b1e3d054587ec093048299a1f7d9788b0231d933a357a8cb2074d2 - canonicalized_theorem: 884e0994056c967adad5f7ffbd296836ecd2628ab74b68bd2702269afab56177 - type_inferenced_theorem: 90820536767ea35ea4ce32dcbee1c7d290deb14475ef019a8c6c690df21f8dc1 + initial_ast: 09811b7139b1e3d054587ec093048299a1f7d9788b0231d933a357a8cb2074d2 + canonicalized_ast: 884e0994056c967adad5f7ffbd296836ecd2628ab74b68bd2702269afab56177 + type_inferenced_ast: 90820536767ea35ea4ce32dcbee1c7d290deb14475ef019a8c6c690df21f8dc1 diff --git a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out index 9f96a4f0b7..e5de731da7 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: ddc8a4de9bd1763a20e5b54638eeb794e8f7d21d3f7f1be7ebaf9fcdc1cddf5a - canonicalized_theorem: ddc8a4de9bd1763a20e5b54638eeb794e8f7d21d3f7f1be7ebaf9fcdc1cddf5a - type_inferenced_theorem: 99c9a07da06e125a6fc44693772a5d9aacbd38319c9f44e37b47f4e2e1b65c56 + initial_ast: ddc8a4de9bd1763a20e5b54638eeb794e8f7d21d3f7f1be7ebaf9fcdc1cddf5a + canonicalized_ast: ddc8a4de9bd1763a20e5b54638eeb794e8f7d21d3f7f1be7ebaf9fcdc1cddf5a + type_inferenced_ast: 99c9a07da06e125a6fc44693772a5d9aacbd38319c9f44e37b47f4e2e1b65c56 diff --git a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out index 2902194b6c..7d2fefcc76 100644 --- a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: a9207ae29648b97abbe861a05cd15c12ab0172f9e603d5a1a456cd8fa58ffa58 - canonicalized_theorem: 355e3102cfb3505224a3bebb9b45e592c7bc63cb192f3252d2797019f2a98b55 - type_inferenced_theorem: ab2e29b1be43c0eded824789ecf869308ef3a88fa4a9c88dabf321f66b3793f4 + initial_ast: a9207ae29648b97abbe861a05cd15c12ab0172f9e603d5a1a456cd8fa58ffa58 + canonicalized_ast: 355e3102cfb3505224a3bebb9b45e592c7bc63cb192f3252d2797019f2a98b55 + type_inferenced_ast: ab2e29b1be43c0eded824789ecf869308ef3a88fa4a9c88dabf321f66b3793f4 diff --git a/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out b/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out index c23c0093fe..3918a78e16 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: e56a274a8a6081b07198b7562c14249df37e45aac1ed6c122da737325282b8ff - canonicalized_theorem: e56a274a8a6081b07198b7562c14249df37e45aac1ed6c122da737325282b8ff - type_inferenced_theorem: 6777bfacec09af0204e90fc2a071172451ff22dfbdadbf0854c593f18adb04f7 + initial_ast: e56a274a8a6081b07198b7562c14249df37e45aac1ed6c122da737325282b8ff + canonicalized_ast: e56a274a8a6081b07198b7562c14249df37e45aac1ed6c122da737325282b8ff + type_inferenced_ast: 6777bfacec09af0204e90fc2a071172451ff22dfbdadbf0854c593f18adb04f7 diff --git a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out index 7ca5fae992..3c3defa3fe 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: b61356db00ef2217c5c933775a7084d14ace8a2217711dea31f787ec2ab6d556 - canonicalized_theorem: b61356db00ef2217c5c933775a7084d14ace8a2217711dea31f787ec2ab6d556 - type_inferenced_theorem: 17602e0e37607962b5551471e898481671ac1771e6aa5993cf2e0959617f5397 + initial_ast: b61356db00ef2217c5c933775a7084d14ace8a2217711dea31f787ec2ab6d556 + canonicalized_ast: b61356db00ef2217c5c933775a7084d14ace8a2217711dea31f787ec2ab6d556 + type_inferenced_ast: 17602e0e37607962b5551471e898481671ac1771e6aa5993cf2e0959617f5397 diff --git a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out index 5a45a3689e..85bbc1b76e 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_theorem: f061374b47c64a1f6649d5d64d3b8a64bb295d396912bade8bfd2cc2f609c442 - canonicalized_theorem: f061374b47c64a1f6649d5d64d3b8a64bb295d396912bade8bfd2cc2f609c442 - type_inferenced_theorem: 8f4dd4f3e9fd63f3ef225a58252d97591f753ffef71bb21c7d6e8596ad0f5a15 + initial_ast: f061374b47c64a1f6649d5d64d3b8a64bb295d396912bade8bfd2cc2f609c442 + canonicalized_ast: f061374b47c64a1f6649d5d64d3b8a64bb295d396912bade8bfd2cc2f609c442 + type_inferenced_ast: 8f4dd4f3e9fd63f3ef225a58252d97591f753ffef71bb21c7d6e8596ad0f5a15 diff --git a/tests/expectations/compiler/compiler/mutability/swap.leo.out b/tests/expectations/compiler/compiler/mutability/swap.leo.out index 0661cd7dee..49d15ca400 100644 --- a/tests/expectations/compiler/compiler/mutability/swap.leo.out +++ b/tests/expectations/compiler/compiler/mutability/swap.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_theorem: 17828ff8ffc7902cfe67b7816477cf3099c248f7fde312a9792dd311814340c6 - canonicalized_theorem: 17828ff8ffc7902cfe67b7816477cf3099c248f7fde312a9792dd311814340c6 - type_inferenced_theorem: be55144bf090bcfc6d49170844c89b067b224b241fd953b0b683c70b91baaad4 + initial_ast: 17828ff8ffc7902cfe67b7816477cf3099c248f7fde312a9792dd311814340c6 + canonicalized_ast: 17828ff8ffc7902cfe67b7816477cf3099c248f7fde312a9792dd311814340c6 + type_inferenced_ast: be55144bf090bcfc6d49170844c89b067b224b241fd953b0b683c70b91baaad4 diff --git a/tests/expectations/compiler/compiler/statements/block.leo.out b/tests/expectations/compiler/compiler/statements/block.leo.out index e127588d65..4f83d727c2 100644 --- a/tests/expectations/compiler/compiler/statements/block.leo.out +++ b/tests/expectations/compiler/compiler/statements/block.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_theorem: e5ab0d37ae2e0839f9f513f018e8f05fe6f6141962724fb0d84768abb4f155f2 - canonicalized_theorem: 931832fc13e7bbb57ce4a867681cd5c746a5d6bec1eea051e1464b4030f746f4 - type_inferenced_theorem: 932fe676b3460ab2a209d0b5e40359f8fd5e1d603bac1de5a2254eb83b2e1b39 + initial_ast: e5ab0d37ae2e0839f9f513f018e8f05fe6f6141962724fb0d84768abb4f155f2 + canonicalized_ast: 931832fc13e7bbb57ce4a867681cd5c746a5d6bec1eea051e1464b4030f746f4 + type_inferenced_ast: 932fe676b3460ab2a209d0b5e40359f8fd5e1d603bac1de5a2254eb83b2e1b39 diff --git a/tests/expectations/compiler/compiler/statements/chain.leo.out b/tests/expectations/compiler/compiler/statements/chain.leo.out index 18f6c1efa5..96f9d6fee1 100644 --- a/tests/expectations/compiler/compiler/statements/chain.leo.out +++ b/tests/expectations/compiler/compiler/statements/chain.leo.out @@ -28,6 +28,6 @@ outputs: a: type: bool value: "false" - initial_theorem: 2f84a632ff69e9e18a46b5b8f82b9b3fa66d63c5ceab6edbf034c9388ea0f787 - canonicalized_theorem: 2f84a632ff69e9e18a46b5b8f82b9b3fa66d63c5ceab6edbf034c9388ea0f787 - type_inferenced_theorem: feaa875ce4b50aa1d73b92c9bbada7f048bf5db7e0653f46507baacea68a7e30 + initial_ast: 2f84a632ff69e9e18a46b5b8f82b9b3fa66d63c5ceab6edbf034c9388ea0f787 + canonicalized_ast: 2f84a632ff69e9e18a46b5b8f82b9b3fa66d63c5ceab6edbf034c9388ea0f787 + type_inferenced_ast: feaa875ce4b50aa1d73b92c9bbada7f048bf5db7e0653f46507baacea68a7e30 diff --git a/tests/expectations/compiler/compiler/statements/compound_assignment.leo.out b/tests/expectations/compiler/compiler/statements/compound_assignment.leo.out new file mode 100644 index 0000000000..a791a74ca9 --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/compound_assignment.leo.out @@ -0,0 +1,21 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 9 + num_constraints: 9 + at: cfc27ce5fe57455170b7873e5ff2eb5f8f997fc5fc62faad746879e0b78608b0 + bt: 6fde8d6341a34a59e776a14fd2071105f796edd8743b718e9d4d7eeab31f5eea + ct: 95d15e75300129c5b4dd7f324bec76f91976db7c7b6075f942e9ea82b243e0b3 + output: + - input_file: inputs/dummy.in + output: + registers: + r0: + type: bool + value: "true" + initial_ast: cac8070caf7819b61e0f1d5fc3557c76957acb69e958b6cdfc793c416f0b9fd0 + canonicalized_ast: e678afe5d42eb07b14965803f080cbda55b8c01f65ddf417367a75949223a27f + type_inferenced_ast: c100f9c558b94b2c89b78da4867e2ed5e6bc4de8ec6f3218d64c26ba9c73b428 diff --git a/tests/expectations/compiler/compiler/statements/for_loop.leo.out b/tests/expectations/compiler/compiler/statements/for_loop.leo.out index b0140ed1e3..4cedf331b1 100644 --- a/tests/expectations/compiler/compiler/statements/for_loop.leo.out +++ b/tests/expectations/compiler/compiler/statements/for_loop.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_theorem: 8374ac96fbf6d918998ebe6ccb88842f2141efbc721314ff1b98a6e57c30ac8c - canonicalized_theorem: 031149b98d685b26166d621c2206142438479414eeae8db5f92927aabca5d684 - type_inferenced_theorem: 94959ec2fc0be13f8943a54261f6c23c6585773bc14936ee68a3f7289cc8bd26 + initial_ast: 8374ac96fbf6d918998ebe6ccb88842f2141efbc721314ff1b98a6e57c30ac8c + canonicalized_ast: 031149b98d685b26166d621c2206142438479414eeae8db5f92927aabca5d684 + type_inferenced_ast: 94959ec2fc0be13f8943a54261f6c23c6585773bc14936ee68a3f7289cc8bd26 diff --git a/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out b/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out index d12ed2d8a0..18852b93e4 100644 --- a/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out +++ b/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_theorem: 2af258377cc5af8e1bed75bed8dd57d2ecb969f71b8081a321a946df782ead97 - canonicalized_theorem: 8733ab382dd7d3d506f999dd6b34442200e447cb530cc6d8115da6267b176f2e - type_inferenced_theorem: 6f4c12b70f5fb244fbca65cb32e68c88ced6bf289afb7b1639257bb8de9a4bbb + initial_ast: 2af258377cc5af8e1bed75bed8dd57d2ecb969f71b8081a321a946df782ead97 + canonicalized_ast: 8733ab382dd7d3d506f999dd6b34442200e447cb530cc6d8115da6267b176f2e + type_inferenced_ast: 6f4c12b70f5fb244fbca65cb32e68c88ced6bf289afb7b1639257bb8de9a4bbb diff --git a/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out b/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out index 053c6caeae..0bd6e7c478 100644 --- a/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out +++ b/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_theorem: 5223011087228b526071851038df390424ca442c4b21e0001cdf14bf8c63cf2c - canonicalized_theorem: ab0a3a3caa5250c522c9eaa4b4bee5e36c179f856b02c2cdf94b4798344daf3d - type_inferenced_theorem: 5825d1694362e1dab8710cbfa4feb608f968a98052a01fa36c152e06c1bd2cc4 + initial_ast: 5223011087228b526071851038df390424ca442c4b21e0001cdf14bf8c63cf2c + canonicalized_ast: ab0a3a3caa5250c522c9eaa4b4bee5e36c179f856b02c2cdf94b4798344daf3d + type_inferenced_ast: 5825d1694362e1dab8710cbfa4feb608f968a98052a01fa36c152e06c1bd2cc4 diff --git a/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out b/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out index f9450b88cc..4522880b93 100644 --- a/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out +++ b/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out @@ -22,6 +22,6 @@ outputs: a: type: bool value: "false" - initial_theorem: e4b9f8c53d1d5cce1f00b2674448d42cd5bfb229a2544df0f2e996da2847e27e - canonicalized_theorem: e4b9f8c53d1d5cce1f00b2674448d42cd5bfb229a2544df0f2e996da2847e27e - type_inferenced_theorem: 3d4a4e67e5ad7adcd189537ed085a4d894115cfaa0f0afb0cd764f2d28355f81 + initial_ast: e4b9f8c53d1d5cce1f00b2674448d42cd5bfb229a2544df0f2e996da2847e27e + canonicalized_ast: e4b9f8c53d1d5cce1f00b2674448d42cd5bfb229a2544df0f2e996da2847e27e + type_inferenced_ast: 3d4a4e67e5ad7adcd189537ed085a4d894115cfaa0f0afb0cd764f2d28355f81 diff --git a/tests/expectations/compiler/compiler/statements/mutate.leo.out b/tests/expectations/compiler/compiler/statements/mutate.leo.out index 423bd46171..43c1e52419 100644 --- a/tests/expectations/compiler/compiler/statements/mutate.leo.out +++ b/tests/expectations/compiler/compiler/statements/mutate.leo.out @@ -22,6 +22,6 @@ outputs: a: type: bool value: "true" - initial_theorem: 5bc9151ccd030d4ae8248850c22ba9abef2d3b0c77c8b4658b595ce63a0e3461 - canonicalized_theorem: 5bc9151ccd030d4ae8248850c22ba9abef2d3b0c77c8b4658b595ce63a0e3461 - type_inferenced_theorem: 0aedd29433a0d5f90ec29a5b8571bf124d2cf98687e7ef11e0ae2576508540f3 + initial_ast: 5bc9151ccd030d4ae8248850c22ba9abef2d3b0c77c8b4658b595ce63a0e3461 + canonicalized_ast: 5bc9151ccd030d4ae8248850c22ba9abef2d3b0c77c8b4658b595ce63a0e3461 + type_inferenced_ast: 0aedd29433a0d5f90ec29a5b8571bf124d2cf98687e7ef11e0ae2576508540f3 diff --git a/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out b/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out index 8f9f607451..0e56fe14c8 100644 --- a/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out +++ b/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out @@ -28,6 +28,6 @@ outputs: a: type: bool value: "false" - initial_theorem: 72f7d405df7dc1f8a399bac21756cac5bad2bfa74d4cf508f385f6e6427cdc7e - canonicalized_theorem: 674f7e3c3389d726c338b9af92d7e9492a69573573a7e890e92a35696d7fd6da - type_inferenced_theorem: eb4035f253dd5c6f3d49aa6cf329d65e8cf7cee52bb12d673bae89fbd8e38dfa + initial_ast: 72f7d405df7dc1f8a399bac21756cac5bad2bfa74d4cf508f385f6e6427cdc7e + canonicalized_ast: 674f7e3c3389d726c338b9af92d7e9492a69573573a7e890e92a35696d7fd6da + type_inferenced_ast: eb4035f253dd5c6f3d49aa6cf329d65e8cf7cee52bb12d673bae89fbd8e38dfa diff --git a/tests/expectations/compiler/compiler/string/circuit.leo.out b/tests/expectations/compiler/compiler/string/circuit.leo.out index c16f5c57b9..b607e80f47 100644 --- a/tests/expectations/compiler/compiler/string/circuit.leo.out +++ b/tests/expectations/compiler/compiler/string/circuit.leo.out @@ -16,6 +16,6 @@ outputs: out: type: "[char; 13]" value: "\"Hello, World!\"" - initial_theorem: 69219c995852ced5fe06a4009c4d58a8b59cc23ed7144ab4f08d4e0d4a6c5798 - canonicalized_theorem: c099eab8cd118203aa297b200be1fd331f6e20ed1f19ff87efe16d406f5a0ce0 - type_inferenced_theorem: acef5428f299c6cdbd9ac4b644123cf17a379efe025656122e359abe06da7eb8 + initial_ast: 69219c995852ced5fe06a4009c4d58a8b59cc23ed7144ab4f08d4e0d4a6c5798 + canonicalized_ast: c099eab8cd118203aa297b200be1fd331f6e20ed1f19ff87efe16d406f5a0ce0 + type_inferenced_ast: acef5428f299c6cdbd9ac4b644123cf17a379efe025656122e359abe06da7eb8 diff --git a/tests/expectations/compiler/compiler/string/equality.leo.out b/tests/expectations/compiler/compiler/string/equality.leo.out index 7901b0e24c..2795b2d234 100644 --- a/tests/expectations/compiler/compiler/string/equality.leo.out +++ b/tests/expectations/compiler/compiler/string/equality.leo.out @@ -22,6 +22,6 @@ outputs: out: type: bool value: "false" - initial_theorem: 62916b502a7017356bd5fbb6527ff51d6a5a57aeb55ed87754157ce8cad41341 - canonicalized_theorem: b0299b9f1ec6927a101d4385a49b69ca9ab542699a9ab6c56024e75e5b034277 - type_inferenced_theorem: 3643e1338fdf04fa531a63b596b26a0225c7a19f67eb600a787918e9fee30db0 + initial_ast: 62916b502a7017356bd5fbb6527ff51d6a5a57aeb55ed87754157ce8cad41341 + canonicalized_ast: b0299b9f1ec6927a101d4385a49b69ca9ab542699a9ab6c56024e75e5b034277 + type_inferenced_ast: 3643e1338fdf04fa531a63b596b26a0225c7a19f67eb600a787918e9fee30db0 diff --git a/tests/expectations/compiler/compiler/string/replace.leo.out b/tests/expectations/compiler/compiler/string/replace.leo.out index a60b943928..4ffc21ed0c 100644 --- a/tests/expectations/compiler/compiler/string/replace.leo.out +++ b/tests/expectations/compiler/compiler/string/replace.leo.out @@ -22,6 +22,6 @@ outputs: out: type: bool value: "true" - initial_theorem: 6c161515e03a95ab1eba6e94a0de9bdd6f85750a99000f66a2c6c518179c6dc0 - canonicalized_theorem: c3d2fe2a37ba42e8423d571232ddc1c745c934f3772e3abf4a317816497c73f2 - type_inferenced_theorem: 80cfa7238e4a4ed1f05cc5a5c97a00f5c7db1eee377107d4f92830d41e17233d + initial_ast: 6c161515e03a95ab1eba6e94a0de9bdd6f85750a99000f66a2c6c518179c6dc0 + canonicalized_ast: c3d2fe2a37ba42e8423d571232ddc1c745c934f3772e3abf4a317816497c73f2 + type_inferenced_ast: 80cfa7238e4a4ed1f05cc5a5c97a00f5c7db1eee377107d4f92830d41e17233d diff --git a/tests/expectations/compiler/compiler/string/string_transformation.leo.out b/tests/expectations/compiler/compiler/string/string_transformation.leo.out new file mode 100644 index 0000000000..2bb9dc0ad1 --- /dev/null +++ b/tests/expectations/compiler/compiler/string/string_transformation.leo.out @@ -0,0 +1,21 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 9 + num_constraints: 7 + at: 5f4cfa276f9e316a42c9292a4f149fcf3c301a4ca3dc14112b7d59e8ef1e002c + bt: c728f18e4b654023c5189f382573af92682099ed5c7c08e706604e6f1cb7d72d + ct: 74aca434b2a72f7215a0dbe138b708fb2c2857d95dc3bc4776903c90d5f47bb9 + output: + - input_file: inputs/two.in + output: + registers: + out: + type: bool + value: "true" + initial_ast: 1dc757170332a649227f9b9af6dbfa0c2ecce9040ea6502fb71ee686c956cea5 + canonicalized_ast: 141842a220878194dd91d273691f940685bd44366a8cedb21dfbd67770eb13c9 + type_inferenced_ast: e8c7b68d6db9eb8dd9884f381fac90fe4da9bcbce255f8159a80028fec0c1297 diff --git a/tests/expectations/compiler/compiler/tuples/access.leo.out b/tests/expectations/compiler/compiler/tuples/access.leo.out index 536aea8c45..7bf2f5f6fb 100644 --- a/tests/expectations/compiler/compiler/tuples/access.leo.out +++ b/tests/expectations/compiler/compiler/tuples/access.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "false" - initial_theorem: 02efc1a786611a1cb0fa0e03d86c4d4f8cb3e54c8a6d7815505272447ceef122 - canonicalized_theorem: 02efc1a786611a1cb0fa0e03d86c4d4f8cb3e54c8a6d7815505272447ceef122 - type_inferenced_theorem: f1fceaf70ce698e7fe0040fed31f1a03d0cc8133338712ea0957122d84d1da9d + initial_ast: 02efc1a786611a1cb0fa0e03d86c4d4f8cb3e54c8a6d7815505272447ceef122 + canonicalized_ast: 02efc1a786611a1cb0fa0e03d86c4d4f8cb3e54c8a6d7815505272447ceef122 + type_inferenced_ast: f1fceaf70ce698e7fe0040fed31f1a03d0cc8133338712ea0957122d84d1da9d diff --git a/tests/expectations/compiler/compiler/tuples/basic.leo.out b/tests/expectations/compiler/compiler/tuples/basic.leo.out index 26df44b03b..8dd37d0083 100644 --- a/tests/expectations/compiler/compiler/tuples/basic.leo.out +++ b/tests/expectations/compiler/compiler/tuples/basic.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "false" - initial_theorem: af436e46b9e39a856338f4b88de25b7a1fa350de7dc9278479163dcc08b8323e - canonicalized_theorem: af436e46b9e39a856338f4b88de25b7a1fa350de7dc9278479163dcc08b8323e - type_inferenced_theorem: 6a2c7905e8e8c79d318dde7e4c803e1b2b5b9755e480f0a9c3152ea9ae9240e6 + initial_ast: af436e46b9e39a856338f4b88de25b7a1fa350de7dc9278479163dcc08b8323e + canonicalized_ast: af436e46b9e39a856338f4b88de25b7a1fa350de7dc9278479163dcc08b8323e + type_inferenced_ast: 6a2c7905e8e8c79d318dde7e4c803e1b2b5b9755e480f0a9c3152ea9ae9240e6 diff --git a/tests/expectations/compiler/compiler/tuples/dependent.leo.out b/tests/expectations/compiler/compiler/tuples/dependent.leo.out index ebf45804ba..0fef685159 100644 --- a/tests/expectations/compiler/compiler/tuples/dependent.leo.out +++ b/tests/expectations/compiler/compiler/tuples/dependent.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "false" - initial_theorem: 8d3a5cc77cf14db7140dace16fc2f590f6ddc73ed98932021bad4f90b5e99824 - canonicalized_theorem: 8d3a5cc77cf14db7140dace16fc2f590f6ddc73ed98932021bad4f90b5e99824 - type_inferenced_theorem: 7cd799d02f04c5426c8a316c9654db286bbab879e8ced2505152f6264764ba63 + initial_ast: 8d3a5cc77cf14db7140dace16fc2f590f6ddc73ed98932021bad4f90b5e99824 + canonicalized_ast: 8d3a5cc77cf14db7140dace16fc2f590f6ddc73ed98932021bad4f90b5e99824 + type_inferenced_ast: 7cd799d02f04c5426c8a316c9654db286bbab879e8ced2505152f6264764ba63 diff --git a/tests/expectations/compiler/compiler/tuples/destructured.leo.out b/tests/expectations/compiler/compiler/tuples/destructured.leo.out index bc538fe8f1..106dd0d95d 100644 --- a/tests/expectations/compiler/compiler/tuples/destructured.leo.out +++ b/tests/expectations/compiler/compiler/tuples/destructured.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "true" - initial_theorem: 6d6d745c5cfeeb6963cdc1f91b133b7a1526ed4ab3b979416b26a276146d8409 - canonicalized_theorem: 6d6d745c5cfeeb6963cdc1f91b133b7a1526ed4ab3b979416b26a276146d8409 - type_inferenced_theorem: d3762f581f0bf814fae646c47016e6a809bf1aab564ecc7f2d34a0c54965972b + initial_ast: 6d6d745c5cfeeb6963cdc1f91b133b7a1526ed4ab3b979416b26a276146d8409 + canonicalized_ast: 6d6d745c5cfeeb6963cdc1f91b133b7a1526ed4ab3b979416b26a276146d8409 + type_inferenced_ast: d3762f581f0bf814fae646c47016e6a809bf1aab564ecc7f2d34a0c54965972b diff --git a/tests/expectations/compiler/compiler/tuples/nested_access.leo.out b/tests/expectations/compiler/compiler/tuples/nested_access.leo.out index 6afa50da75..f88ab1e6e2 100644 --- a/tests/expectations/compiler/compiler/tuples/nested_access.leo.out +++ b/tests/expectations/compiler/compiler/tuples/nested_access.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "false" - initial_theorem: 972a1898ed642a83e5a49f4fd385d6a65a5021669cd28235dcc47e68cec836f7 - canonicalized_theorem: 972a1898ed642a83e5a49f4fd385d6a65a5021669cd28235dcc47e68cec836f7 - type_inferenced_theorem: a89fb16b36f7e1389f143ae7d15fe535982cfa1a8eb8e0a1e7a49a81d53d1c9c + initial_ast: 972a1898ed642a83e5a49f4fd385d6a65a5021669cd28235dcc47e68cec836f7 + canonicalized_ast: 972a1898ed642a83e5a49f4fd385d6a65a5021669cd28235dcc47e68cec836f7 + type_inferenced_ast: a89fb16b36f7e1389f143ae7d15fe535982cfa1a8eb8e0a1e7a49a81d53d1c9c From 025f02e5f83c67875f03c9bc3120aa3dfd3e54d4 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Fri, 16 Jul 2021 03:28:06 -0700 Subject: [PATCH 7/8] fmt and clippy --- compiler/src/lib.rs | 2 +- compiler/src/test.rs | 40 +++++++++++++++++----------------------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/compiler/src/lib.rs b/compiler/src/lib.rs index 8e7e01638e..631e923f38 100644 --- a/compiler/src/lib.rs +++ b/compiler/src/lib.rs @@ -67,4 +67,4 @@ pub mod option; pub use option::*; #[cfg(test)] -mod test; \ No newline at end of file +mod test; diff --git a/compiler/src/test.rs b/compiler/src/test.rs index 0f6b561978..bcb16331c6 100644 --- a/compiler/src/test.rs +++ b/compiler/src/test.rs @@ -30,8 +30,8 @@ use crate::{ compiler::Compiler, errors::CompilerError, targets::edwards_bls12::EdwardsGroupType, - Output, AstSnapshotOptions, + Output, }; pub type EdwardsTestCompiler = Compiler<'static, Fq, EdwardsGroupType>; @@ -128,19 +128,17 @@ impl Namespace for CompileNamespace { // (name, content) let mut inputs = vec![]; - if let Some(input) = test.config.get("inputs") { - if let Value::Sequence(field) = input { - for map in field { - for (name, value) in map.as_mapping().unwrap().iter() { - // Try to parse string from 'inputs' map, else fail - let value = if let serde_yaml::Value::String(value) = value { - value - } else { - return Err("Expected string in 'inputs' map".to_string()); - }; + if let Some(Value::Sequence(field)) = test.config.get("inputs") { + for map in field { + for (name, value) in map.as_mapping().unwrap().iter() { + // Try to parse string from 'inputs' map, else fail + let value = if let serde_yaml::Value::String(value) = value { + value + } else { + return Err("Expected string in 'inputs' map".to_string()); + }; - inputs.push((name.as_str().unwrap().to_string(), value.clone())); - } + inputs.push((name.as_str().unwrap().to_string(), value.clone())); } } } @@ -216,25 +214,21 @@ impl Namespace for CompileNamespace { let initial_ast: String = hash( Ast::from_json_file("/tmp/output/initial_ast.json".into()) - .unwrap_or(Ast::new(Program::new("Error reading initial theorem.".to_string()))) + .unwrap_or_else(|_| Ast::new(Program::new("Error reading initial theorem.".to_string()))) .to_json_string() - .unwrap_or("Error converting ast to string.".to_string()), + .unwrap_or_else(|_| "Error converting ast to string.".to_string()), ); let canonicalized_ast: String = hash( Ast::from_json_file("/tmp/output/canonicalization_ast.json".into()) - .unwrap_or(Ast::new(Program::new( - "Error reading canonicalized theorem.".to_string(), - ))) + .unwrap_or_else(|_| Ast::new(Program::new("Error reading canonicalized theorem.".to_string()))) .to_json_string() - .unwrap_or("Error converting ast to string.".to_string()), + .unwrap_or_else(|_| "Error converting ast to string.".to_string()), ); let type_inferenced_ast = hash( Ast::from_json_file("/tmp/output/type_inferenced_ast.json".into()) - .unwrap_or(Ast::new(Program::new( - "Error reading type inferenced theorem.".to_string(), - ))) + .unwrap_or_else(|_| Ast::new(Program::new("Error reading type inferenced theorem.".to_string()))) .to_json_string() - .unwrap_or("Error converting ast to string.".to_string()), + .unwrap_or_else(|_| "Error converting ast to string.".to_string()), ); let final_output = CompileOutput { From b4564887588aa5d702fe9229b532844c34abe783 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Fri, 16 Jul 2021 03:39:32 -0700 Subject: [PATCH 8/8] merge master --- leo/commands/build.rs | 2 +- .../compiler/compiler/array/multi_initializer.leo.out | 6 +++--- .../compiler/compiler/array/nested_3x2_value.leo.out | 6 +++--- .../compiler/compiler/array/slice_lower.leo.out | 6 +++--- .../compiler/compiler/array/tuple_3x2_value.leo.out | 6 +++--- .../compiler/array/type_nested_value_nested_4x3x2.leo.out | 6 +++--- .../compiler/array/type_nested_value_tuple_3x2.leo.out | 6 +++--- .../compiler/array/type_nested_value_tuple_4x3x2.leo.out | 6 +++--- .../compiler/array/type_tuple_value_nested_3x2.leo.out | 6 +++--- .../compiler/array/type_tuple_value_nested_4x3x2.leo.out | 6 +++--- .../compiler/array/type_tuple_value_tuple_3x2.leo.out | 6 +++--- .../compiler/array/type_tuple_value_tuple_4x3x2.leo.out | 6 +++--- .../compiler/compiler/circuits/const_self_variable.leo.out | 6 +++--- .../compiler/compiler/circuits/inline_member_pass.leo.out | 6 +++--- .../compiler/compiler/circuits/member_function.leo.out | 6 +++--- .../compiler/circuits/member_static_function.leo.out | 6 +++--- .../compiler/compiler/circuits/member_variable.leo.out | 6 +++--- .../compiler/circuits/member_variable_and_function.leo.out | 6 +++--- .../compiler/compiler/circuits/mut_self_variable.leo.out | 6 +++--- .../compiler/circuits/mut_self_variable_branch.leo.out | 6 +++--- .../compiler/compiler/circuits/mut_variable.leo.out | 6 +++--- .../circuits/mutable_call_immutable_context.leo.out | 6 +++--- .../compiler/compiler/circuits/self_member.leo.out | 6 +++--- .../compiler/compiler/function/iteration.leo.out | 6 +++--- .../compiler/compiler/function/iteration_repeated.leo.out | 6 +++--- .../compiler/compiler/function/repeated.leo.out | 6 +++--- .../expectations/compiler/compiler/function/return.leo.out | 6 +++--- .../compiler/compiler/function/value_unchanged.leo.out | 6 +++--- .../input_files/program_input_constants/main.leo.out | 6 +++--- .../input_files/program_input_constants/main_array.leo.out | 6 +++--- .../program_input_constants/main_multiple.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/i128/eq.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/i128/ne.leo.out | 6 +++--- .../compiler/compiler/integers/i128/negate_min.leo.out | 6 +++--- .../compiler/compiler/integers/i128/negate_zero.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/i16/eq.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/i16/ne.leo.out | 6 +++--- .../compiler/compiler/integers/i16/negate_min.leo.out | 6 +++--- .../compiler/compiler/integers/i16/negate_zero.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/i32/eq.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/i32/ne.leo.out | 6 +++--- .../compiler/compiler/integers/i32/negate_min.leo.out | 6 +++--- .../compiler/compiler/integers/i32/negate_zero.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/i64/eq.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/i64/ne.leo.out | 6 +++--- .../compiler/compiler/integers/i64/negate_min.leo.out | 6 +++--- .../compiler/compiler/integers/i64/negate_zero.leo.out | 6 +++--- tests/expectations/compiler/compiler/integers/i8/eq.leo.out | 6 +++--- tests/expectations/compiler/compiler/integers/i8/ne.leo.out | 6 +++--- .../compiler/compiler/integers/i8/negate_zero.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/u128/eq.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/u128/ne.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/u16/eq.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/u16/ne.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/u32/eq.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/u32/ne.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/u64/eq.leo.out | 6 +++--- .../expectations/compiler/compiler/integers/u64/ne.leo.out | 6 +++--- tests/expectations/compiler/compiler/integers/u8/eq.leo.out | 6 +++--- tests/expectations/compiler/compiler/integers/u8/ne.leo.out | 6 +++--- .../compiler/compiler/mutability/array_mut.leo.out | 6 +++--- .../compiler/mutability/circuit_function_mut.leo.out | 6 +++--- .../compiler/mutability/circuit_variable_mut.leo.out | 6 +++--- .../compiler/compiler/mutability/cond_mut.leo.out | 6 +++--- .../compiler/compiler/mutability/let_mut.leo.out | 6 +++--- .../compiler/compiler/mutability/let_mut_nested.leo.out | 6 +++--- tests/expectations/compiler/compiler/tuples/access.leo.out | 6 +++--- 67 files changed, 199 insertions(+), 199 deletions(-) diff --git a/leo/commands/build.rs b/leo/commands/build.rs index f512425667..76ce6c614d 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -165,7 +165,7 @@ impl Command for Build { // Log compilation of files to console tracing::info!("Compiling main program... ({:?})", main_file_path); - if self.compiler_options.disable_canonicalization && self.compiler_options.enable_canonicalized_theorem { + if self.compiler_options.disable_canonicalization && self.compiler_options.enable_canonicalized_ast_snapshot { tracing::warn!( "Can not ask for canonicalization theorem without having canonicalization compiler feature enabled." ); diff --git a/tests/expectations/compiler/compiler/array/multi_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_initializer.leo.out index 1df8dce807..bdaafd4168 100644 --- a/tests/expectations/compiler/compiler/array/multi_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_initializer.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c45ead50a2983d040085c68b6ec28ab68cba08496478ff590b81205522acc59b - canonicalized_ast: ad38508a91e16e3ed92d40962dc77e09264c6c7920a88f136f7e5919225becf4 - type_inferenced_ast: 8e0c3cf4e018444c0abbb52902ca70a413ab7cb2eee04d90598e034d3d67dbe7 + initial_ast: 21f90ee0a01e1238101360b72909766a148155d853fd903a3031d66340915101 + canonicalized_ast: cccb2040ce9b654f27e9a8e36976f220545c2888ed2aa9db73843b38407322f2 + type_inferenced_ast: 7cee4f94edf86b6c61af5dbb389b8901c57292810abf4cd6b4855dfee40370c7 diff --git a/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out b/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out index c687d63f9b..a2f41114c4 100644 --- a/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out +++ b/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: cb893a674418ed59a6cb48487c45194d14fbd20bafed6c25069ec776dc8034cb - canonicalized_ast: 81130092aaf4ba0f54d49bc07791bf17605571c6ce7d5e6f4ac657d5e10d6e42 - type_inferenced_ast: 95cbaf465a8177d13e7b2a6d3f7b5da59880158ad02df2c475f9e4a574e90771 + initial_ast: 3c24983a1b881bd00f5f0fd3a40b471a35f5252798f4ed81784b68693529ad59 + canonicalized_ast: 177d06133dcc527a3110335158a888f4a0e5a5e904c2d6df57807563fd0ab386 + type_inferenced_ast: 06e32299c26e20b9a25104686911ecd4e94123bd8a90e7890a244b6288678f27 diff --git a/tests/expectations/compiler/compiler/array/slice_lower.leo.out b/tests/expectations/compiler/compiler/array/slice_lower.leo.out index 41e110fca8..b704c3d6ee 100644 --- a/tests/expectations/compiler/compiler/array/slice_lower.leo.out +++ b/tests/expectations/compiler/compiler/array/slice_lower.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9dad967730de4617fb8dad9001aac6a753f926236c99b39ea52d89fcff8c0750 - canonicalized_ast: 9dad967730de4617fb8dad9001aac6a753f926236c99b39ea52d89fcff8c0750 - type_inferenced_ast: fe9de3669f265236e4434434911e4672b7b61b7fa5f429de9cd8721424b07c35 + initial_ast: a588964cfb6989b22b8bf7d6feaf90d09e228d61b09a48fd4e5e4b44473b5bd0 + canonicalized_ast: a588964cfb6989b22b8bf7d6feaf90d09e228d61b09a48fd4e5e4b44473b5bd0 + type_inferenced_ast: 838744e4d681a06ccb685d0c0de65897234d64f0a49887e896fbda087f3edfd6 diff --git a/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out b/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out index 4031b79a1f..9658df9ec6 100644 --- a/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out +++ b/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c650970b4c46e15ef7cac7663cef8cb18dc5c60e044d49741b727cd73b020b71 - canonicalized_ast: bd31242d7d82f9037c93875ddbba73c4b9ce9842a7b3c06363519b2aa35f59ac - type_inferenced_ast: cd1b8009d96efc19823875d3f19e626cc23c8c61e66729d51c0349d748834d93 + initial_ast: d6195e7c9e70c521660ba312c607850110d864a1979004972a0f2908d476efd3 + canonicalized_ast: a3483e0912a5d47c95775b1b2d2c62fa5acd5f3c0432757dc261475183156490 + type_inferenced_ast: 54b0f61496c50ced01700f61d9c3eac6056d3835f38c2f39fe0c20e45447be63 diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out index 1c0fd25f86..50fb2317b8 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 47b31a2f572f1ae29311322f9125a2c59dc4438ab06366b93f285fa0d8b0b23b - canonicalized_ast: 47b31a2f572f1ae29311322f9125a2c59dc4438ab06366b93f285fa0d8b0b23b - type_inferenced_ast: c18d0320e45339073f4e7057fe5aa3f268dc7597dfe4aef10a07f120bbdb4863 + initial_ast: 42a9307b4efda61137f9816a43e5c07a9d6b143bd88f609be7e549cb3b21d731 + canonicalized_ast: 42a9307b4efda61137f9816a43e5c07a9d6b143bd88f609be7e549cb3b21d731 + type_inferenced_ast: 67e643a53bb3efb99367869a1f3a937570f61658b004a4261e87b028f4976fad diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out index 12ca826929..e5632b4283 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9c0229a2b927c2bbbe66d555b1a9f40ce8a9a2a5ac5c2760f1f463be6674fe8b - canonicalized_ast: eb2512a0873084cd830fab0a3cb008c7ca6e543d52b2ada5724379a9a56ef98a - type_inferenced_ast: f114d26de89fc0b27bde7b06eca11c3faf77137fbdb5b56583ee7e9fba0db8f0 + initial_ast: 073b0033613b8c2f8ca027d0486697b5503943dbc65cec9cbbc6b5665e7432e4 + canonicalized_ast: 6751d75a95af032784678411bb4e0f59b509ec624daea475cab10b9cf14fe6a0 + type_inferenced_ast: 9b9ac4ba4533ecae7ec74da2ab929cfa85be393391887e95ffadf4d1df3004be diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out index 82b1b501f3..04cb12ed87 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: cc6ad9bf91f0055144e3267e0069b470f01e115d4e653f41059ba252a28f8208 - canonicalized_ast: 5e01d6c09abedddaabb2de1ae9ded2763f31736688a6c7ce89c6b719845680cc - type_inferenced_ast: 577811bb30fc1e5f9ce24e162e1d87fcdce5d86d37d693f7e0a940a000d1b901 + initial_ast: d04220b24fd2648e859fab4caf69727b5532dbe1ee68db9d569153514e161a85 + canonicalized_ast: 36d30f97ff15f08a4a88b384a362168014d56bc90d6a3837fd213b2acfc42357 + type_inferenced_ast: 363bdf0ef5cf40b1b63a2cefa3d509ca731809568b7392899cbe73ec13104ecd diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out index d8cf6f6984..d341a7bbfc 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: eb95146b4dcbaa16244c766c3a4ffc8b804b65ba20bc905cea8a464853603510 - canonicalized_ast: edb4d22d5499b13f5e3bffe2e770ea3207858f8c21c4020b76e3568d2cc1d2d8 - type_inferenced_ast: 3629aa30a841dd8f299c667a1c63443d5622712e9006b7f6bbfa9dd025cd798d + initial_ast: 15fa7dd3949e323b759a7290ff433fb0f6ec83308b1b9b1a6bb129650191bc80 + canonicalized_ast: 6a0262a7865ecf453b147449c52f23a1ffb38995c45d0a7c23a78255b9cbbb1b + type_inferenced_ast: 571acef2dd154ad80da051c43f402a9d10593c07b234de69fe9fc19284f09849 diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out index e8110d845b..5e2b931939 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 15baea7cfadb05d32f5cf5375a25208c42e173e7832c00c5fb7f9007aca5dc48 - canonicalized_ast: cd70c9c9f2d86b38d0e49d371fad697375cd6674206c9b3eb32e534a0367afe1 - type_inferenced_ast: 1cbb9181a67580fd51535f5273a2b8168270c3213061bcc5c6604b3af203d7b5 + initial_ast: ec1e31c0b1e2cc2cfa1476b9189d1b3e95e786d5b55e4c350a6888860613f4b2 + canonicalized_ast: dacc5bfe970669abcebe9363e0bc84fe7fb8e0c816dda756b00cc38ae993e781 + type_inferenced_ast: f8c48aff4a11661fe164e69af32a99a5259f05a10287de26aea2fd323d4744ef diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out index 3677eceace..736befa2e7 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a29044947f267f770abe4b67c6477ed5971c4b04d17a34a043f24be31dd3535c - canonicalized_ast: 3a4f6774136e7b9453a58bfaecb228595ff94e55630476acc9e7b6b93a0169a2 - type_inferenced_ast: f8457618409d5f1508b82e155212a5d9321a11314b581f4f5062c220f99dcd11 + initial_ast: 37ec6089b9e1af0c552e259848d1ecd8bb361dd8a5c348d6b34f7f5262dc6f40 + canonicalized_ast: ad2b199caadb797e02aded3020468c9d7a2b3094652c3b27436b8f98cc71dc05 + type_inferenced_ast: cb373502d7141af431342592470482ef936a5fc9e6f4ede8a01e8e98537988de diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out index ac187385e8..026cb9b481 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 611c6362e365456206304d7d28cc428bf49cf57d907fcfa5c106426f32e64515 - canonicalized_ast: 216d2e239b59ea1aefac5e503233ec6c1d3d480b5cc316d02f4910ee3eafd087 - type_inferenced_ast: 17de88a1fa4f500b91cdd10512bb892f88e8eb987fa5496f6a4d3441b9aef5b5 + initial_ast: b351c4655069ba4e5ae6759b10109406d64b74c652aab8be3547912df3e10c83 + canonicalized_ast: e9e15873ef2727704b7b4f711516e6f8833a177fe4ff9379823dca293ecb8a72 + type_inferenced_ast: d040a5aac628379fa32c3e36980f8dac3996a5240bc3482e44c2fdb1d8c3ef60 diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out index 82e4f8a8c6..0dec0b1733 100644 --- a/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 69d5d1d8e5f05bad8d61b1c14fe6089e661c13e91160f7e4be416dca1a86e9db - canonicalized_ast: 69d5d1d8e5f05bad8d61b1c14fe6089e661c13e91160f7e4be416dca1a86e9db - type_inferenced_ast: c0295d3b69631f79838a642c667a7da8698eda4e20d287a5bf2693a0717a4978 + initial_ast: da9350459a9579ec5961fc26b81a67a88060caaaea27448fa02f86271227b213 + canonicalized_ast: da9350459a9579ec5961fc26b81a67a88060caaaea27448fa02f86271227b213 + type_inferenced_ast: 2dd2c4378253f239047ae310657e24dae70ba7181d1cf08d89007c2f1a37d332 diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out index 577b15f092..86e9316902 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 76c7ce0af826afd3568deb3fb910dfbee9dc3b1db1f4a1ba6641e49f6d621a41 - canonicalized_ast: 9c79521d3198b8ed197251626ed0e20b483026151ca99b3fb349472c63a56cc5 - type_inferenced_ast: 1c97a2ba48df4c16b137bf9712981bad253c9585cd6e4fcae5635e0cd6d8d301 + initial_ast: 489c3e8ccafc04e118846f4009d93dfbf018902fbdcd1dde6798cc853bcd8903 + canonicalized_ast: 4b8614afcbaf258d87202daa83f1340762d9a90f4edd7723b8a83df74acbbeb1 + type_inferenced_ast: 3e23d0db328e40ffa2a1ced543295650aa724a8b2dc795bbca54a40ca726b59a diff --git a/tests/expectations/compiler/compiler/circuits/member_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_function.leo.out index f839b48afd..206329dc34 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3709cdd3aeb7a84061aaafa3513872a4259583bcfcaa87b2b735610d54814fdf - canonicalized_ast: 3709cdd3aeb7a84061aaafa3513872a4259583bcfcaa87b2b735610d54814fdf - type_inferenced_ast: 0995eb0322eeddd4a46eadb17414ce9d79507948279f6a5cc570035c6cdc34ef + initial_ast: 8eacc56577069bef188ac3bbabbceaca5fb8955af1e8ea74ef52f01ce7bd4516 + canonicalized_ast: 8eacc56577069bef188ac3bbabbceaca5fb8955af1e8ea74ef52f01ce7bd4516 + type_inferenced_ast: d5947d1cd599d713fdaafe3cc1084784639c768d5069151dfe7dd0cb02e28ae2 diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out index ccfcbb86d5..6630cd07bc 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b6df670bda418b0aa854ad50b4fef19b44de312f56894c5a1148f9b0a2d9afee - canonicalized_ast: b6df670bda418b0aa854ad50b4fef19b44de312f56894c5a1148f9b0a2d9afee - type_inferenced_ast: fcc852041018d4e7bde56fa9e0cd5c75642153a708f37aec9ce392d1a89c8a15 + initial_ast: 75577795f48b9c4f50fed7051e3d76e4b76e3d3b6896ead606d3ebe925e43d2f + canonicalized_ast: 75577795f48b9c4f50fed7051e3d76e4b76e3d3b6896ead606d3ebe925e43d2f + type_inferenced_ast: 60a0557cf60a23b458e3a7ef25299f3fef8cae5c473446b54bb7e98ed91b70f0 diff --git a/tests/expectations/compiler/compiler/circuits/member_variable.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out index f93e6cb7aa..3d5447716c 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 35f870f8ad050ad60461320ac83f5890b05a371e175ac567205ea82848f7b843 - canonicalized_ast: 35f870f8ad050ad60461320ac83f5890b05a371e175ac567205ea82848f7b843 - type_inferenced_ast: 4834243c03feb9cfedec039a852cdd27a9a78c1d77e402977056ab5e9a939ab3 + initial_ast: 701fc149d818f5cfc5c0a2465c46ca76c42d6d558ec0077960a37ae179f401b0 + canonicalized_ast: 701fc149d818f5cfc5c0a2465c46ca76c42d6d558ec0077960a37ae179f401b0 + type_inferenced_ast: 6a3729bb8e9948a84a0fd5a825510420f57ec7979695dc816795a83258a415e8 diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out index f98c9d81ec..7ede51f889 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: deb8019cf05028fb78c7b991b9c34b3f57a3a451291fdcdeff3d309046146a01 - canonicalized_ast: deb8019cf05028fb78c7b991b9c34b3f57a3a451291fdcdeff3d309046146a01 - type_inferenced_ast: a6e408cad754cdd3adc08ca8506f63dd733e300bc821819fb417fa7060c8d044 + initial_ast: 033ac2bd59dacfd0e1f551feee772337e15a3c9eca8fa64075b1f6c411b2f235 + canonicalized_ast: 033ac2bd59dacfd0e1f551feee772337e15a3c9eca8fa64075b1f6c411b2f235 + type_inferenced_ast: a90d633d8db0a339186dc314f4de35ed970aec22cfccd423f49824ade7dcf70b diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out index cc45a5e1f2..a7c760ec44 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8edf6af581db0a59ea7ef541bf7a69cbe2123d03e8b2b126f0d97f863e380a13 - canonicalized_ast: cfd575b43758d9e6fd65452f955f940a80b519bfec68f5d2f89a897d3bb93981 - type_inferenced_ast: 9fcbf7898afbf3d3c453387620845717512ed909d934470386975e5a11140b42 + initial_ast: 35c17de2e9d8a63b29cbeaeeb7eebfa886ff4ae536938e571e953ee206ba8a59 + canonicalized_ast: 8f09ad7c9a20220bf8d9fe7e5c84a7c1e99b840fbeb682fb5646df9a05efbd8b + type_inferenced_ast: b1e1e8b1c22a2c98f82d26a1a339952dbe085366b5dc3bb36d71cf4c842739b9 diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out index 21792ff0ab..90c520afac 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f61ad518c877d851b60248bd2868e80e44feeef578aaef2e6cfa30a6ac1dd325 - canonicalized_ast: c95d6c670a0843f7c11efb4bec4784890b8504bd3f9dc1d5cf950d0683e8538a - type_inferenced_ast: 5db7661ac71e6ee9096571c88d1f36855db0d21f3b1757f5e07c3c85c6b2c8ea + initial_ast: 5654f2be64d7879bfa2cb49029bd6c3b757c0eb28dd32744de41a28effae5891 + canonicalized_ast: 42710d4ec40860cbd1a88da9738960c5a07a6a9937436ec474b3f1bbc805aac4 + type_inferenced_ast: d7f138829083963f935922d492a94a693b963d3acee6fadb325be8d99f0e4d19 diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out index b6bbb6bebf..bff2c8dada 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 6e01b3fd6a8b93c71386db6034a1b989a06cee469df2a634dddca7a8151fc8be - canonicalized_ast: 6e01b3fd6a8b93c71386db6034a1b989a06cee469df2a634dddca7a8151fc8be - type_inferenced_ast: b868fba47889acf8369e00b96440fe81ebfdba5dd042dc4bddd89f0bb945ac02 + initial_ast: 684a9fc0a433525dfbe52d8037588845ad55782b2c1b046bd91049c3b9d9ea4c + canonicalized_ast: 684a9fc0a433525dfbe52d8037588845ad55782b2c1b046bd91049c3b9d9ea4c + type_inferenced_ast: 1fce4132eea4711a6b42fab47478d3608d16df3930554350ed46d865162f7043 diff --git a/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out index 85a26a3eda..5ea932e6db 100644 --- a/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: fb0bd30fe7fb8ec624c04628dc9bc3cfd384515ef0dfe0cfdfd36084f1b592ff - canonicalized_ast: 9e5badf3fb1cd8940665b9ed9eb0a1e56d89dd0be61fca0436d0a30eb7e4c50c - type_inferenced_ast: b08b23ad6859b39c79015dc41bfaa7ea5527db980706d1e6fc5e74c634a8b4c1 + initial_ast: bd8793749cfd151b89162febc55b6bb6de1be867a0009da6a8470106953db630 + canonicalized_ast: 9ecf61f153db9d0912cae6891258e0ebdaecd0da6eef7bbc92c3a6476c7adf6d + type_inferenced_ast: 6908fc70e763ff518a9942a3b930aac64b70075be1b734c2ac93175ca1f16f97 diff --git a/tests/expectations/compiler/compiler/circuits/self_member.leo.out b/tests/expectations/compiler/compiler/circuits/self_member.leo.out index 30145cc723..5311554177 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8865aeec0e88fe9923a55ba568c6615db5dcec6c2cfc127ecd2920b11e3455f7 - canonicalized_ast: 8865aeec0e88fe9923a55ba568c6615db5dcec6c2cfc127ecd2920b11e3455f7 - type_inferenced_ast: 3b24858f79ee4f4f795107ccf916d64b957cb0c81cfa4573c2cb5645b0541ef7 + initial_ast: ef90c67bd868ad3d1362b37acad99a97316700c60c9667a4d67b8ad392b2922c + canonicalized_ast: ef90c67bd868ad3d1362b37acad99a97316700c60c9667a4d67b8ad392b2922c + type_inferenced_ast: 636fbf53660cedd9c05b6c361fae19ae5adaae85adc98e888308072ef843f8fa diff --git a/tests/expectations/compiler/compiler/function/iteration.leo.out b/tests/expectations/compiler/compiler/function/iteration.leo.out index 876aca8c8b..78b352d66f 100644 --- a/tests/expectations/compiler/compiler/function/iteration.leo.out +++ b/tests/expectations/compiler/compiler/function/iteration.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c24a0829d16b41b78aafcb92ee24c69d4f067400d3ff3f3138a139c5f420f09e - canonicalized_ast: c91cb43f9f56224a96a22e7605d9c598b99487c18ad027eb711c0bb8a36feb86 - type_inferenced_ast: f2df9bbf635e2e254c76ebba82716ff1bde20dfa09a3f15222ea821f29c4b253 + initial_ast: 7dcfb3d46fc2a3f91d57f21db97e0d3829d0ac438a09fe0beaaa83aa0c545947 + canonicalized_ast: 33ffbf095e9050dd55b3e5cae0518f47b61689a7cefb5dd2d454ff6c4bb2fc9c + type_inferenced_ast: a6cff2181d7642f4a729d2301708c97956fc60322c8680a7d2d71296f4e7a5c6 diff --git a/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out index f678fdc031..5a58598d01 100644 --- a/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out +++ b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7f2118d52fd9440ac9e4bde368b63a4db25b47d368e5324f570129c9bcc586c4 - canonicalized_ast: 29be9082e8e52d8241a43c35583d5374a79d209a2b3c170d46c5ec3d32eb9d5d - type_inferenced_ast: 91116dd4ffe34d65d318088464378fd7daeb6ba9812dba94a558f9c48939703c + initial_ast: cb4033ff1a05ae4b09fd9bbbeddd11b0fddececb98f96c7aef2ebb3069748870 + canonicalized_ast: 6607510f1df2682091711014cb0b1db8b786707accbab9c1760d710bed32ca17 + type_inferenced_ast: 4b5f83f6029a04c1fbce48e596ac2d7d0d97b87489b05656ff8773b04d2597fd diff --git a/tests/expectations/compiler/compiler/function/repeated.leo.out b/tests/expectations/compiler/compiler/function/repeated.leo.out index 967ee95db3..b535091b49 100644 --- a/tests/expectations/compiler/compiler/function/repeated.leo.out +++ b/tests/expectations/compiler/compiler/function/repeated.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d0dcfefbc7063c4d87e1406fe2a81c2301796a3c5d8b863959fd671193eec340 - canonicalized_ast: d0dcfefbc7063c4d87e1406fe2a81c2301796a3c5d8b863959fd671193eec340 - type_inferenced_ast: d289e818127b99fc2c84e0d0bc8c3d826d1b24c9e898a0f7b0e9b3587d98cb13 + initial_ast: 63569735bf4eb8ad55d90df67cf6fefec39579db3326888926142af2cfb26d6f + canonicalized_ast: 63569735bf4eb8ad55d90df67cf6fefec39579db3326888926142af2cfb26d6f + type_inferenced_ast: 542715a7e5c18db26fdadf63bd41e6cb71df4f96bb867eb18ad65c80a965decc diff --git a/tests/expectations/compiler/compiler/function/return.leo.out b/tests/expectations/compiler/compiler/function/return.leo.out index 4f5bb10b78..35f3cb6c2a 100644 --- a/tests/expectations/compiler/compiler/function/return.leo.out +++ b/tests/expectations/compiler/compiler/function/return.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c7d71942ff60eb269209f3a6cc5f5285e2bcc246e851774c2dc262e86863eaa5 - canonicalized_ast: c7d71942ff60eb269209f3a6cc5f5285e2bcc246e851774c2dc262e86863eaa5 - type_inferenced_ast: 3d03b6325d894d1326d3b34d9bdb3c033b4d3466762f2e10476216b506637e7d + initial_ast: 7195af24acaba1dbba4c8d8848177e7a82e71320a9381e48a2c176e9886699c5 + canonicalized_ast: 7195af24acaba1dbba4c8d8848177e7a82e71320a9381e48a2c176e9886699c5 + type_inferenced_ast: 92e7397b037f436aee2ccd1fb04e95014ed5f1335681c8357592f6a6076cc76c diff --git a/tests/expectations/compiler/compiler/function/value_unchanged.leo.out b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out index 1dcf66cd82..a4e5ddae32 100644 --- a/tests/expectations/compiler/compiler/function/value_unchanged.leo.out +++ b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 971f88ef638a1ab839c743bdab5de81278f1d02819a1cc37bc40ca4f11898345 - canonicalized_ast: eedf8caa4a34b266f354efe0723ab7af3a41a748b0f36b8daca8726130e149e1 - type_inferenced_ast: 53817d02b96405f9ecfbccd9fa024eaab279a0d1be04265a7362377257e97b46 + initial_ast: 089803f7197594aeca82cba9bc2eb70b6fdbbf42c007a0949da4c5b1b4f63508 + canonicalized_ast: 415cdab7ff832a06dc7b01e3134b81d36f0efc0efb3ae092c062419c38f57450 + type_inferenced_ast: 91fb5695f3a2c856d2cde8936aaef4cbb94773a2a71b56c00661c72c8fdee50b diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out index 8b35d9ab6b..23d8f056da 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0ef02cf93072c348503a723a38e972ef2439ca9160ebc4e68741929b60138aa4 - canonicalized_ast: 0ef02cf93072c348503a723a38e972ef2439ca9160ebc4e68741929b60138aa4 - type_inferenced_ast: b3b0114629852238e4488b5be7a1d4af601806674ee6408c2335c3a80ac04b0e + initial_ast: cd8b1f60505fc1f2269a587982e3c9cfd08b9f183ede8eadc8a1f00d63360f5c + canonicalized_ast: cd8b1f60505fc1f2269a587982e3c9cfd08b9f183ede8eadc8a1f00d63360f5c + type_inferenced_ast: a1640fb069335b80d27567c56759f0b6610c9ba31cac966a742fa775c3fd0373 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out index f99693b95d..d74fb40d3e 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 6726f88925f393f90e09f536b7da48575feb19fb2f30f5fb8ce0968b66a469b1 - canonicalized_ast: 6726f88925f393f90e09f536b7da48575feb19fb2f30f5fb8ce0968b66a469b1 - type_inferenced_ast: 3b0f1f17c8876d1e1a644bb425beedbc951e38683f33f726edaf12a6d003d896 + initial_ast: fc0d2296fdb76961806268d592892a064f4de5c55f2bdb705c46c6f564f2a0af + canonicalized_ast: fc0d2296fdb76961806268d592892a064f4de5c55f2bdb705c46c6f564f2a0af + type_inferenced_ast: 40cf529694add5a9193fe0d1784247ae1246f067076c96bc9fdc114e633699af diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out index 685345d493..a7762a959e 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ef8bcab6d5371ef86e4d7e5df90ca23079b9e5fedbfd7917b08be3a1d2ebb5b6 - canonicalized_ast: ef8bcab6d5371ef86e4d7e5df90ca23079b9e5fedbfd7917b08be3a1d2ebb5b6 - type_inferenced_ast: c199ab005e42c960beb6ca2b62e6b0d144960e7360530ad4fb89757f412e1c67 + initial_ast: 5cf468e17290553c60a2cdedcb92c16d8269b07403cffefbe16701bf7e4e3efd + canonicalized_ast: 5cf468e17290553c60a2cdedcb92c16d8269b07403cffefbe16701bf7e4e3efd + type_inferenced_ast: 63f2f49324e5dc7b8aa9c5be7b524c21fb86528c6ca5e9446d0accd2f3c14470 diff --git a/tests/expectations/compiler/compiler/integers/i128/eq.leo.out b/tests/expectations/compiler/compiler/integers/i128/eq.leo.out index e4f7ad781f..48a1ad3170 100644 --- a/tests/expectations/compiler/compiler/integers/i128/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 74aab1a9bcfc6f3a25c2f7fab9d493e8d687ce86505cd375c22b6258603a72cf - canonicalized_ast: 74aab1a9bcfc6f3a25c2f7fab9d493e8d687ce86505cd375c22b6258603a72cf - type_inferenced_ast: 8fd6e1c3e06fe7839d93479c03c4e59eca644ad420955e77312c6749dde5520d + initial_ast: 3b8180fa769e086232eef3bf8462a75275750b60729e2e642d2b4ca96aab9222 + canonicalized_ast: 3b8180fa769e086232eef3bf8462a75275750b60729e2e642d2b4ca96aab9222 + type_inferenced_ast: 96f2ff3c817d3df9ea92e9f5e5100ce8baa8eee1e35b0bfbeb832d4eb2a36c67 diff --git a/tests/expectations/compiler/compiler/integers/i128/ne.leo.out b/tests/expectations/compiler/compiler/integers/i128/ne.leo.out index 800494ad84..7c5e698cf6 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b20415db5988fac6c707d5ddf4a1287003395bdb74a96cfc4be4d8b869ace579 - canonicalized_ast: b20415db5988fac6c707d5ddf4a1287003395bdb74a96cfc4be4d8b869ace579 - type_inferenced_ast: 55c6b5cc48d8d80c0347d477418168c323d34aee33ea36447192166a9f54d32e + initial_ast: 6abbf856d68ddf5dab6e0e28efd4edcf0b8c77a73ec3cc71b342672737487925 + canonicalized_ast: 6abbf856d68ddf5dab6e0e28efd4edcf0b8c77a73ec3cc71b342672737487925 + type_inferenced_ast: 2be2d42dd129f782b0393284108e22368823857f66a338406159b30c2953c486 diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out index ca5604d14b..33b2e3eef5 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b3d531ff16ea167af0dde295b141fb88045336204cfad4eb1ef39a3491ac5b21 - canonicalized_ast: b3d531ff16ea167af0dde295b141fb88045336204cfad4eb1ef39a3491ac5b21 - type_inferenced_ast: 01cf1e13b4c7b489855c33559bd632a3fddb2b49077922cbbe1a4a6f7d200a14 + initial_ast: 7caf7d58784d0fde99b9041c2de7013c5171d8b77d12fadedc1a7f254736d5db + canonicalized_ast: 7caf7d58784d0fde99b9041c2de7013c5171d8b77d12fadedc1a7f254736d5db + type_inferenced_ast: 7b7e03ea46695e6190bc4731e5091f6f7524c21b6b2659cd100d872f6c8dbc51 diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out index e1a3dbb3c4..8be89f4fee 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: dd7a24b71e74622ec5620629aa7f60e928009e12aea0fadea259f2d62258cd8d - canonicalized_ast: dd7a24b71e74622ec5620629aa7f60e928009e12aea0fadea259f2d62258cd8d - type_inferenced_ast: 186f2e3226cb21c39e67390ea3ebc1e2863ed44ee3cc85278b512db4829d20f3 + initial_ast: 8938763585750f00e3af22fbe607925515c738649e25ef536926d4c26bc4987e + canonicalized_ast: 8938763585750f00e3af22fbe607925515c738649e25ef536926d4c26bc4987e + type_inferenced_ast: 7e5da98c82d7a3c8fd7ebc80e54289ae1c5bd7f7febd7943a2a376e65f925df6 diff --git a/tests/expectations/compiler/compiler/integers/i16/eq.leo.out b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out index 4b6b4482b6..364d88b526 100644 --- a/tests/expectations/compiler/compiler/integers/i16/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 5d901a32aea72e5e08d1150961941b53637e7586f617ee1b5975022e7efcc597 - canonicalized_ast: 5d901a32aea72e5e08d1150961941b53637e7586f617ee1b5975022e7efcc597 - type_inferenced_ast: b1044cf20a97768d2dc751289415634cc43c63642a0db05f08546c5ce4337615 + initial_ast: 9b7aa4b35a464c120a2fbbcc5f64e94224bd5a83a4178f41f522b8c3f4103eed + canonicalized_ast: 9b7aa4b35a464c120a2fbbcc5f64e94224bd5a83a4178f41f522b8c3f4103eed + type_inferenced_ast: fa332a69d255172b4ab1f07fcab1b6cd4ba2b29ef86f488b006a6d728a53c21d diff --git a/tests/expectations/compiler/compiler/integers/i16/ne.leo.out b/tests/expectations/compiler/compiler/integers/i16/ne.leo.out index 897c2deec0..5d0dda3d2d 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8c6fea5199db90bc83b06a665def03d3d3f9dc21d0880e870afd5316e882d020 - canonicalized_ast: 8c6fea5199db90bc83b06a665def03d3d3f9dc21d0880e870afd5316e882d020 - type_inferenced_ast: 55b7d570fcaafdbd2f19c3bfae73c089e92ed89837f5d71bd8a72800870bc0fd + initial_ast: 7aa0502683430c1eb3b692497b4d0a58eb463229a4e2dc112fe9065478bfb614 + canonicalized_ast: 7aa0502683430c1eb3b692497b4d0a58eb463229a4e2dc112fe9065478bfb614 + type_inferenced_ast: ce82a4fd386bbb70d200402189572063eeb71308be4ab30988e95952144be3b8 diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out index 35a490d861..6ec1b1e5ef 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2b5fdbe8e706501b0de7ac1f58e189ff4a712cd8a0fb19ee96a0a58f2d64ec47 - canonicalized_ast: 2b5fdbe8e706501b0de7ac1f58e189ff4a712cd8a0fb19ee96a0a58f2d64ec47 - type_inferenced_ast: cf0a37b8845d1545cd46b8b850eaad1aa2e227fd2d8268da7e8d4c087ba1745c + initial_ast: 064db7790a5fe7507c1f56c3d4bfac3b184da1f4e9de9792950d016cc331b2d7 + canonicalized_ast: 064db7790a5fe7507c1f56c3d4bfac3b184da1f4e9de9792950d016cc331b2d7 + type_inferenced_ast: 6e8dae083b61d225f4982fa6f9b0530ecc63b365af0782e00384077e176303ab diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out index 779aec7d9a..480c5a8fdb 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a7bc8fb723de623e653ecada1109a7a6c658af1430c36a817062445ce546049b - canonicalized_ast: a7bc8fb723de623e653ecada1109a7a6c658af1430c36a817062445ce546049b - type_inferenced_ast: 87cbf23ee8ad59885301deda7c1d5aae8bc683ff6addc80454d43d477800a4d7 + initial_ast: 1d284ab53df47bd68057717ea9ea338f4c77cd7fa9d2d8850d47cb34cea62f6b + canonicalized_ast: 1d284ab53df47bd68057717ea9ea338f4c77cd7fa9d2d8850d47cb34cea62f6b + type_inferenced_ast: 46256ea5632485212fda4dd534ddc0c8b6fe7439ca65ca1ff4d843ad47f92fbc diff --git a/tests/expectations/compiler/compiler/integers/i32/eq.leo.out b/tests/expectations/compiler/compiler/integers/i32/eq.leo.out index 9736cf0fa7..77c3598529 100644 --- a/tests/expectations/compiler/compiler/integers/i32/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3ad98a090977f2aea01478afbf703c1f657e4db04668129faa515e4111de74cf - canonicalized_ast: 3ad98a090977f2aea01478afbf703c1f657e4db04668129faa515e4111de74cf - type_inferenced_ast: 4587277f48dfa604f067c16208b2abbedfa2b349205641db8bf7e386a1a6f4a5 + initial_ast: c698e127258e1e60652ddb897be0a4638bc263a6c50b7dece797c60b30fe1373 + canonicalized_ast: c698e127258e1e60652ddb897be0a4638bc263a6c50b7dece797c60b30fe1373 + type_inferenced_ast: 45a9d197ff995eb43cad8f5dd0cdb906d5e0d0bef0b4f3459acc07cb5541edaf diff --git a/tests/expectations/compiler/compiler/integers/i32/ne.leo.out b/tests/expectations/compiler/compiler/integers/i32/ne.leo.out index 91e0f511bb..4281dcda96 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 04055130f6fd1b07e2ac9d07a669d27d0152b5bf5b3ef2553bdffa819e555e9e - canonicalized_ast: 04055130f6fd1b07e2ac9d07a669d27d0152b5bf5b3ef2553bdffa819e555e9e - type_inferenced_ast: a6d7c40fc41874564a3d562e7c912fdda4a28803cb244d925a26110142cc3c36 + initial_ast: 2d4a443c29c71a57919c04ef3fd46b2905a369029d8d9c9f550ddfba7d9f4412 + canonicalized_ast: 2d4a443c29c71a57919c04ef3fd46b2905a369029d8d9c9f550ddfba7d9f4412 + type_inferenced_ast: 57567697c6a41eecc0ae2cd4f48e451b6f04da28aff5d9017dadce44fafddfb9 diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out index bfb0711ac8..f154160065 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 21c23d4b0a17a10c30503e42bc1bf9e0316f7f901b967f3373d66913641727ef - canonicalized_ast: 21c23d4b0a17a10c30503e42bc1bf9e0316f7f901b967f3373d66913641727ef - type_inferenced_ast: 0d28e064d20397ee01c71459fc7830663bd7dd571d311e5fa2d2c141069052a3 + initial_ast: 055a3effe6dab326bc05efb4e705b975b8b5b9a476fcc51c1031cc0ad7bb579f + canonicalized_ast: 055a3effe6dab326bc05efb4e705b975b8b5b9a476fcc51c1031cc0ad7bb579f + type_inferenced_ast: de723bb30e595a20606a520588af8ba6042ab5206a02c13f184b7a72cd21ce00 diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out index 9e16052d8c..c355e353ba 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f1101ce333dfdb4c59192eeec160deb86e46be82cf0add2014740c389f9353e4 - canonicalized_ast: f1101ce333dfdb4c59192eeec160deb86e46be82cf0add2014740c389f9353e4 - type_inferenced_ast: 2951a32c512d7d681b20c5f6b750aec9dade991b777fc9789278461b4a9bb954 + initial_ast: a136febecbdc7a15151f62688ed248422281c2555bebae831c815be512377356 + canonicalized_ast: a136febecbdc7a15151f62688ed248422281c2555bebae831c815be512377356 + type_inferenced_ast: bea5396c3c0a772fcbf20c39d2700a62663f48eaeb84c67e5f202a14812a6cc8 diff --git a/tests/expectations/compiler/compiler/integers/i64/eq.leo.out b/tests/expectations/compiler/compiler/integers/i64/eq.leo.out index 95ceb0cb7e..5ffc4620ba 100644 --- a/tests/expectations/compiler/compiler/integers/i64/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9d56aeda85fd6ffb426a28be08896b044758b35faf9dde99e2f26df642e0c765 - canonicalized_ast: 9d56aeda85fd6ffb426a28be08896b044758b35faf9dde99e2f26df642e0c765 - type_inferenced_ast: 0f6b7a99b49ac61d636b1dc0ba226e545ed51f55eddc962a5cf83c06705f00f7 + initial_ast: c8bbd0ab8eafe688d3abd30ae78ed816ac3f4664274171871b26905af03f10df + canonicalized_ast: c8bbd0ab8eafe688d3abd30ae78ed816ac3f4664274171871b26905af03f10df + type_inferenced_ast: 75a421a5808194cd352e6166b4785dad5f9e70d02f5025594f2cc230f0456277 diff --git a/tests/expectations/compiler/compiler/integers/i64/ne.leo.out b/tests/expectations/compiler/compiler/integers/i64/ne.leo.out index ee69ef8348..005bee81b4 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f973603815c81c6de14edfbfe5bcbb5adab0be5f45dd6b517dccaa7ace0b6396 - canonicalized_ast: f973603815c81c6de14edfbfe5bcbb5adab0be5f45dd6b517dccaa7ace0b6396 - type_inferenced_ast: ebff9ab7ae18bf3c44aeb65e54e4d47e084c9f82eeb82ae99c5093f0e5150843 + initial_ast: 2779d7555674b1de843b11ac9833276fb3e0de2bae1f8274b4a99a0266c19503 + canonicalized_ast: 2779d7555674b1de843b11ac9833276fb3e0de2bae1f8274b4a99a0266c19503 + type_inferenced_ast: c3ea20c697a684a34398cba8339ea16083aac06fbf780864301053e4f9b4b6ae diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out index c40cedf8f8..0668d81c84 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: dcc877091aff3aff01bbb075ab6b7f64c26a743bac10f51010cc45157711a65a - canonicalized_ast: dcc877091aff3aff01bbb075ab6b7f64c26a743bac10f51010cc45157711a65a - type_inferenced_ast: d86e07433c967775af7fccc46195317dd8abc41b52852918084aa4eabe63466f + initial_ast: ee7f236b8d5e51c8c5556c877e94997c90a7ba0f0a0924a6786392b6a22973b6 + canonicalized_ast: ee7f236b8d5e51c8c5556c877e94997c90a7ba0f0a0924a6786392b6a22973b6 + type_inferenced_ast: 0bc182c9db0fbccb9c54bf5ec2a6c3f423337ea005d34473fb86b66cd99e468e diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out index 6cbcc54055..bb918efa64 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8ff367f167d482baba64ec752418d09d68a8ef7790a5b877a888b4e3b42ae5ab - canonicalized_ast: 8ff367f167d482baba64ec752418d09d68a8ef7790a5b877a888b4e3b42ae5ab - type_inferenced_ast: 868614ead4954c1561beb808880c2d2a4da60658753773febe82e7031d512c3c + initial_ast: 6f0d090c229a40a04a66af7d209216fd828b723e1ffc030e213a3e15e8994833 + canonicalized_ast: 6f0d090c229a40a04a66af7d209216fd828b723e1ffc030e213a3e15e8994833 + type_inferenced_ast: 1b3b58589e816ac7a563f0c1b64cd890f2074440fb82a15240c1dac4a4f1ebfc diff --git a/tests/expectations/compiler/compiler/integers/i8/eq.leo.out b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out index e4c44eba23..06cc6873e4 100644 --- a/tests/expectations/compiler/compiler/integers/i8/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 035d136c5a2b9d429f6202d9c5967099e73312e0fbfa8bf669899a983ed1f1fa - canonicalized_ast: 035d136c5a2b9d429f6202d9c5967099e73312e0fbfa8bf669899a983ed1f1fa - type_inferenced_ast: 5e552e93b709e9931695f42df9f43459b4321ca23d91ccec7496a908e0e9d0b0 + initial_ast: 0bbca11747587a18929d2c86d2539ae9d8d8abf7763fec5588e86c36e0108cec + canonicalized_ast: 0bbca11747587a18929d2c86d2539ae9d8d8abf7763fec5588e86c36e0108cec + type_inferenced_ast: 970b354c05d483629a9127d4499eebcec400b1dd6eced44eb07fceabcb51a42a diff --git a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out index 45c6169f50..0ebf7ad3d3 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: bf4147e29bd455cee755fac32078c7ab45c13bdb18d9b2ea3a27cf2f454ed3cb - canonicalized_ast: bf4147e29bd455cee755fac32078c7ab45c13bdb18d9b2ea3a27cf2f454ed3cb - type_inferenced_ast: 1f6abffa9fa5dbca11e43b1c4f228937bf100a4013e8f83e920fbff3d8d22f44 + initial_ast: 3c2884711728384eb34c61e005682c6480d1b3b67454e4e02f0619c48b7917cf + canonicalized_ast: 3c2884711728384eb34c61e005682c6480d1b3b67454e4e02f0619c48b7917cf + type_inferenced_ast: 87d9a9b58227a323ea9a5989da2432756fc77766e1515896bea03fe7a504f54d diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out index 2b44ce1b67..d531809f95 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 04a3369b02921bfec3d0753adaea9adee8d90c31e65cf53bd1beb14965dd22e5 - canonicalized_ast: 04a3369b02921bfec3d0753adaea9adee8d90c31e65cf53bd1beb14965dd22e5 - type_inferenced_ast: 5d9f2f6b87a16f82e9995c59a3f456254ffd3a04ea8e802ca7e8e42779219ee8 + initial_ast: da89fb90b63ff44da71f20bd1a95b5a14385f254e267463b9ecb17ccc5d8e643 + canonicalized_ast: da89fb90b63ff44da71f20bd1a95b5a14385f254e267463b9ecb17ccc5d8e643 + type_inferenced_ast: 077f62f984727186f23fdcbb13bc800ba6e6aaf667ebb578e014c2971b1f0389 diff --git a/tests/expectations/compiler/compiler/integers/u128/eq.leo.out b/tests/expectations/compiler/compiler/integers/u128/eq.leo.out index 301e133895..6cf593d4e7 100644 --- a/tests/expectations/compiler/compiler/integers/u128/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 573187768b9c075767e7798068a4bfb0a1b9081f1ed0f8952560bd12d5bf15af - canonicalized_ast: 573187768b9c075767e7798068a4bfb0a1b9081f1ed0f8952560bd12d5bf15af - type_inferenced_ast: 136eb2cb152b93f02856d911f3381d24895a77739220e3026d9b4a1d2c2ceb68 + initial_ast: 36db0f375d215a56d167d6c59144fd514489118b82f59b7811a2afcea361443d + canonicalized_ast: 36db0f375d215a56d167d6c59144fd514489118b82f59b7811a2afcea361443d + type_inferenced_ast: 56e5d5ba650e0c0f4faad326e60c727b6af636ca72d15f949df28cd1966b1a6e diff --git a/tests/expectations/compiler/compiler/integers/u128/ne.leo.out b/tests/expectations/compiler/compiler/integers/u128/ne.leo.out index 7f787417b8..8cefcf3a09 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8165065b0ab14fa4f6e793d588fd02a535b58ee0a62732f1a9ac13b5fbf96cb6 - canonicalized_ast: 8165065b0ab14fa4f6e793d588fd02a535b58ee0a62732f1a9ac13b5fbf96cb6 - type_inferenced_ast: 54a6fe96befb6664f53f8024515e853f6b760ceaa3155782b33edc6c45f8ca89 + initial_ast: a4b0739663c4139b5c69cb65fa2ee4128018162fa2cdb6e3c32e1a72077a0bfb + canonicalized_ast: a4b0739663c4139b5c69cb65fa2ee4128018162fa2cdb6e3c32e1a72077a0bfb + type_inferenced_ast: a71ceabdc2095ad95f9ad70d5272e2d3909774b7f72c1cef5f5ad15013f0763d diff --git a/tests/expectations/compiler/compiler/integers/u16/eq.leo.out b/tests/expectations/compiler/compiler/integers/u16/eq.leo.out index 40d842f950..7e8be96bd9 100644 --- a/tests/expectations/compiler/compiler/integers/u16/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8e267a226869f49793d77d6b5038ec61ad7c00df58fe761880633e276733d9b8 - canonicalized_ast: 8e267a226869f49793d77d6b5038ec61ad7c00df58fe761880633e276733d9b8 - type_inferenced_ast: 502ee92ed049003c911de3290cd7dbfaff3d15e86cb8f8b9eb3fcdbba7829023 + initial_ast: ee65643024461631489070d2e450bbacdd33b94bf3b3c4a465c3aa2c621d1cfc + canonicalized_ast: ee65643024461631489070d2e450bbacdd33b94bf3b3c4a465c3aa2c621d1cfc + type_inferenced_ast: 0d88202e763c4b1dbaa47150aed77abc511ebe2cd1352ccc0926e7e2ac5a874d diff --git a/tests/expectations/compiler/compiler/integers/u16/ne.leo.out b/tests/expectations/compiler/compiler/integers/u16/ne.leo.out index 6d640b9859..6956cac42f 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 299e893c8e424583eb27648b0d2aae54c922da31a7e46e5891c57fce3dff0424 - canonicalized_ast: 299e893c8e424583eb27648b0d2aae54c922da31a7e46e5891c57fce3dff0424 - type_inferenced_ast: 6e80b43bd2e4d8e8be23b159eca4f6212aa9aa32b49fb04c99d8d8754702561d + initial_ast: ac5862d330de9916c7c9f7ed0110adaad26a887d3cd82d8c1b736d595e6445ae + canonicalized_ast: ac5862d330de9916c7c9f7ed0110adaad26a887d3cd82d8c1b736d595e6445ae + type_inferenced_ast: a9618c9c126d8391bcf375f87c3a6a2aa100af711603779fdfb0dad4768d3276 diff --git a/tests/expectations/compiler/compiler/integers/u32/eq.leo.out b/tests/expectations/compiler/compiler/integers/u32/eq.leo.out index 2c039e8d84..b2c643d155 100644 --- a/tests/expectations/compiler/compiler/integers/u32/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: bb0bb3d8085da2fbffe1982b31452a8d8f5c442fc80313e4123eb9bcfd9280c7 - canonicalized_ast: bb0bb3d8085da2fbffe1982b31452a8d8f5c442fc80313e4123eb9bcfd9280c7 - type_inferenced_ast: 36c871ce90092fa7123b5eefd31232386955559f421cc5f21250ce89988e5463 + initial_ast: 371541762c95ceedd6735521918ca19a2c1ff9b5ac7fc03ca932a18576977f50 + canonicalized_ast: 371541762c95ceedd6735521918ca19a2c1ff9b5ac7fc03ca932a18576977f50 + type_inferenced_ast: 265d8fd8db8983f9398efe61fd36176ee4449ee632ea9219b7e1ee6a1b1edda5 diff --git a/tests/expectations/compiler/compiler/integers/u32/ne.leo.out b/tests/expectations/compiler/compiler/integers/u32/ne.leo.out index cc832fb3e4..7697ba7bd8 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: fb7abac0ceaebcc4f63ab26965fc3a13516faade4b1e0310d69cd8b4deec71a0 - canonicalized_ast: fb7abac0ceaebcc4f63ab26965fc3a13516faade4b1e0310d69cd8b4deec71a0 - type_inferenced_ast: 1032259782493fc5d09794722283c912b7c3e7ed2bcf660830e2d5de9f227979 + initial_ast: 9ed438102f8938306421dce802d9af7f11366e91d2c6acc840dae1f3f9950e54 + canonicalized_ast: 9ed438102f8938306421dce802d9af7f11366e91d2c6acc840dae1f3f9950e54 + type_inferenced_ast: 3132b80f6e14eb276fed053ce4ad86376599df2568e85b54f53e3dd55ef1ac4b diff --git a/tests/expectations/compiler/compiler/integers/u64/eq.leo.out b/tests/expectations/compiler/compiler/integers/u64/eq.leo.out index 707f790ee1..c30519eba9 100644 --- a/tests/expectations/compiler/compiler/integers/u64/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: af0deffc16ff4e1b3d07d3e1160e48788ecb1b80563fc43a28d9c89fd85f40b9 - canonicalized_ast: af0deffc16ff4e1b3d07d3e1160e48788ecb1b80563fc43a28d9c89fd85f40b9 - type_inferenced_ast: a8fe2f4d446fb7eff91d9f77b638806be0454ae732d6608276f3151a8d4e4921 + initial_ast: 222fd1d5b29034866f229ad755a6bdbfc2e7f917208e682ce0ff77d88866008d + canonicalized_ast: 222fd1d5b29034866f229ad755a6bdbfc2e7f917208e682ce0ff77d88866008d + type_inferenced_ast: 794c731afca4579f619aba3379f12bbe71fb4ebc5d256858534ba04b90855e03 diff --git a/tests/expectations/compiler/compiler/integers/u64/ne.leo.out b/tests/expectations/compiler/compiler/integers/u64/ne.leo.out index 1789950538..a66f8aeb34 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 61c78cb5e1dca4b8136778b1d937e6468ebbd8e99714c94243640b20053a48f2 - canonicalized_ast: 61c78cb5e1dca4b8136778b1d937e6468ebbd8e99714c94243640b20053a48f2 - type_inferenced_ast: bdde4f012730d3fa17cb1708ae04ac483ea8d3b8ecb4b4cef04081bb4a36e277 + initial_ast: 21675ef772779316b4a0cba63284251d69eabf581d65d7780b77988fecd500c8 + canonicalized_ast: 21675ef772779316b4a0cba63284251d69eabf581d65d7780b77988fecd500c8 + type_inferenced_ast: 8d8f881dfd748d28eb47082e945d7e28147a79afd4c346dc718b07f5068f3064 diff --git a/tests/expectations/compiler/compiler/integers/u8/eq.leo.out b/tests/expectations/compiler/compiler/integers/u8/eq.leo.out index 09f7fa8a5d..46de525dd4 100644 --- a/tests/expectations/compiler/compiler/integers/u8/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 132aa07033dcffd3e2e834e1dcfe34e6b3f1ff80012a9142c39b7fc88aa99174 - canonicalized_ast: 132aa07033dcffd3e2e834e1dcfe34e6b3f1ff80012a9142c39b7fc88aa99174 - type_inferenced_ast: 88354ad0bdb4d2f6b762c4cd5545ea532bb545928ad7c15f3f091ca468d809f4 + initial_ast: aa2459e6aec917b685a32cd008c7809684f9e08e446a9acb28835d03ee5909d0 + canonicalized_ast: aa2459e6aec917b685a32cd008c7809684f9e08e446a9acb28835d03ee5909d0 + type_inferenced_ast: bb373474343191ea738914a4f15373373ee3b387bd14a2e7ccbeb3b78e83edb6 diff --git a/tests/expectations/compiler/compiler/integers/u8/ne.leo.out b/tests/expectations/compiler/compiler/integers/u8/ne.leo.out index cb91f4c036..e178ae3184 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0ab5c6b9b456638bc02751352328eddb194c0823c5d2861fbef8b4bc5c15d2cd - canonicalized_ast: 0ab5c6b9b456638bc02751352328eddb194c0823c5d2861fbef8b4bc5c15d2cd - type_inferenced_ast: 03cb77b44cd5a28632d0f203c9354af48f104390262dd58fe2ef10929f3a1e5d + initial_ast: 13331b76c5f4087e7a47ac31b43ae9465b4df33ffc3a785ed997a3694921338b + canonicalized_ast: 13331b76c5f4087e7a47ac31b43ae9465b4df33ffc3a785ed997a3694921338b + type_inferenced_ast: 8269c7b9114fa31276f9398a51c8642cadf59c68979fdc680bd900ca3aeea73b diff --git a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out index 25a649b061..4c9bc1ac1e 100644 --- a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9f12a9096f69d21c58c4605d81f237d47e45b31cd76e0e774d952861223b6ce5 - canonicalized_ast: 9f12a9096f69d21c58c4605d81f237d47e45b31cd76e0e774d952861223b6ce5 - type_inferenced_ast: e938979bb8701986dec52ecca670054ddeb988500ec62018f36e2f9db23b7e3f + initial_ast: ceb1057896de34c17443d478a2e8bc0934c5bd9fb536ae210b148578f25f5465 + canonicalized_ast: ceb1057896de34c17443d478a2e8bc0934c5bd9fb536ae210b148578f25f5465 + type_inferenced_ast: 4037c97f4f464afcd6c34fa293f4b6a0c434d0e21193b82ccf4189da280e7721 diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out index 2d3b7e3ad2..154b3ce4df 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 09811b7139b1e3d054587ec093048299a1f7d9788b0231d933a357a8cb2074d2 - canonicalized_ast: 884e0994056c967adad5f7ffbd296836ecd2628ab74b68bd2702269afab56177 - type_inferenced_ast: 90820536767ea35ea4ce32dcbee1c7d290deb14475ef019a8c6c690df21f8dc1 + initial_ast: 8db095ba3755c4c0a5c661f82acea4d5088fcc7a1f21445d8f6a76aa349be14c + canonicalized_ast: db2825ad023eb01f420686f407d0411e99d06be1f13116ffce5b18d7e9ceffd6 + type_inferenced_ast: 2afc66cedc72641dbae33927247993fa9b03402889e3a71005888d0e26f34114 diff --git a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out index e5de731da7..a780c83f31 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ddc8a4de9bd1763a20e5b54638eeb794e8f7d21d3f7f1be7ebaf9fcdc1cddf5a - canonicalized_ast: ddc8a4de9bd1763a20e5b54638eeb794e8f7d21d3f7f1be7ebaf9fcdc1cddf5a - type_inferenced_ast: 99c9a07da06e125a6fc44693772a5d9aacbd38319c9f44e37b47f4e2e1b65c56 + initial_ast: 7671936b5d58627c508151bd0a851661e929424791064674180e651e5f9d7f8b + canonicalized_ast: 7671936b5d58627c508151bd0a851661e929424791064674180e651e5f9d7f8b + type_inferenced_ast: 08ccc60dc31ebf449c8a359dca037f99b22cd971fe4c5b5606310fa0fe9cd1a9 diff --git a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out index 7d2fefcc76..925b0913c2 100644 --- a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a9207ae29648b97abbe861a05cd15c12ab0172f9e603d5a1a456cd8fa58ffa58 - canonicalized_ast: 355e3102cfb3505224a3bebb9b45e592c7bc63cb192f3252d2797019f2a98b55 - type_inferenced_ast: ab2e29b1be43c0eded824789ecf869308ef3a88fa4a9c88dabf321f66b3793f4 + initial_ast: 06f04842fb542f8864eb122d2f28acf86913b1ad2ea77d9b2a138c65d9186ef0 + canonicalized_ast: 2ed31baa6f3faa866cdde220e7066a652c68dfc40eae0215dc32ea38c34c7ac1 + type_inferenced_ast: be031b12e5045a61467348896d88e71017818365692e50201a64e08c2c5be833 diff --git a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out index 3c3defa3fe..08c94c67cc 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b61356db00ef2217c5c933775a7084d14ace8a2217711dea31f787ec2ab6d556 - canonicalized_ast: b61356db00ef2217c5c933775a7084d14ace8a2217711dea31f787ec2ab6d556 - type_inferenced_ast: 17602e0e37607962b5551471e898481671ac1771e6aa5993cf2e0959617f5397 + initial_ast: 32fa7d2711aa772281f70ad9c81a3a8d3eab4d0844438849de4998c65ee12237 + canonicalized_ast: 32fa7d2711aa772281f70ad9c81a3a8d3eab4d0844438849de4998c65ee12237 + type_inferenced_ast: 4bde7f50f7488cbf37c29a95ad7699aa1d8ae5d20fdb773ddab63293bd89d6c5 diff --git a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out index 85bbc1b76e..00d177ab65 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f061374b47c64a1f6649d5d64d3b8a64bb295d396912bade8bfd2cc2f609c442 - canonicalized_ast: f061374b47c64a1f6649d5d64d3b8a64bb295d396912bade8bfd2cc2f609c442 - type_inferenced_ast: 8f4dd4f3e9fd63f3ef225a58252d97591f753ffef71bb21c7d6e8596ad0f5a15 + initial_ast: 68348f81454aaabba9ad9d6eb16be88eb4692e7600840a97b8ceb8296e30b890 + canonicalized_ast: 68348f81454aaabba9ad9d6eb16be88eb4692e7600840a97b8ceb8296e30b890 + type_inferenced_ast: f10f9a4988d9c815bf4a2bfa0c28d5b2913a99bed96825729b08433fe3178145 diff --git a/tests/expectations/compiler/compiler/tuples/access.leo.out b/tests/expectations/compiler/compiler/tuples/access.leo.out index 7bf2f5f6fb..e063d68ab0 100644 --- a/tests/expectations/compiler/compiler/tuples/access.leo.out +++ b/tests/expectations/compiler/compiler/tuples/access.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "false" - initial_ast: 02efc1a786611a1cb0fa0e03d86c4d4f8cb3e54c8a6d7815505272447ceef122 - canonicalized_ast: 02efc1a786611a1cb0fa0e03d86c4d4f8cb3e54c8a6d7815505272447ceef122 - type_inferenced_ast: f1fceaf70ce698e7fe0040fed31f1a03d0cc8133338712ea0957122d84d1da9d + initial_ast: 8e04cd62dc27e5486f82216b68bb9aa8ff996757da01988b8b23f38b090c1645 + canonicalized_ast: 8e04cd62dc27e5486f82216b68bb9aa8ff996757da01988b8b23f38b090c1645 + type_inferenced_ast: 79754b8b299f9c09d99eed04c343ef68da05b3fdd40f0d6885a48c108177fe72