testing and clean up

This commit is contained in:
gluaxspeed 2021-08-18 14:31:06 -07:00
parent a91c8b9e6a
commit 56c66fa4ba
53 changed files with 177 additions and 128 deletions

View File

@ -90,6 +90,7 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> {
circuit: ast_circuit,
name,
span,
..
}) => {
let target = <&Expression<'a>>::from_ast(scope, &**ast_circuit, None)?;
let circuit = match target.get_type() {

View File

@ -214,6 +214,7 @@ impl<'a> Into<leo_ast::Expression> for &CircuitAccessExpression<'a> {
circuit: Box::new(target.into()),
name: self.member.clone(),
span: self.span.clone().unwrap_or_default(),
type_: None,
})
} else {
leo_ast::Expression::CircuitStaticFunctionAccess(leo_ast::CircuitStaticFunctionAccessExpression {

View File

@ -94,7 +94,7 @@ impl<'a> FromAst<'a, leo_ast::Statement> for &'a Statement<'a> {
scope, statement, None,
)?))
}
Iteration(statement) => Self::from_ast(scope, statement, None)?,
Iteration(ref statement) => Self::from_ast(scope, &**statement, None)?,
Console(statement) => scope
.context
.alloc_statement(Statement::Console(ConsoleStatement::from_ast(scope, statement, None)?)),
@ -120,7 +120,7 @@ impl<'a> Into<leo_ast::Statement> for &Statement<'a> {
Definition(statement) => leo_ast::Statement::Definition(statement.into()),
Assign(statement) => leo_ast::Statement::Assign(statement.into()),
Conditional(statement) => leo_ast::Statement::Conditional(statement.into()),
Iteration(statement) => leo_ast::Statement::Iteration(statement.into()),
Iteration(statement) => leo_ast::Statement::Iteration(Box::new(statement.into())),
Console(statement) => leo_ast::Statement::Console(statement.into()),
Expression(statement) => leo_ast::Statement::Expression(statement.into()),
Block(statement) => leo_ast::Statement::Block(statement.into()),

View File

@ -21,6 +21,7 @@ pub struct CircuitMemberAccessExpression {
pub circuit: Box<Expression>,
pub name: Identifier,
pub span: Span,
pub type_: Option<crate::Type>,
}
impl fmt::Display for CircuitMemberAccessExpression {

View File

@ -75,6 +75,7 @@ impl Canonicalizer {
circuit: left,
name: identifier,
span: span.clone(),
type_: None,
}));
}
}
@ -260,6 +261,7 @@ impl Canonicalizer {
circuit: Box::new(self.canonicalize_expression(&circuit_member_access.circuit)),
name: circuit_member_access.name.clone(),
span: circuit_member_access.span.clone(),
type_: None,
});
}
Expression::CircuitStaticFunctionAccess(circuit_static_func_access) => {
@ -383,14 +385,14 @@ impl Canonicalizer {
let stop = self.canonicalize_expression(&iteration.stop);
let block = self.canonicalize_block(&iteration.block);
Statement::Iteration(IterationStatement {
Statement::Iteration(Box::new(IterationStatement {
variable: iteration.variable.clone(),
start,
stop,
inclusive: iteration.inclusive,
block,
span: iteration.span.clone(),
})
}))
}
Statement::Console(console_function_call) => {
let function = match &console_function_call.function {

View File

@ -252,9 +252,14 @@ impl<R: ReconstructingReducer> ReconstructingDirector<R> {
) -> Result<CircuitMemberAccessExpression, ReducerError> {
let circuit = self.reduce_expression(&circuit_member_access.circuit)?;
let name = self.reduce_identifier(&circuit_member_access.name)?;
let type_ = circuit_member_access
.type_
.as_ref()
.map(|type_| self.reduce_type(type_, &circuit_member_access.span))
.transpose()?;
self.reducer
.reduce_circuit_member_access(circuit_member_access, circuit, name)
.reduce_circuit_member_access(circuit_member_access, circuit, name, type_)
}
pub fn reduce_circuit_static_fn_access(
@ -286,7 +291,7 @@ impl<R: ReconstructingReducer> ReconstructingDirector<R> {
Statement::Definition(definition) => Statement::Definition(self.reduce_definition(definition)?),
Statement::Assign(assign) => Statement::Assign(self.reduce_assign(assign)?),
Statement::Conditional(conditional) => Statement::Conditional(self.reduce_conditional(conditional)?),
Statement::Iteration(iteration) => Statement::Iteration(self.reduce_iteration(iteration)?),
Statement::Iteration(iteration) => Statement::Iteration(Box::new(self.reduce_iteration(iteration)?)),
Statement::Console(console) => Statement::Console(self.reduce_console(console)?),
Statement::Expression(expression) => Statement::Expression(self.reduce_expression_statement(expression)?),
Statement::Block(block) => Statement::Block(self.reduce_block(block)?),

View File

@ -219,11 +219,13 @@ pub trait ReconstructingReducer {
circuit_member_access: &CircuitMemberAccessExpression,
circuit: Expression,
name: Identifier,
type_: Option<Type>,
) -> Result<CircuitMemberAccessExpression, ReducerError> {
Ok(CircuitMemberAccessExpression {
circuit: Box::new(circuit),
name,
span: circuit_member_access.span.clone(),
type_,
})
}

View File

@ -27,7 +27,7 @@ pub enum Statement {
Definition(DefinitionStatement),
Assign(AssignStatement),
Conditional(ConditionalStatement),
Iteration(IterationStatement),
Iteration(Box<IterationStatement>),
Console(ConsoleStatement),
Expression(ExpressionStatement),
Block(Block),

View File

@ -232,17 +232,31 @@ impl<R: ReconstructingReducer, O: CombinerOptions> CombineAstAsgDirector<R, O> {
ast: &AstCallExpression,
asg: &AsgCallExpression,
) -> Result<AstCallExpression, ReducerError> {
// TODO FIGURE IT OUT
// let function = self.reduce_expression(&ast.function, asg.function.get())?;
// let target = asg.target.get().map(|exp| self.reduce_expression())
// Is this needed?
let mut function = *ast.function.clone();
if self.options.type_inference_enabled() {
let function_type: Option<leo_ast::Type> = asg
.target
.get()
.map(|target| {
(target as &dyn leo_asg::ExpressionNode)
.get_type()
.as_ref()
.map(|t| t.into())
})
.flatten();
if let AstExpression::CircuitMemberAccess(mut access) = function {
access.type_ = function_type;
function = AstExpression::CircuitMemberAccess(access);
}
}
let mut arguments = vec![];
for (ast_arg, asg_arg) in ast.arguments.iter().zip(asg.arguments.iter()) {
arguments.push(self.reduce_expression(ast_arg, asg_arg.get())?);
}
self.ast_reducer.reduce_call(ast, *ast.function.clone(), arguments)
self.ast_reducer.reduce_call(ast, function, arguments)
}
pub fn reduce_cast(
@ -259,14 +273,19 @@ impl<R: ReconstructingReducer, O: CombinerOptions> CombineAstAsgDirector<R, O> {
pub fn reduce_circuit_member_access(
&mut self,
ast: &CircuitMemberAccessExpression,
_asg: &AsgCircuitAccessExpression,
asg: &AsgCircuitAccessExpression,
) -> Result<CircuitMemberAccessExpression, ReducerError> {
// let circuit = self.reduce_expression(&circuit_member_access.circuit)?;
// let name = self.reduce_identifier(&circuit_member_access.name)?;
// let target = input.target.get().map(|e| self.reduce_expression(e));
let type_ = if self.options.type_inference_enabled() {
Some(leo_ast::Type::Circuit(asg.circuit.get().name.borrow().clone()))
} else {
None
};
self.ast_reducer
.reduce_circuit_member_access(ast, *ast.circuit.clone(), ast.name.clone())
.reduce_circuit_member_access(ast, *ast.circuit.clone(), ast.name.clone(), type_)
}
pub fn reduce_circuit_static_fn_access(
@ -445,7 +464,7 @@ impl<R: ReconstructingReducer, O: CombinerOptions> CombineAstAsgDirector<R, O> {
AstStatement::Expression(self.reduce_expression_statement(ast, asg)?)
}
(AstStatement::Iteration(ast), AsgStatement::Iteration(asg)) => {
AstStatement::Iteration(self.reduce_iteration(ast, asg)?)
AstStatement::Iteration(Box::new(self.reduce_iteration(ast, asg)?))
}
(AstStatement::Return(ast), AsgStatement::Return(asg)) => {
AstStatement::Return(self.reduce_return(ast, asg)?)

View File

@ -68,7 +68,7 @@ pub(crate) fn parse_program(
theorem_options: Option<AstSnapshotOptions>,
cwd: Option<PathBuf>,
) -> Result<EdwardsTestCompiler, CompilerError> {
let mut compiler = new_compiler(cwd.unwrap_or("compiler-test".into()), theorem_options);
let mut compiler = new_compiler(cwd.unwrap_or_else(|| "compiler-test".into()), theorem_options);
compiler.parse_program_from_string(program_string)?;

View File

@ -450,6 +450,7 @@ impl ParserContext {
span: expr.span() + &ident.span,
circuit: Box::new(expr),
name: ident,
type_: None,
});
} else if let Some((num, span)) = self.eat_int() {
expr = Expression::TupleAccess(TupleAccessExpression {

View File

@ -89,7 +89,7 @@ impl ParserContext {
match &self.peek()?.token {
Token::Return => Ok(Statement::Return(self.parse_return_statement()?)),
Token::If => Ok(Statement::Conditional(self.parse_conditional_statement()?)),
Token::For => Ok(Statement::Iteration(self.parse_loop_statement()?)),
Token::For => Ok(Statement::Iteration(Box::new(self.parse_loop_statement()?))),
Token::Console => Ok(Statement::Console(self.parse_console_statement()?)),
Token::Let | Token::Const => Ok(Statement::Definition(self.parse_definition_statement()?)),
Token::LeftCurly => Ok(Statement::Block(self.parse_block()?)),

View File

@ -16,6 +16,6 @@ outputs:
out:
type: bool
value: "true"
initial_ast: 9808de8c342c41e060d3d3134eb168c8d8cc3ff0641cb8d9779a1746b9fa1687
canonicalized_ast: 1479a9afd623ad11ca137555fd86a3f0a6da39641d5b2da712273242541c246e
type_inferenced_ast: 9bf998e088b9cce0f40a0326fa8e744c88d8168e04c563a2fbd6a57acd23da1f
initial_ast: 3e3ba85223f07d8df95f7ad67db3037eefbdff41f6f656ad423ee72af2d00d1d
canonicalized_ast: e4e6a8c0e82d4f7d5d6e325dccd81394be5440592d4e68390fba144a8ef9b9da
type_inferenced_ast: fa54884de7afa0466b0d86f141711a2485297334553e5071fdf6f14ae9f35aed

View File

@ -22,6 +22,6 @@ outputs:
r:
type: "[u8; 3]"
value: "\"123\""
initial_ast: 81dd2c459d5a1bff4963fb2cfdc67348183061934025b96739dc05c7b65a2a8b
canonicalized_ast: 81dd2c459d5a1bff4963fb2cfdc67348183061934025b96739dc05c7b65a2a8b
type_inferenced_ast: fcb8de69c92dff4a4adb8a160fc3b78042f394cd0dc627c5bf06820a095d7012
initial_ast: b3db525091621f7c96908a112c405a1e222e86bc9909e238d6716cf0ea3359c7
canonicalized_ast: b3db525091621f7c96908a112c405a1e222e86bc9909e238d6716cf0ea3359c7
type_inferenced_ast: d19ec51bcaeab5ce9c458f093cf37b62597ae327fd3c1cd12aa011d52e51ecab

View File

@ -100,6 +100,6 @@ outputs:
r:
type: char
value: "'\\u{1f62d}'"
initial_ast: 680d480560e2a187669f5bf3c328cee1865021cbe4c19f3350db843d312b6406
canonicalized_ast: 680d480560e2a187669f5bf3c328cee1865021cbe4c19f3350db843d312b6406
type_inferenced_ast: 385365a7d46c458c2d5f94690acc53191bf234bcdb928a9efc454c33ba06718a
initial_ast: 83dc2100bd08cc90ce293f2fbf8865b83226c682ff5599947e2b830243295621
canonicalized_ast: 83dc2100bd08cc90ce293f2fbf8865b83226c682ff5599947e2b830243295621
type_inferenced_ast: d55e454409b858468acd7d1c5da2fca281b97d3f21f857d180d5edd0a8575f26

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: aa87a9d1c477e2d5b7ae824fb434188dd6c5c519dd27ebaecd30e44be401ee1b
canonicalized_ast: f188b62839a17478878fe1dfc9863bac20fa1c0c6cf51eae5e13c5f5f79f6c1a
type_inferenced_ast: 9e838aeeebdd2f800c2e7305614f123c27d8390fbadabf1bcb15dae6466669a6
initial_ast: 9b1c67bf2331fe4da11b6b867d5c76fcf448619a6073e5d6db5afa27c89a4499
canonicalized_ast: 664905b95a1dcd37b30f5ccc2b752b676692fff3e66e48877c3009a1bcce5d8c
type_inferenced_ast: 05050c06a9a39f5966f635be432347abd80dfc98e6ac79ab44c6806c24563281

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: da9350459a9579ec5961fc26b81a67a88060caaaea27448fa02f86271227b213
canonicalized_ast: da9350459a9579ec5961fc26b81a67a88060caaaea27448fa02f86271227b213
type_inferenced_ast: 2dd2c4378253f239047ae310657e24dae70ba7181d1cf08d89007c2f1a37d332
initial_ast: d0a8dc662c95787e6aec31df6e69c1d21cfffa21769127be1054b0b620c0cc0b
canonicalized_ast: d0a8dc662c95787e6aec31df6e69c1d21cfffa21769127be1054b0b620c0cc0b
type_inferenced_ast: c866d4b57ac01d16715eb5fa02a6f093d443a672173a8da62b6e1dd4c9ee4081

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 583cb3219a67fcbb30d241dec9e2860d99db27b109c8d095c10838ea342efd3c
canonicalized_ast: 583cb3219a67fcbb30d241dec9e2860d99db27b109c8d095c10838ea342efd3c
type_inferenced_ast: bbb33dca916b1310a58492ecd4bc74ed03ef3ab87870391839fc8b627f31e941
initial_ast: 017de7aca61c81bbed015e878e128c3cb5e795ccd3e7a77ef3f1b54b3d1ce18b
canonicalized_ast: 017de7aca61c81bbed015e878e128c3cb5e795ccd3e7a77ef3f1b54b3d1ce18b
type_inferenced_ast: c2c44fbee1f8e5c021d51ac239905b78ceebfce1e1de47b9713b8350afdd6f6e

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: u32
value: "100"
initial_ast: 7a6b3abb44b3770f98b45c1f961539ae538e1b5fb2b62ae7bffeaf2209739bc3
canonicalized_ast: 7a6b3abb44b3770f98b45c1f961539ae538e1b5fb2b62ae7bffeaf2209739bc3
type_inferenced_ast: 88703ec6b9780a1e7629b14afd0e3da35ff4d68f968db2926242f745d6f61b4d
initial_ast: c7830ab4fe672f5563a211fea5f81494ca551bdb78279124249374d30f978259
canonicalized_ast: c7830ab4fe672f5563a211fea5f81494ca551bdb78279124249374d30f978259
type_inferenced_ast: ac748f5effbf5533a45bb3b9e323abe278c0198e8293f383163e1226d6342b3e

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 489c3e8ccafc04e118846f4009d93dfbf018902fbdcd1dde6798cc853bcd8903
canonicalized_ast: 4b8614afcbaf258d87202daa83f1340762d9a90f4edd7723b8a83df74acbbeb1
type_inferenced_ast: 3e23d0db328e40ffa2a1ced543295650aa724a8b2dc795bbca54a40ca726b59a
initial_ast: c0383e677f30f3f3ae1d50118cd802f15bc038700ad29c8af8d1ca75af32ea15
canonicalized_ast: 84b2c3ce0552288c687a1f87acd0682ad208e2c84a7a5c6f1616bd13ade21e62
type_inferenced_ast: 3b671726641fff32235e6726954c18b1bc5fff4cc9f2e33138c19b9abd82d36c

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 8eacc56577069bef188ac3bbabbceaca5fb8955af1e8ea74ef52f01ce7bd4516
canonicalized_ast: 8eacc56577069bef188ac3bbabbceaca5fb8955af1e8ea74ef52f01ce7bd4516
type_inferenced_ast: d5947d1cd599d713fdaafe3cc1084784639c768d5069151dfe7dd0cb02e28ae2
initial_ast: ba78462720a15b8f4d65b2b7493a7ed78c749cd099fd6a3e79b4d627bbe50ddb
canonicalized_ast: ba78462720a15b8f4d65b2b7493a7ed78c749cd099fd6a3e79b4d627bbe50ddb
type_inferenced_ast: 2d936fece3722aad24dd322dd8773438ad6553082f4839fe044e77ab8d656dec

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: f4796f1f9215d0c6d42478aae63b1495dfad36eaaec4a981dddac9def85ffef0
canonicalized_ast: f4796f1f9215d0c6d42478aae63b1495dfad36eaaec4a981dddac9def85ffef0
type_inferenced_ast: f808f56c8af9d6677bf54e7f777b3023f82144462df704dc4f3e39830be4c109
initial_ast: 2ecd73052650570a730f782fa6f74dec155b964ab49a70eee1dea41e43f626f0
canonicalized_ast: 2ecd73052650570a730f782fa6f74dec155b964ab49a70eee1dea41e43f626f0
type_inferenced_ast: 5d704c7c544e92d1cc01a214a475fe784f08f8f26398b075424966357e82eca4

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 701fc149d818f5cfc5c0a2465c46ca76c42d6d558ec0077960a37ae179f401b0
canonicalized_ast: 701fc149d818f5cfc5c0a2465c46ca76c42d6d558ec0077960a37ae179f401b0
type_inferenced_ast: 6a3729bb8e9948a84a0fd5a825510420f57ec7979695dc816795a83258a415e8
initial_ast: 71687b176dd206b1c4f74be132b52e80add9072f42d492f27d64e04ffeec0449
canonicalized_ast: 71687b176dd206b1c4f74be132b52e80add9072f42d492f27d64e04ffeec0449
type_inferenced_ast: b71e2bedba29671049b59392cef640f33d6d889a91eb2848878e7e465b58f0ba

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 033ac2bd59dacfd0e1f551feee772337e15a3c9eca8fa64075b1f6c411b2f235
canonicalized_ast: 033ac2bd59dacfd0e1f551feee772337e15a3c9eca8fa64075b1f6c411b2f235
type_inferenced_ast: a90d633d8db0a339186dc314f4de35ed970aec22cfccd423f49824ade7dcf70b
initial_ast: 63de15e8c8bd9ddbe813568e831df03f1b5d61b73552ffc7663f88254a667675
canonicalized_ast: 63de15e8c8bd9ddbe813568e831df03f1b5d61b73552ffc7663f88254a667675
type_inferenced_ast: a0252ac4dd8d899b9de2245a0a9da52e2d453724a1460729bf9080bd85e25918

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 35c17de2e9d8a63b29cbeaeeb7eebfa886ff4ae536938e571e953ee206ba8a59
canonicalized_ast: 8f09ad7c9a20220bf8d9fe7e5c84a7c1e99b840fbeb682fb5646df9a05efbd8b
type_inferenced_ast: b1e1e8b1c22a2c98f82d26a1a339952dbe085366b5dc3bb36d71cf4c842739b9
initial_ast: b79a2575c7197fbf84fde3f76907b090df3276ee19226b8cf29e085e1bca293f
canonicalized_ast: 679f991e238383bbdacab1c73c3fb74bb48cb4e28cb0a1056320f66d9f5bdef7
type_inferenced_ast: bed66d5177af10f49f9606dbaf0d907cc2edf54d9ba8cbebb78ce6597a3d4ed5

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 5654f2be64d7879bfa2cb49029bd6c3b757c0eb28dd32744de41a28effae5891
canonicalized_ast: 42710d4ec40860cbd1a88da9738960c5a07a6a9937436ec474b3f1bbc805aac4
type_inferenced_ast: d7f138829083963f935922d492a94a693b963d3acee6fadb325be8d99f0e4d19
initial_ast: 1604eadec9fd814ed2a25a47d65ba466923085e42535fdde616ab91b84df58b6
canonicalized_ast: 780f1b481da6ceb8370fbf1623dffe9e221e1eaeb49a508e65f23a9e6fd66c2e
type_inferenced_ast: 6ad36ae09c6a97c3f6e0c17e067b5b8f7249ddfdcf82299772600fe57fd21d05

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 46fccf2a1d04ff7bbfb9a88eeceb6cfd39adcf7ce2e2323d4fb83f4ae3dba273
canonicalized_ast: 222568f9f7b61876690514fdd2dd12419b2e889269a2b7aabd7223d291167da5
type_inferenced_ast: f1a5656978bd48409401788332b1a1d90c969178e65af06b54d5b4445be84375
initial_ast: 64a1b6b1a6ee85c634ca751a4e02aa79241292bb5d85c6203bcd58cd7118c250
canonicalized_ast: b42168f9136f4d24344749de5d965094b25ef02fca3ff2fafcca4261fe0498fe
type_inferenced_ast: 88447d445a55f04f55d8cb6cb7874c2b4fe58c4f31183fbe3e8ef8b0cbdd8dd9

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 684a9fc0a433525dfbe52d8037588845ad55782b2c1b046bd91049c3b9d9ea4c
canonicalized_ast: 684a9fc0a433525dfbe52d8037588845ad55782b2c1b046bd91049c3b9d9ea4c
type_inferenced_ast: 1fce4132eea4711a6b42fab47478d3608d16df3930554350ed46d865162f7043
initial_ast: dbd9f87921535e5269952220b41d1e2494988fe55bc4d9c339591deb50a8deec
canonicalized_ast: dbd9f87921535e5269952220b41d1e2494988fe55bc4d9c339591deb50a8deec
type_inferenced_ast: a2a0d048a15f73bea5dc90da534ec3660e3b8b83129332508c6c80a7f4dabece

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: bd8793749cfd151b89162febc55b6bb6de1be867a0009da6a8470106953db630
canonicalized_ast: 9ecf61f153db9d0912cae6891258e0ebdaecd0da6eef7bbc92c3a6476c7adf6d
type_inferenced_ast: 6908fc70e763ff518a9942a3b930aac64b70075be1b734c2ac93175ca1f16f97
initial_ast: f273c6ca514a9741c6ffd81f4988a8a871ab431dc005cdcf23fd40c133e55d6c
canonicalized_ast: 1d6ac1e465454c9cd8dce30c67cd86b5f0e22d8703a1876cb8874f995777aacb
type_inferenced_ast: 14e96eb628e8226fad23b3cf26015dcda3833227460b03490c89fa6b3e8622f8

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: c983e5e79b4325ac133ac1a5ff0b1655c646111389991286322b8c16c5833837
canonicalized_ast: 8dcb714238ef7e9fd3c66a7a12ec4621bb4e9ac5994f1c692215a9f93463ce9e
type_inferenced_ast: ebd34799bd1c6936ca5032812d2466bade58df616cc06e3c6e57151a06b78601
initial_ast: 9b6b6e753c84f5711fdf93ed977cce28edc91ffb3cbbf111ea7ed338ca6b530a
canonicalized_ast: 1ba4f5a98aea455a3177098c8c48141030999a5e0d54f4bcc7073d4f11d9ab90
type_inferenced_ast: 7c195b6b9a50cd004d70e8db1b7056dcb7a44aef114e97864e0d9587d1edc65e

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: ef90c67bd868ad3d1362b37acad99a97316700c60c9667a4d67b8ad392b2922c
canonicalized_ast: ef90c67bd868ad3d1362b37acad99a97316700c60c9667a4d67b8ad392b2922c
type_inferenced_ast: 636fbf53660cedd9c05b6c361fae19ae5adaae85adc98e888308072ef843f8fa
initial_ast: 99f9f8472dad22d652fd62a10a172571a6e99996c670e51d548315921c925ca0
canonicalized_ast: 99f9f8472dad22d652fd62a10a172571a6e99996c670e51d548315921c925ca0
type_inferenced_ast: 4ad3ac0c4dd7a77adf119c87f6f8debe9b289b9a1624cf8c003e594e0e195bdc

View File

@ -19,6 +19,6 @@ outputs:
r1:
type: bool
value: "true"
initial_ast: 5a3189a6167d84e140e6e8d2dbfcbb35de5b02927733de0c1143ede46f2fbcf2
canonicalized_ast: 5a3189a6167d84e140e6e8d2dbfcbb35de5b02927733de0c1143ede46f2fbcf2
type_inferenced_ast: 7bc19e1d45f6cd7d88edb80aa02c5d92021d0cfc6473d9404f513bda95b30b6b
initial_ast: ba47abf40aa1a020c02c89341ce5ef7e5e6f0fc4fe8d915c22f0dc1bb8b74087
canonicalized_ast: ba47abf40aa1a020c02c89341ce5ef7e5e6f0fc4fe8d915c22f0dc1bb8b74087
type_inferenced_ast: a385d28baf03fe2580535e63d2fce42657a43a6057f9ff47e8b1c1425de96452

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "false"
initial_ast: 8b9ad0b83a216048ab6179c6e223f68290059bab1deb72771f72a672ea7a0bf9
canonicalized_ast: acdf383c635404bccf9612be9c14c96e400496fb231cf3062bce9aa269331c0f
type_inferenced_ast: ab3b8dc3ddfba1affaacf2bc344c658d5b82419544da136e42c810a3f99f3832
initial_ast: 5bd6dae2912e7905dd03c40fce64b09c1de66ce1d5c555e96fad0a3e3af0630f
canonicalized_ast: 49ed4dc186c5d21f0d174d7256587b545193ec541d0d87e5f9cbacedbed03245
type_inferenced_ast: 063cb49f47e467cef48e38e8fe16d10f917bdf6d55a0adee26a955d69a67c18a

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: d6273a716c2546b210eeefb640b5c34830fb2b2a4195ae0b636843e855fcbc1e
canonicalized_ast: 41a3c4ffe7c243ffc76bc7d3c147f77f71119d64e632581a20eb1cd576752ac3
type_inferenced_ast: 196e5191c3d8c8cc552b419422b3e1411fa576336f63ae9d5c340bf2a7d62942
initial_ast: 8c00ae2b8a4f80635ec9277599592828009931229216fb74e49423175a46ebd4
canonicalized_ast: 99805c27122348834d2a550baccc61771a2234542e4fdd861fc1bf94403e5bc5
type_inferenced_ast: e5680b8864a5c8edb6c0ea314ca8cfe2e56eaaabfee94fb09702e3b4f538bc24

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 1a78fdc95fad861e53d1b0463228701df726fa0bf5092bd94d1d35f57c8c2a94
canonicalized_ast: 1a78fdc95fad861e53d1b0463228701df726fa0bf5092bd94d1d35f57c8c2a94
type_inferenced_ast: be1c8166ce3ae7f805d8600441996328ce8f45ada3c16c4284f07d07af52ef75
initial_ast: f1a1c5fb3d3a5d23c30b3eb7f47aeb1211dbcf6f77a3b1ca262b7c231f4488ef
canonicalized_ast: f1a1c5fb3d3a5d23c30b3eb7f47aeb1211dbcf6f77a3b1ca262b7c231f4488ef
type_inferenced_ast: f5189d9b934533ed5225063ffe1adb59508c53e3951a74c03d6c27d41fc7621a

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 47ef8cd0b57a42612bc9138c6da6e05fbca27c47464acf5af569c2fe0c91dd31
canonicalized_ast: 39c0b27ba63cc34eed735900912e154031ca1f291aade9d9964ce49e77eeb19e
type_inferenced_ast: 19bfc761f899b48a3e0c4142bac6cbdaceac8230e92422cf9f6a99d9f7eddc6f
initial_ast: 9b093fc03bf985f26e5e57c0b6508bb515535c79a951c9838a5320ba4a702ed8
canonicalized_ast: d34e1c3c2bbae1f2103e1b5d4058c607dc78af8f62a254947abb991ec6254eeb
type_inferenced_ast: a76a3eef4ef99bcb1ba050e9d3083106082608e838ea94e0ddbb943583c81483

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 7e0ba7b09b3840a5d4fc9f0d413163ba2de8f207c3818f604f9a71297aac30f3
canonicalized_ast: 3f7efb61847fd75fed58b70526da8ceffb573a0806521fb30443f341c3d14a45
type_inferenced_ast: a1baf614c8ab13c1ff978faf8022f90eef4c482261928cb3256ab4d63e20096c
initial_ast: 2b6234a13e1b49f7ac587ea697e113b600bdf8e05437ce0352264234688b00ee
canonicalized_ast: ed79e2c766f81e1d60b6a9a25b59313d8dd3e93cf9dbd7b9cf2ffc7336ecb3ac
type_inferenced_ast: daf4bdd6a544c2f3da08cd7ab67c40688cb52f0eec2c13fa70fa827f42722674

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 042e056c86e545ce256459a0de20d44c0bae24ff406becba4330e3208c48e180
canonicalized_ast: 6cab1ab863f40c96d5d6921e2ced0dd00ebe5e9e334d84508af708be19ae8f59
type_inferenced_ast: 17ff3e62f1c48edfbfb1c35ed4ac542260b59153d85afeca2e707dde217dc675
initial_ast: 17d120d595b3bd1276d4566a0bef48a90e0d545556d54b83da89d88b17342a1d
canonicalized_ast: 0f9e739ef57e1d870b2c5410f821d14194dd882e315720f207f83933f5c85fda
type_inferenced_ast: 1ecf52246630058f5b4294b015b787ca175c3189660c5f3135d6456fc011a2b5

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: ad1dd786c43b4d3de69b6e162bed3f01a0a53f0643e6fd2d95f12c98dfa16855
canonicalized_ast: ad1dd786c43b4d3de69b6e162bed3f01a0a53f0643e6fd2d95f12c98dfa16855
type_inferenced_ast: 1c983cf518cfafbe158ee3e42aed5cb190863b09aedfc4dd34e0268160ee79e2
initial_ast: b8decf097c42e00f24432d5d72b4c4c53f404089b913330e972f81494b4c4bfb
canonicalized_ast: b8decf097c42e00f24432d5d72b4c4c53f404089b913330e972f81494b4c4bfb
type_inferenced_ast: ebba4df8a81de92d3bf06d07ab611429653b570e1620405d246f3de5921055e0

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 6a099d784f82bb8065c8efdd2b4018089d968a7f57cbab3406df3ec5d0612410
canonicalized_ast: 6a099d784f82bb8065c8efdd2b4018089d968a7f57cbab3406df3ec5d0612410
type_inferenced_ast: 58541200a815edfee41333b9b2b048add269d0924ca17457ecf9fbcbb5032ccf
initial_ast: 2e52456f9df93f41894195cca7658fc90b2fd91b08b356105a96394ca586c06c
canonicalized_ast: 2e52456f9df93f41894195cca7658fc90b2fd91b08b356105a96394ca586c06c
type_inferenced_ast: 86ef8ab226a58f140de1fcdadc31eb86e4a1930cabf36a8d9a4607233ea6ab80

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 98debe360fb6fbede5a9db625cbc2e4e4dfddcb23f40e3914e909157334e1d70
canonicalized_ast: 98debe360fb6fbede5a9db625cbc2e4e4dfddcb23f40e3914e909157334e1d70
type_inferenced_ast: 50c06c3666a830c7f1fd533c412a4e8054fdb494845f4f5d85414b08f1c1a8dd
initial_ast: 9cd9cca5cd79f5db65ebcc4d90cd9c4aedf2310972eb3146b0057352f1164e48
canonicalized_ast: 9cd9cca5cd79f5db65ebcc4d90cd9c4aedf2310972eb3146b0057352f1164e48
type_inferenced_ast: dd2d745566c22b0a07d4340563cccf84492707955ac04f910c3a4edfedcbfcef

View File

@ -16,6 +16,6 @@ outputs:
b:
type: bool
value: "true"
initial_ast: 1c5370b54401931103a9aee59aadbc05dd747e758a20dcf9665ba181777d76d5
canonicalized_ast: 1c5370b54401931103a9aee59aadbc05dd747e758a20dcf9665ba181777d76d5
type_inferenced_ast: 04a1f100613ccf2f49733ecc76c83058d78c14c03fc4817df117eaa9a8296c66
initial_ast: 7bca73fcc59e8e6d650c4a373b5d5ff213313921747ac90a4bfc2991d6fc64e1
canonicalized_ast: 7bca73fcc59e8e6d650c4a373b5d5ff213313921747ac90a4bfc2991d6fc64e1
type_inferenced_ast: ce2f3b04378b21d025bbeb2e068c5213c10649f4b9424108c4b644df3a40628b

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 1ef884c7c1e9e5a806bc5dce27cd68f33b3cddf5c1ebf930a292fd6adb5762ce
canonicalized_ast: 1ef884c7c1e9e5a806bc5dce27cd68f33b3cddf5c1ebf930a292fd6adb5762ce
type_inferenced_ast: aeedb43de348c034bee08c8df80d0fb2e8f9e7f11989e57cfa4fb8bbf876eb83
initial_ast: e3ed0c2d5a80c3204622b6eab8ba40478c7d368c7f0d438bc368d3960352c481
canonicalized_ast: e3ed0c2d5a80c3204622b6eab8ba40478c7d368c7f0d438bc368d3960352c481
type_inferenced_ast: 3484caa99ad87d5d0f7e78aa796ee852b5ac151d197f6d6eddd83a10c0124f12

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 6f08333f0f602b1ef25d548da7f5f5a611a4409281e3412fe380c367a76bac24
canonicalized_ast: 6f08333f0f602b1ef25d548da7f5f5a611a4409281e3412fe380c367a76bac24
type_inferenced_ast: 3a05ae6705cfc5a344631563ed43c3caf73c1762bef0b4a4165ae73e1466e27f
initial_ast: 396f04c5dd0931574b1b0ae902b34e4ef8b3726fd416408817880c5682248ff1
canonicalized_ast: 396f04c5dd0931574b1b0ae902b34e4ef8b3726fd416408817880c5682248ff1
type_inferenced_ast: 558a38b4db2ccd6aebe783126779507ab1d15a2ab1dbc2cab059781eac3c1406

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 0eabec3e7bd9d1b1ca1666329f7bd3ad9d3095d209c94f83a19b60e78857375f
canonicalized_ast: 0eabec3e7bd9d1b1ca1666329f7bd3ad9d3095d209c94f83a19b60e78857375f
type_inferenced_ast: c6fb6168c1089361909edf6d76a9d3cba97a2f907821eb7f71198f1fb6bb1310
initial_ast: c548108297c45d7200d2ac2ba63508cf054c7155276cdf36edfd253b3e08760b
canonicalized_ast: c548108297c45d7200d2ac2ba63508cf054c7155276cdf36edfd253b3e08760b
type_inferenced_ast: b9175a900de11b17c46fd577284edcbea0edcf3623cb4aa2c6a0dbddc7aa0a62

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 8db095ba3755c4c0a5c661f82acea4d5088fcc7a1f21445d8f6a76aa349be14c
canonicalized_ast: db2825ad023eb01f420686f407d0411e99d06be1f13116ffce5b18d7e9ceffd6
type_inferenced_ast: 2afc66cedc72641dbae33927247993fa9b03402889e3a71005888d0e26f34114
initial_ast: 5a240aa18f18fa86a93f9afe164fa57be60e02d0c17c53c7c85acde1f8f1521b
canonicalized_ast: 2730cf8fd4d2dfeebe7fa59513b3771036ba4592ebf49b2bb79184d61a94b816
type_inferenced_ast: 698f855d2dec5e71dfe6eafb71feeaf7310ae891cac97146c045e29ca7927907

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 7671936b5d58627c508151bd0a851661e929424791064674180e651e5f9d7f8b
canonicalized_ast: 7671936b5d58627c508151bd0a851661e929424791064674180e651e5f9d7f8b
type_inferenced_ast: 08ccc60dc31ebf449c8a359dca037f99b22cd971fe4c5b5606310fa0fe9cd1a9
initial_ast: 3cd87b63238cd5c3b4a81ff70705b81520c0918f8c96981a5bdb883969e93fce
canonicalized_ast: 3cd87b63238cd5c3b4a81ff70705b81520c0918f8c96981a5bdb883969e93fce
type_inferenced_ast: 4430b0cf1e6840545eade12d3a190bdd5a7697f43c35550973ffa708b5eb8230

View File

@ -16,6 +16,6 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: cac8070caf7819b61e0f1d5fc3557c76957acb69e958b6cdfc793c416f0b9fd0
canonicalized_ast: e678afe5d42eb07b14965803f080cbda55b8c01f65ddf417367a75949223a27f
type_inferenced_ast: c100f9c558b94b2c89b78da4867e2ed5e6bc4de8ec6f3218d64c26ba9c73b428
initial_ast: 8b2329e734f6303814a0d966ae4c6f73759ac27c4aaf0c4d4c0dce2246432c89
canonicalized_ast: b9e26a9fb7eda254c88415dc27d78c5fe8188d2744cfe9ca1eee14884bea29b2
type_inferenced_ast: 12452254a2646aaee22ad23816f20a1cbfa0a30b1113f566b3e868d1c9c896e4

View File

@ -16,6 +16,6 @@ outputs:
out:
type: "[char; 13]"
value: "\"Hello, World!\""
initial_ast: 69219c995852ced5fe06a4009c4d58a8b59cc23ed7144ab4f08d4e0d4a6c5798
canonicalized_ast: c099eab8cd118203aa297b200be1fd331f6e20ed1f19ff87efe16d406f5a0ce0
type_inferenced_ast: acef5428f299c6cdbd9ac4b644123cf17a379efe025656122e359abe06da7eb8
initial_ast: d9722744752d1e520000486349f5d81a1ac504489f2e70a04e01da0a452dd0ae
canonicalized_ast: a50aea84d29aff20e79082266ba91642b2db0e0cc606c25b8862ea6cc1d041ae
type_inferenced_ast: 8a3c5b0362e97f14d48031df035d8e97c5bc46b3d77f107b149922d6c5c72ccb

View File

@ -280,6 +280,7 @@ outputs:
col_stop: 6
path: test
content: "x[x.y..]"
type_: ~
right: ~
span:
line_start: 1
@ -304,6 +305,7 @@ outputs:
col_stop: 8
path: test
content: "x[..y.x]"
type_: ~
span:
line_start: 1
line_stop: 1
@ -326,6 +328,7 @@ outputs:
col_stop: 6
path: test
content: "x[x.y..y.x]"
type_: ~
right:
CircuitMemberAccess:
circuit:
@ -338,6 +341,7 @@ outputs:
col_stop: 11
path: test
content: "x[x.y..y.x]"
type_: ~
span:
line_start: 1
line_stop: 1
@ -362,6 +366,7 @@ outputs:
col_stop: 6
path: test
content: "x[x.y.x..y.x.y]"
type_: ~
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
span:
line_start: 1
@ -370,6 +375,7 @@ outputs:
col_stop: 8
path: test
content: "x[x.y.x..y.x.y]"
type_: ~
right:
CircuitMemberAccess:
circuit:
@ -384,6 +390,7 @@ outputs:
col_stop: 13
path: test
content: "x[x.y.x..y.x.y]"
type_: ~
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
span:
line_start: 1
@ -392,6 +399,7 @@ outputs:
col_stop: 15
path: test
content: "x[x.y.x..y.x.y]"
type_: ~
span:
line_start: 1
line_stop: 1

View File

@ -13,6 +13,7 @@ outputs:
col_stop: 4
path: test
content: x.y
type_: ~
- CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X.Y\\\"}\"}"
@ -24,6 +25,7 @@ outputs:
col_stop: 4
path: test
content: X.Y
type_: ~
- CircuitMemberAccess:
circuit:
CircuitMemberAccess:
@ -37,6 +39,7 @@ outputs:
col_stop: 4
path: test
content: x.y.z
type_: ~
name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}"
span:
line_start: 1
@ -45,6 +48,7 @@ outputs:
col_stop: 6
path: test
content: x.y.z
type_: ~
- Call:
function:
CircuitMemberAccess:
@ -58,6 +62,7 @@ outputs:
col_stop: 4
path: test
content: x.y()
type_: ~
arguments: []
span:
line_start: 1
@ -79,6 +84,7 @@ outputs:
col_stop: 4
path: test
content: x.y.0
type_: ~
index:
value: "0"
span:
@ -101,6 +107,7 @@ outputs:
col_stop: 4
path: test
content: "x.y[1]"
type_: ~
index:
Value:
Implicit:

View File

@ -26,6 +26,7 @@ outputs:
col_stop: 5
path: test
content: "-x.y"
type_: ~
op: Negate
span:
line_start: 1

View File

@ -26,6 +26,7 @@ outputs:
col_stop: 5
path: test
content: "!x.y"
type_: ~
op: Not
span:
line_start: 1