Merge pull request #1327 from AleoHQ/abnf-ast-changes

[ABNF] CircuitOrAlias changed to Identifier
This commit is contained in:
gluax 2021-09-06 22:23:52 -07:00 committed by GitHub
commit 81271c918f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
57 changed files with 80 additions and 152 deletions

View File

@ -205,7 +205,7 @@ impl<'a> Scope<'a> {
.collect::<Result<Vec<_>>>()?,
),
SelfType => return Err(AsgError::unexpected_big_self(span).into()),
CircuitOrAlias(name) => {
Identifier(name) => {
if let Some(circuit) = self.resolve_circuit(&name.name) {
Type::Circuit(circuit)
} else if let Some(alias) = self.resolve_alias(&name.name) {

View File

@ -227,7 +227,7 @@ impl<'a> Into<leo_ast::Type> for &Type<'a> {
),
ArrayWithoutSize(type_) => leo_ast::Type::Array(Box::new(type_.as_ref().into()), None),
Tuple(subtypes) => leo_ast::Type::Tuple(subtypes.iter().map(Into::into).collect()),
Circuit(circuit) => leo_ast::Type::CircuitOrAlias(circuit.name.borrow().clone()),
Circuit(circuit) => leo_ast::Type::Identifier(circuit.name.borrow().clone()),
}
}
}

View File

@ -116,7 +116,7 @@ impl Canonicalizer {
fn canonicalize_self_type(&self, type_option: Option<&Type>) -> Option<Type> {
match type_option {
Some(type_) => match type_ {
Type::SelfType => Some(Type::CircuitOrAlias(self.circuit_name.as_ref().unwrap().clone())),
Type::SelfType => Some(Type::Identifier(self.circuit_name.as_ref().unwrap().clone())),
Type::Array(type_, dimensions) => Some(Type::Array(
Box::new(self.canonicalize_self_type(Some(type_)).unwrap()),
dimensions.clone(),

View File

@ -41,7 +41,7 @@ impl<R: ReconstructingReducer> ReconstructingDirector<R> {
Type::Tuple(reduced_types)
}
Type::CircuitOrAlias(identifier) => Type::CircuitOrAlias(self.reduce_identifier(identifier)?),
Type::Identifier(identifier) => Type::Identifier(self.reduce_identifier(identifier)?),
_ => type_.clone(),
};

View File

@ -37,7 +37,7 @@ pub enum Type {
#[serde(serialize_with = "serialize_array")]
Array(Box<Type>, Option<ArrayDimensions>),
Tuple(Vec<Type>),
CircuitOrAlias(Identifier),
Identifier(Identifier), // ex Circuit or Alias
SelfType,
}
@ -53,7 +53,7 @@ impl Type {
/// Returns `true` if the self `Type` is a `Circuit`.
///
pub fn is_circuit(&self) -> bool {
matches!(self, Type::CircuitOrAlias(_))
matches!(self, Type::Identifier(_))
}
///
@ -69,7 +69,7 @@ impl Type {
(Type::Field, Type::Field) => true,
(Type::Group, Type::Group) => true,
(Type::IntegerType(left), Type::IntegerType(right)) => left.eq(right),
(Type::CircuitOrAlias(left), Type::CircuitOrAlias(right)) => left.eq(right),
(Type::Identifier(left), Type::Identifier(right)) => left.eq(right),
(Type::SelfType, Type::SelfType) => true,
(Type::Array(left_type, left_dim), Type::Array(right_type, right_dim)) => {
// Convert array dimensions to owned.
@ -161,7 +161,7 @@ impl fmt::Display for Type {
Type::Field => write!(f, "field"),
Type::Group => write!(f, "group"),
Type::IntegerType(ref integer_type) => write!(f, "{}", integer_type),
Type::CircuitOrAlias(ref variable) => write!(f, "circuit {}", variable),
Type::Identifier(ref variable) => write!(f, "circuit {}", variable),
Type::SelfType => write!(f, "SelfType"),
Type::Array(ref array, ref dimensions) => {
if let Some(dimensions) = dimensions {

View File

@ -266,7 +266,7 @@ impl<R: ReconstructingReducer, O: CombinerOptions> CombineAstAsgDirector<R, O> {
asg: &AsgCircuitAccessExpression,
) -> Result<CircuitMemberAccessExpression> {
let type_ = if self.options.type_inference_enabled() {
Some(leo_ast::Type::CircuitOrAlias(asg.circuit.get().name.borrow().clone()))
Some(leo_ast::Type::Identifier(asg.circuit.get().name.borrow().clone()))
} else {
None
};

View File

@ -91,7 +91,7 @@ impl ParserContext {
(Type::SelfType, token.span)
} else if let Some(ident) = self.eat_identifier() {
let span = ident.span.clone();
(Type::CircuitOrAlias(ident), span)
(Type::Identifier(ident), span)
} else if let Some(token) = self.eat(Token::LeftParen) {
let mut types = Vec::new();
let end_span;

View File

@ -16,7 +16,7 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: a4a3b4b30742544a6dae3d76794504173c1cc64f217bd3feda033ce51512a670
imports_resolved_ast: a4a3b4b30742544a6dae3d76794504173c1cc64f217bd3feda033ce51512a670
canonicalized_ast: a4a3b4b30742544a6dae3d76794504173c1cc64f217bd3feda033ce51512a670
initial_ast: 6349e2684562bad873bcf643e01eeb02039295bd41e2df77f1fefc7bb3f2d3bb
imports_resolved_ast: 6349e2684562bad873bcf643e01eeb02039295bd41e2df77f1fefc7bb3f2d3bb
canonicalized_ast: 6349e2684562bad873bcf643e01eeb02039295bd41e2df77f1fefc7bb3f2d3bb
type_inferenced_ast: 508686ddeb2f8fad60d9ad58639b5a761e6c5f5b61e105803eb8a98d8065a2ad

View File

@ -16,7 +16,7 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: d83b33119db295fa2ed7795c8e17d4073cabba5e90e9438cd53f3a9a77585f19
imports_resolved_ast: d83b33119db295fa2ed7795c8e17d4073cabba5e90e9438cd53f3a9a77585f19
canonicalized_ast: d83b33119db295fa2ed7795c8e17d4073cabba5e90e9438cd53f3a9a77585f19
type_inferenced_ast: 77be8ec74bc15f2a45e8bf29e7973bc0c721008fe5508dcc6d02b91aae3d84ee
initial_ast: 9f78c996da10363fb594947ca29fef29e35a7032761ce87f69f3ae454650d47e
imports_resolved_ast: 9f78c996da10363fb594947ca29fef29e35a7032761ce87f69f3ae454650d47e
canonicalized_ast: 9f78c996da10363fb594947ca29fef29e35a7032761ce87f69f3ae454650d47e
type_inferenced_ast: 103314a18ce6036da1ab4cc32c025b694cf799492460ab9553dfbd5232544a89

View File

@ -16,7 +16,7 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: d9b0b6772317f0e2d1042dba26c19b4eb71a7e902c643cbeb0a4f62630f0f1bc
imports_resolved_ast: d9b0b6772317f0e2d1042dba26c19b4eb71a7e902c643cbeb0a4f62630f0f1bc
canonicalized_ast: d9b0b6772317f0e2d1042dba26c19b4eb71a7e902c643cbeb0a4f62630f0f1bc
type_inferenced_ast: e384fbed9e161b04c6c9e85f45788e5047385f289ef89d20fdacee00a8fb3e5c
initial_ast: ee817c17e6bef3b458e14d3a81c087ed6a75c4554bc70b62466e8d8e43ff1b5e
imports_resolved_ast: ee817c17e6bef3b458e14d3a81c087ed6a75c4554bc70b62466e8d8e43ff1b5e
canonicalized_ast: ee817c17e6bef3b458e14d3a81c087ed6a75c4554bc70b62466e8d8e43ff1b5e
type_inferenced_ast: b15c7e773ebb56e339f750401241e38aab4ab8950c20a70acc293afc1b91d917

View File

@ -16,7 +16,7 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 7feac3e33e75789d3b532a7cc857f324cd7abed380d578791803b3162edcfdec
imports_resolved_ast: 7feac3e33e75789d3b532a7cc857f324cd7abed380d578791803b3162edcfdec
canonicalized_ast: 7feac3e33e75789d3b532a7cc857f324cd7abed380d578791803b3162edcfdec
initial_ast: 8d5ed3110bc3a61ddee37408133fcc1f77209b65bb83d230729203009e093f40
imports_resolved_ast: 8d5ed3110bc3a61ddee37408133fcc1f77209b65bb83d230729203009e093f40
canonicalized_ast: 8d5ed3110bc3a61ddee37408133fcc1f77209b65bb83d230729203009e093f40
type_inferenced_ast: bc54ad21e90ab297b40ff570dfc379cbca61fdc9e20bd6899f4b964f726954b0

View File

@ -16,7 +16,7 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 671704ed30a8c68ebffe2a58ff4799f626badf975d2d0dded3b06f5264e5c0db
imports_resolved_ast: 671704ed30a8c68ebffe2a58ff4799f626badf975d2d0dded3b06f5264e5c0db
canonicalized_ast: 671704ed30a8c68ebffe2a58ff4799f626badf975d2d0dded3b06f5264e5c0db
type_inferenced_ast: eb525f7c227207a1037b96838d2f0cf597968c14117b3fae30564f3cd5a3a27b
initial_ast: f7b2eb89c51644dc8596988bcc66fbfe471489887c6f46b78ca417746c7ef442
imports_resolved_ast: f7b2eb89c51644dc8596988bcc66fbfe471489887c6f46b78ca417746c7ef442
canonicalized_ast: f7b2eb89c51644dc8596988bcc66fbfe471489887c6f46b78ca417746c7ef442
type_inferenced_ast: f24ef5063928ee7998b53e5e66064c56c01bd99d55b736309d3a1d11ff2fec05

View File

@ -1,5 +0,0 @@
---
namespace: Compile
expectation: Fail
outputs:
- "Error [EASG0373047]: a function input cannot be named `x` as a alias with that name already exists in this scope\n --> compiler-test:5:15\n |\n 5 | function main(x: u32, y: bool) -> bool {\n | ^"

View File

@ -16,7 +16,7 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: cd2e85ff29ee11d30e73dbba0a612223a8a26dff125069ad7ac05697fd4c9829
imports_resolved_ast: cd2e85ff29ee11d30e73dbba0a612223a8a26dff125069ad7ac05697fd4c9829
canonicalized_ast: cd2e85ff29ee11d30e73dbba0a612223a8a26dff125069ad7ac05697fd4c9829
initial_ast: 66ead06ceac4fea6a24fe071a955986722a53975fa98d2ad2909a83fa8ba8525
imports_resolved_ast: 66ead06ceac4fea6a24fe071a955986722a53975fa98d2ad2909a83fa8ba8525
canonicalized_ast: 66ead06ceac4fea6a24fe071a955986722a53975fa98d2ad2909a83fa8ba8525
type_inferenced_ast: 1e73226b2cbbd5c7a36ffe70b778e0e544976d2e09a1f0ba3f2b486d1b604d58

View File

@ -1,5 +0,0 @@
---
namespace: Compile
expectation: Fail
outputs:
- "Error [EASG0373047]: a function input cannot be named `int` as a alias with that name already exists in this scope\n --> compiler-test:6:9\n |\n 6 | let int: int = 1u32;\n | ^^^"

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: 843884ddf198fe566cea0f8e84a2902f720d6211c9d8bad98299eea4da846870
imports_resolved_ast: 843884ddf198fe566cea0f8e84a2902f720d6211c9d8bad98299eea4da846870
canonicalized_ast: c30721e60523bc31af9a9bf342d9b89bf92a26e3886394cc0c1a574560715bdf
type_inferenced_ast: c37f209961a9acff1d942af1e4a9a332123676f2bc581ca94604314f9d738a1e
type_inferenced_ast: baed608da257be0625cd54a796c2f89e9aec8b1ff60f23c7657a0c4fc260e1d1

View File

@ -25,4 +25,4 @@ outputs:
initial_ast: 4e74124bc410534941ef9b79ffb64656d14e145b5a79fbd14419c1aef2f0ef69
imports_resolved_ast: 4e74124bc410534941ef9b79ffb64656d14e145b5a79fbd14419c1aef2f0ef69
canonicalized_ast: 4e74124bc410534941ef9b79ffb64656d14e145b5a79fbd14419c1aef2f0ef69
type_inferenced_ast: f5cb6326028b3cf9187889be6ac5ed5bd095a570d45ae63c7285a09366fc6803
type_inferenced_ast: de80815f88fb65efa62ce7f5fa23c6fc4f1bbdf601954e94c1212c4eabbee1cb

View File

@ -103,4 +103,4 @@ outputs:
initial_ast: 0c2aeb5b47fc21f5aded4e3aebcdf55eb98c10c6b51a2a6dcb98490a96da0c97
imports_resolved_ast: 0c2aeb5b47fc21f5aded4e3aebcdf55eb98c10c6b51a2a6dcb98490a96da0c97
canonicalized_ast: 0c2aeb5b47fc21f5aded4e3aebcdf55eb98c10c6b51a2a6dcb98490a96da0c97
type_inferenced_ast: 84977d828c2988392d85d4156d34d168a3265aca3c3516b3ddb974d3d9eee2dc
type_inferenced_ast: e9c5fc64aad2390305671ffbe316eee04d5fca7a6f09dcc8c8a69c38db8b3a62

View File

@ -16,7 +16,7 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 58f66e3a45b1752bb5dbb454adbbe6136394a7a87bc7b812d154aec1d5eac816
imports_resolved_ast: 58f66e3a45b1752bb5dbb454adbbe6136394a7a87bc7b812d154aec1d5eac816
canonicalized_ast: f7359bbb8cecd0923c0aa7dd7fd6b01cb2c64e45f1e777709fb14d4e6ba0ee5a
type_inferenced_ast: f3a0378b8b60f66ca164be498224592907216262a54a92d878e52f0a85f53389
initial_ast: 3802c9e1638389140218e5eacb10d9ee53398ed6c083cfa4c24b7f4218512e45
imports_resolved_ast: 3802c9e1638389140218e5eacb10d9ee53398ed6c083cfa4c24b7f4218512e45
canonicalized_ast: 6c18b527bfd6571cfb1af7113259977040ec35ad2593bbe275011d0b204afe81
type_inferenced_ast: 3f4dc74bea13fe2e97a042f3b4dd7042df725a172a151db628745ee3c7d7cd1a

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: 50c0f7261d879373f4e01ec3d140a2067ca4e78622c8340e8312d717f6effb05
imports_resolved_ast: 50c0f7261d879373f4e01ec3d140a2067ca4e78622c8340e8312d717f6effb05
canonicalized_ast: 50c0f7261d879373f4e01ec3d140a2067ca4e78622c8340e8312d717f6effb05
type_inferenced_ast: 161edd5d1900f2902bd8cc972308ce7fb0afe7c6cf64ab7cfe952c3f1b3189c0
type_inferenced_ast: 68174a753a3191ea961db29f62b6557f410ee33c2cad28c43a5098bb6cb230f2

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: bfd7751e8ea64c6d41af36d968f194a18a5411ac71932a67766f40448ce755f5
imports_resolved_ast: bfd7751e8ea64c6d41af36d968f194a18a5411ac71932a67766f40448ce755f5
canonicalized_ast: bfd7751e8ea64c6d41af36d968f194a18a5411ac71932a67766f40448ce755f5
type_inferenced_ast: 910b51f962861da6011f214a5379bc9296034e3fecda347b17c7db97df833a25
type_inferenced_ast: c6ca022e97bef335bf6df235875d507240eb48ea28f6504cc17c3d09820430f9

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: d8a66347f480161a2215c92d2cf6ded2d0b49fd76b7eb0036d4fa33de371925a
imports_resolved_ast: d8a66347f480161a2215c92d2cf6ded2d0b49fd76b7eb0036d4fa33de371925a
canonicalized_ast: d8a66347f480161a2215c92d2cf6ded2d0b49fd76b7eb0036d4fa33de371925a
type_inferenced_ast: d5bb87130d78bb39fa948ce868999184f90c78ada176cf08c49051517de3351c
type_inferenced_ast: cb82c955829007961356ca2760b6ca84e2ea321cd640e87d4a51fd3ba65eb7a7

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: c40a1d60f872fdb03ab7379a3abf43439a100b8f1546b76ffeac60c8739e0d68
imports_resolved_ast: c40a1d60f872fdb03ab7379a3abf43439a100b8f1546b76ffeac60c8739e0d68
canonicalized_ast: c40a1d60f872fdb03ab7379a3abf43439a100b8f1546b76ffeac60c8739e0d68
type_inferenced_ast: 3d56ffd95d1b84970e24f10a48f52053717876f062db72d8be93f413f7b2c9a3
type_inferenced_ast: 2221472ded58b4a6c77545040ca32138d68eb6f2c3e47b830317872f045f91f8

View File

@ -18,5 +18,5 @@ outputs:
value: "true"
initial_ast: cf642f2f983cd8bcd6cbca2d2920f5234d79375601c1da3c06f97b6185a5629d
imports_resolved_ast: cf642f2f983cd8bcd6cbca2d2920f5234d79375601c1da3c06f97b6185a5629d
canonicalized_ast: f99560385252ad2965e39b19402e7c56db402458206187eeb54adc26effd9bb5
type_inferenced_ast: c7c5cd5ed24fd3967f19a5ad895aeb7778b3dfadc7965c3f5bc1d44c61448083
canonicalized_ast: de45d7a621a1309ca9ae0dd11f4a99e8ff1e0b92c9f990d2f72a6c43067a7611
type_inferenced_ast: 690a93dcec9c31c26b52ca234ce8e07067649c038e47fd8b7eeef9e36dddf05b

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: 5273a592b167cfe040b2bca7337521084d7a6640651bca584545e9eeb2e4fa88
imports_resolved_ast: 5273a592b167cfe040b2bca7337521084d7a6640651bca584545e9eeb2e4fa88
canonicalized_ast: 5273a592b167cfe040b2bca7337521084d7a6640651bca584545e9eeb2e4fa88
type_inferenced_ast: 6d1bef6ecbba4533266f9478b06e52acc56f04850e99a658abffe39e7e463cdf
type_inferenced_ast: ee2152aedd637adcfdd84540bfd8814c65cc8552c0bae80a0176b91d70b1266e

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: 241f1a42877b012b2e2062cefbd83523a5c719557cb422cf1fbd7efb0f7b1796
imports_resolved_ast: 241f1a42877b012b2e2062cefbd83523a5c719557cb422cf1fbd7efb0f7b1796
canonicalized_ast: 241f1a42877b012b2e2062cefbd83523a5c719557cb422cf1fbd7efb0f7b1796
type_inferenced_ast: 2982ee6fda2fcbd00f64d2c0c75ccacf58ab05961f85e9a64cc0ddec12bb5209
type_inferenced_ast: e063513fb0d009c0cadd36cab9feb4327528bbba45087d7a65e0e97fcd54bb7a

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: cf41b78f9435c6555014db8aeebe662556f4f8547ee0f3a204d6f522fcf72644
imports_resolved_ast: cf41b78f9435c6555014db8aeebe662556f4f8547ee0f3a204d6f522fcf72644
canonicalized_ast: cf41b78f9435c6555014db8aeebe662556f4f8547ee0f3a204d6f522fcf72644
type_inferenced_ast: d947fa6d8fa1b34cc9822ade386062dbd6ebc2cb5987479d4263bcfa554586cd
type_inferenced_ast: 2fbe148dcadf6f460f64824e311f1f061265dc81e2eaff555987dbf55094b3a4

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: 622baae85ab7776fc38cff17465e8e0dbcdb98f4ba74e734ca494b696cea8ccd
imports_resolved_ast: 622baae85ab7776fc38cff17465e8e0dbcdb98f4ba74e734ca494b696cea8ccd
canonicalized_ast: 622baae85ab7776fc38cff17465e8e0dbcdb98f4ba74e734ca494b696cea8ccd
type_inferenced_ast: c604cecb0efbae6b8ea3d69909c5decbb06d6a2e95ff67661f5936ef8fd951a5
type_inferenced_ast: f97b773504a230c42546d6a565b970fbf51ec293c15ee58d4f9dfa40b7a4a988

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: ba91ea172a2f753bf4a338f29fff05c358d4dc0cb1c2ef461d492ee4fe2a1114
imports_resolved_ast: ba91ea172a2f753bf4a338f29fff05c358d4dc0cb1c2ef461d492ee4fe2a1114
canonicalized_ast: 8d1beaecc785aa79a5a6bec47cf10426b9d3d87ccc15c359f12c7d3ee2a95561
type_inferenced_ast: 520a83004a666274e62958b6e2025d11ed5e24d888b6bc0ded6d01ee9a3bc634
type_inferenced_ast: d69ef792ee9b73a3d486535216ade98bd500aff7061e5b3cb48e5f1ffd519286

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: fe7ca41c29d33107a4316b9c6788898217129937cbf1de0f2ea7566a360245f0
imports_resolved_ast: fe7ca41c29d33107a4316b9c6788898217129937cbf1de0f2ea7566a360245f0
canonicalized_ast: d2b30a9485e7166a0efde9d179432e481a4d40540e1b3eeec043b84d993e66df
type_inferenced_ast: 2c666d0e878095617bc562aa74de4fe069401b4a80ba8dba28a47a789f517ab5
type_inferenced_ast: 7f279d6a24e597f0d1e6dbc5d26db3bc0ac6dc8520b7b485f296824c2e872a0e

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: 659e5fcdd16752c6e3504f821a5afd6f0756bd6b8641f127ba049c2a4c83a088
imports_resolved_ast: 659e5fcdd16752c6e3504f821a5afd6f0756bd6b8641f127ba049c2a4c83a088
canonicalized_ast: 8cf6113b757cfeee53554c67dd3f380f0f417032b8835259bf30076b19349f61
type_inferenced_ast: d4106eb006385de5bf2a56a1ebaa25a65b048f77dda6fb9585c86a9260073585
type_inferenced_ast: 63445b0618aa26ad71f316dea01a0558be3462295c4ef7ddcc042a6098e80725

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: 8c4a98dec3d2e9e826e3419c91a251e821861a146325b025c52ff15b5edefe1c
imports_resolved_ast: 8c4a98dec3d2e9e826e3419c91a251e821861a146325b025c52ff15b5edefe1c
canonicalized_ast: 8c4a98dec3d2e9e826e3419c91a251e821861a146325b025c52ff15b5edefe1c
type_inferenced_ast: 2497671092bacab8cb5d75177298a700100bfa8412a48a7115d178e5d9816a6b
type_inferenced_ast: a88491df0bd761c2c92882182087308683df773c06b6337d47e47658024ba6ea

View File

@ -16,7 +16,7 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 1f7de14429213b2b3b564d664c33e9cea134e1a157b861a1cf0ea1abc90b32f6
imports_resolved_ast: 1f7de14429213b2b3b564d664c33e9cea134e1a157b861a1cf0ea1abc90b32f6
canonicalized_ast: 94752f37ca7553267f341d2f96e657eb2fe6b5e403a4d3fb7d66d1662b81eb00
type_inferenced_ast: e675411217f3465fdc23bab3c2f50c2264452d198ab3dd2e8059e546e54312a4
initial_ast: 842ec0aa120289fc341e19deefa59c7f78af032b1221b749323e0e4b6ce9023d
imports_resolved_ast: 842ec0aa120289fc341e19deefa59c7f78af032b1221b749323e0e4b6ce9023d
canonicalized_ast: c554b4086bcc2a245ee45c1a7ee7879c23dfab6872c8f0254bd258f1d78854b5
type_inferenced_ast: 8aca5d3beb3f7988b97d7ee3ed5f5376e508e35b687bc70cc402824e3740afc9

View File

@ -18,5 +18,5 @@ outputs:
value: "true"
initial_ast: c341e62f8a3940ddc9527bcd01c814f8d496a1f02ca903b080b6228d155af02b
imports_resolved_ast: c341e62f8a3940ddc9527bcd01c814f8d496a1f02ca903b080b6228d155af02b
canonicalized_ast: 60cd9f24460e06522814151af817c9d394c779477091aab2c77c77dfe228b611
type_inferenced_ast: 876f075ed034c8914b9f74f46f07bd6c2ed3e7d7f1ffb15e756da10e9ec9abf8
canonicalized_ast: 3f982b126b30b7d4e6f69d186eae87e539ac99c186e3ffc95e101996c447aac6
type_inferenced_ast: ca39452d2a0bfc4763004f6422de9c969c90bef10f6ec1ce47d71ce6fbf14d60

View File

@ -18,5 +18,5 @@ outputs:
value: "true"
initial_ast: 5da09287f1d3a5e4ab57f8da2c8094df25c3b35614791e2f6e84a77b609f29b0
imports_resolved_ast: 5da09287f1d3a5e4ab57f8da2c8094df25c3b35614791e2f6e84a77b609f29b0
canonicalized_ast: de5114bff3425e0c67e9e70e3a0d02bdf2d6c3ed9108dac43a00b79d4db9b3d2
type_inferenced_ast: 9a6f5ee1784a1af0a04736e1b3bc886107bbddc5d45bbabd59812d083acacdea
canonicalized_ast: ef7bf4fbec528e16a88b50e4c5b96f9e16a136fb06b9d7ba145641e22382e166
type_inferenced_ast: cfec0af03e9a908d876dd84a977fbccb7ddbda93e4f26b2bb7c1e7349ef41c3f

View File

@ -18,5 +18,5 @@ outputs:
value: "true"
initial_ast: 1dce719e850f6ca6a091fea163d5d6bb069bcdafeeed0a10fb332ba8837e6e5c
imports_resolved_ast: 1dce719e850f6ca6a091fea163d5d6bb069bcdafeeed0a10fb332ba8837e6e5c
canonicalized_ast: 3bd96f7e9530f426db4a2e12d5a93a5ebcafedbcb7b4549d08ad387fa15918d9
type_inferenced_ast: 6bbb246f57aa199b9ef31b61b6e858004617455efe22393892bf0c22f552d69a
canonicalized_ast: c2e6a47b169e35f9d0eeb382b9ad3fbfb474dcfcce36f518a615bedd50f168dc
type_inferenced_ast: ada2285ca841403ea8f299de603e6f83f001aa7c59f0ccdb798cf3ed874cbe1f

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: c2f6d0da67de691b14cffbdbe20eba613f2ea274c45aba4347045da2446b6af6
imports_resolved_ast: c2f6d0da67de691b14cffbdbe20eba613f2ea274c45aba4347045da2446b6af6
canonicalized_ast: c2f6d0da67de691b14cffbdbe20eba613f2ea274c45aba4347045da2446b6af6
type_inferenced_ast: 3bf3d109f59519ecbfd601c36a8cb89cfb36e1ace395e361860023b8f93fc220
type_inferenced_ast: 66f38055929362798774a530c32dd375c979368f2ed3c7b0345dd8ecfefe3ea7

View File

@ -1,21 +0,0 @@
---
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: 80d3dbfdeb9d6fb6e9ba17ba028bd2bf71014b4353f34db9d69a66ee1d0914cf
canonicalized_ast: 80d3dbfdeb9d6fb6e9ba17ba028bd2bf71014b4353f34db9d69a66ee1d0914cf
type_inferenced_ast: bbad9d7593fb1aa2bcc25f2f2625ace659e18f293af35082ad39b1e3cd71e8b5

View File

@ -22,4 +22,4 @@ outputs:
initial_ast: f8b2853c4b5db8f5e8402455ceae54d8ae421c4b950d15fc88fe9f9c9a9701b8
imports_resolved_ast: f8b2853c4b5db8f5e8402455ceae54d8ae421c4b950d15fc88fe9f9c9a9701b8
canonicalized_ast: f8b2853c4b5db8f5e8402455ceae54d8ae421c4b950d15fc88fe9f9c9a9701b8
type_inferenced_ast: 8a3cbc4e3f51c432179167c22247efecc49afe8990c5b2e5a1eb757d0f5adad9
type_inferenced_ast: 52232bc9ef6145283b66f274ab534f35ad5cbf76ed6396c34cf0d6bf59b0797c

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: b4e5073c07791c4726b69f3e60ec66ccebefb7a3811f4a3576fc4042f8c80114
imports_resolved_ast: b4e5073c07791c4726b69f3e60ec66ccebefb7a3811f4a3576fc4042f8c80114
canonicalized_ast: 03a4e0ffc6deea9c6500a9d91eb683a780e8f5961801bea1aab26c14e4543325
type_inferenced_ast: 66d0a55ff2ab6931d5806dcbb2ff23f9dbc41a883f19a45af8a41d3be84e136d
type_inferenced_ast: abbbde55152e4dfe84e7c1f1a6cb82cbcf8b54d46efbcaa7b8c0854f6dee9e25

View File

@ -16,7 +16,7 @@ outputs:
r0:
type: bool
value: "true"
initial_ast: 6e689aa459b9ea2fa0c18c9dc0f2512db9d430f5c7101cb3104a275711d60210
imports_resolved_ast: c4260b58a631ee77b0492ba1354182b2c95d260dcf01a62e2a0797eb5f268478
canonicalized_ast: 7e2eaf52ce5c79242b44357609ab667df411190bf7a11228d240c314f0ce0502
type_inferenced_ast: be897b5b17a946c2595afcc8a802df5fa4e013ba3acb4159a0123d7cf1941544
initial_ast: 7db61dab5c9e6647ad0649ba4fac74c7d5c7d6990f301db9f8da7c2deb2d0078
imports_resolved_ast: a1eeec54a46d6e9afba716fbc27cf5650875e01bb4f035d74f504934654761a6
canonicalized_ast: 12b30de036076b06f0409f38b0b84df3100cd8293eb8bf5def0f397d133f8ce1
type_inferenced_ast: 9db739a86d6e420f1d2a60078efc7a048a2985b264fb25ab218d962be573c20c

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: ae6826642faa492e34507695dbd11e5b44c319aecb0b1e78b29ce03ae446d907
imports_resolved_ast: e08b138c63ede9de6e090e6b7fbcfbbc27a1ae49b032a6cffcafaa8f76410839
canonicalized_ast: e08b138c63ede9de6e090e6b7fbcfbbc27a1ae49b032a6cffcafaa8f76410839
type_inferenced_ast: b311680f4429cc16661f774b0547936be148a3dd9f478013adefe575629b88fa
type_inferenced_ast: 71e74fbf0bd10a5f2069ebc887ae3e624bd1d4f8654878b54fb932cdbb067752

View File

@ -1,5 +0,0 @@
---
namespace: Compile
expectation: Fail
outputs:
- aborting due to syntax error

View File

@ -1,5 +0,0 @@
---
namespace: Compile
expectation: Fail
outputs:
- aborting due to syntax error

View File

@ -1,5 +0,0 @@
---
namespace: Compile
expectation: Fail
outputs:
- " --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^\n |\n = expected data type `u32`, found `u8`"

View File

@ -1,5 +0,0 @@
---
namespace: Compile
expectation: Fail
outputs:
- aborting due to syntax error

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: dc7f40a1cfc4daa659784bf538f1273145b430875116ef1aad7fd778dcb5f736
imports_resolved_ast: dc7f40a1cfc4daa659784bf538f1273145b430875116ef1aad7fd778dcb5f736
canonicalized_ast: dc7f40a1cfc4daa659784bf538f1273145b430875116ef1aad7fd778dcb5f736
type_inferenced_ast: f86a95c627e69d54fd6f1f651eda77cfc1ac1fab33b1ef8bbe5bf511a8c4beb7
type_inferenced_ast: f1d1997e4d2a975664689164c1113ab8ac1e0933910410324aeb204a72da3b12

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: 6b051c3f9ce82efb30d3ba89764cc9c2607a126cb0cede72ad55ecda6c9d996d
imports_resolved_ast: 6b051c3f9ce82efb30d3ba89764cc9c2607a126cb0cede72ad55ecda6c9d996d
canonicalized_ast: 6b051c3f9ce82efb30d3ba89764cc9c2607a126cb0cede72ad55ecda6c9d996d
type_inferenced_ast: 3c04200d560739b0d551204b65e56abc11f26843b99aa0361362f61f0d6a3328
type_inferenced_ast: 945f580a5c7a138000c0163b32e004c52e048ddf2166d0c9cfd67cd9485dc886

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: 6fce132965ff40126f6175d2abe5b8598004e90cdb29c4707f7c63dbe1093474
imports_resolved_ast: 6fce132965ff40126f6175d2abe5b8598004e90cdb29c4707f7c63dbe1093474
canonicalized_ast: 6fce132965ff40126f6175d2abe5b8598004e90cdb29c4707f7c63dbe1093474
type_inferenced_ast: 75cff35e24806b8a66431668c319a96e95f5106a8fe513eb53abb264beab4390
type_inferenced_ast: e79e7662148ee3db46c9d52b751fb80a13213b22065e4a5008a7443ae85419e0

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: a155141331da2d7bdaa11ae738d6ca2e1d62d875c872b8b8213184d989cc8baa
imports_resolved_ast: a155141331da2d7bdaa11ae738d6ca2e1d62d875c872b8b8213184d989cc8baa
canonicalized_ast: a155141331da2d7bdaa11ae738d6ca2e1d62d875c872b8b8213184d989cc8baa
type_inferenced_ast: b4969327ce0ee30ab1526ce3b2479a7bf6efa38cb9616477f854cd28b1faf61a
type_inferenced_ast: 096e1372719be459b86ad5dea6e2e62f3afc350a204c382d4bebb835fa2dc615

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: 71448f3f5387cd67a8d8c0b974fa93cf81cdfb72ae0d8f9499c9c5e478a0d15b
imports_resolved_ast: 71448f3f5387cd67a8d8c0b974fa93cf81cdfb72ae0d8f9499c9c5e478a0d15b
canonicalized_ast: 16d4030e454d8c83d2073afaaa7e8fa1eb40d36026909144db29d311ab005f46
type_inferenced_ast: a446d016451281bab9b21f8a86250b4a3fd8a9b6f917e855e5dae816362c8925
type_inferenced_ast: 2d0489a411d4336c01958f074b96957f3f8ae682b0046ffadf9cbddf66f7f168

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: 83da7a1bf2887678937835ac77b33a0e21dd3b04d5739146f16a559b8dc3c6ab
imports_resolved_ast: 83da7a1bf2887678937835ac77b33a0e21dd3b04d5739146f16a559b8dc3c6ab
canonicalized_ast: 83da7a1bf2887678937835ac77b33a0e21dd3b04d5739146f16a559b8dc3c6ab
type_inferenced_ast: bd7710479d2a5bb2da060358fc13379dc1d7e334ead42519315bce0cd0db30c0
type_inferenced_ast: b0d9f15a133962134f094c0aa682d7f2f77085b9cad845b8af05cf48e9b7b9ca

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: 108be85422345d78a93d2e36e633c3a15a1465e7c868f65e2925a47e0b5f691a
imports_resolved_ast: 108be85422345d78a93d2e36e633c3a15a1465e7c868f65e2925a47e0b5f691a
canonicalized_ast: d986fa603a5031dbd5034507d05df038fe99f60f603f7ca4b2d2c8ac2b409e7a
type_inferenced_ast: c95a6049c552c5b018f423fc1999b433cf94429c6edc32e2b55d326b78e36812
type_inferenced_ast: 2f852c7591f1790075fe73a53f9b2ceb3bca69a8cc7ef1d27d70e5f53e8b144f

View File

@ -1,21 +0,0 @@
---
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: inputs/dummy.in
output:
registers:
r0:
type: bool
value: "true"
initial_ast: 75fbb3ed1613fbf39ce803ff903befe209b26a953ba8db1d68e35066655d96e6
canonicalized_ast: a96cae2c9e347245e07c63b5c94cf43497063c3f548c615627da4b1775e9a17b
type_inferenced_ast: dc663974ed1cce7b15c35eda29c9b1af5426eafddbd108b5a03cd7071ad4a6bc

View File

@ -19,4 +19,4 @@ outputs:
initial_ast: 3aa0745060289c1a1af4e66265f8a92a89caff1731dc70d8c6a59798152f1a38
imports_resolved_ast: 3aa0745060289c1a1af4e66265f8a92a89caff1731dc70d8c6a59798152f1a38
canonicalized_ast: a1acfd3169b8f72975cd7cc9ef2059cd8fb1ed5ea0a7f51911d3365b52375e36
type_inferenced_ast: 55d57669ceeb95e039cb000e3673f7590c2bd69bb67786057977d158ab77dbdb
type_inferenced_ast: f84470f86eadd14d2a9a56e4f1c2ff349610064704c30b169f15f0bd82b61959

View File

@ -18,7 +18,7 @@ outputs:
inner:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"y as id\\\"}\"}"
target_type:
CircuitOrAlias: "{\"name\":\"id\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"y as id\\\"}\"}"
Identifier: "{\"name\":\"id\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"y as id\\\"}\"}"
span:
line_start: 1
line_stop: 1

View File

@ -19,7 +19,7 @@ outputs:
const_: false
mutable: true
type_:
CircuitOrAlias: "{\"name\":\"MyCircuit\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}"
Identifier: "{\"name\":\"MyCircuit\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}"
span:
line_start: 3
line_stop: 3