most compiler tests passing

This commit is contained in:
gluax 2022-04-27 12:04:45 -07:00
parent 8c7fe53ff6
commit 5108cab460
14 changed files with 27 additions and 93 deletions

View File

@ -4,7 +4,6 @@ expectation: Fail
input_file: input/dummy.in
*/
function main(y: bool) -> bool {
console.log("{}", 1u8);
return y;

View File

@ -12,7 +12,7 @@ function main(y: bool) -> bool {
let a = 0u32;
for i in 0..10 {
a += one();
a = a + one();
}
return (a == 10u32) == y;

View File

@ -8,7 +8,7 @@ function iteration() -> u32 {
let a = 0u32;
for i in 0..10 {
a += 1;
a = a + 1;
}
return a;

View File

@ -2,21 +2,8 @@
namespace: Compile
expectation: Pass
outputs:
- circuit:
num_public_variables: 0
num_private_variables: 95
num_constraints: 127
at: 2cbb45563950440ec6b2ad12e378f1df49d6a12d4e773f0aa898f65f4eb109ff
bt: 7e12153373f45abf58e3b2954d1f1abfc951c7c1203e9e6c96fc37d9d25d8442
ct: 50977b6cd45450d9fddf5934d9167f889165f6ff117b03bb780bd6d89434daf4
output:
- input_file: input/integers.in
output:
registers:
a:
type: u32
value: "4"
initial_ast: b0aee81e563eee312c23111cbc8e4539b75e0327aa542a47fab9d4ef37b38fbe
imports_resolved_ast: 0804164d1eb1d00132f7f5a7f2610d939694ece73e1705062dbd2793308c2cc8
canonicalized_ast: 0804164d1eb1d00132f7f5a7f2610d939694ece73e1705062dbd2793308c2cc8
type_inferenced_ast: e1a8d8a2ad3b963df503aa562c3b59d37a9c083e63d7de2cc871fd86c6c2be8c
- output:
- input_file: "[main]\na: u32 = 0;\nb: u32 = 0;\n\n[registers]\na: u32 = 0;\nb: u32 = 0;"
initial_input_ast: 5f87daedee2388c007b6a79619b20407b8460a41ff30433a611554f9bacd6ecf
symbol_table: 201ed1188a77438794f46c40fd317d61309595d6b8a6964db2391ea33194ba9c
initial_ast: 9e6a274bbf78b10fc2fe402fb5b75fec31690d4661259dec5695ee38520a9d6f

View File

@ -2,21 +2,8 @@
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: 15a5fd1ead3be9705022c6b8d6b1d5b027ce3372197d4d342f30ba5dc5108d3a
imports_resolved_ast: be81990192561dd8a22cbf67cc29447f0a61a33b8bb676819be381c84298c4d4
canonicalized_ast: c0311c2e3223d0a32afee57aafb1323bb08366a904d0775ef48f701bc108e37d
type_inferenced_ast: 8a5cc60bef30ee846dd5bd18f0d1df4539c0b6c000f7dca1aeb1b3853bb10621
- output:
- input_file: "[main]\na: u32 = 10;\nb: u32 = 100;\ny: bool = true;\n\n[registers]\nr0: bool = true;\nr1: bool = true;\n"
initial_input_ast: d718416ac1a3ae6c6d9cc30f75175eb408f584cff8de4994a756a054e4571dbc
symbol_table: b3e2b8611c915bb1cc02c55da02f52b14220c46b641a64c12d373e5b080e05aa
initial_ast: fe8956cdb15c1c47f66eaf29a4432aba5bc8ac69317bcde3373515ab3a9c4e0f

View File

@ -2,21 +2,8 @@
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: 2739f323c714258c2f41be1ea0e7d5d4b1b6100d41a232204221540e3d155b98
imports_resolved_ast: 1348982d07ba2b271bde48ec59dcadcf287d4878832bfd504dc225126f3bb0db
canonicalized_ast: 5e9ba7cd47bd28af1a72b83d830cde2c9c737cce10e87f928fb3fbbb010a81c9
type_inferenced_ast: fb07aaa6e07d7ab768366ae79ba95f3938a76892155ca7b142d3ed65efe6c6a5
- output:
- input_file: "[main]\na: u32 = 10;\nb: u32 = 100;\ny: bool = true;\n\n[registers]\nr0: bool = true;\nr1: bool = true;\n"
initial_input_ast: d718416ac1a3ae6c6d9cc30f75175eb408f584cff8de4994a756a054e4571dbc
symbol_table: 810eac2cd2c03bd318d5216b4bba024737c31201ee0ca7f2713ef1adf01b78d4
initial_ast: aa3f5e742a53e960cd3e522099fca35f0a80977fe5815241a50b367c34a76600

View File

@ -2,21 +2,8 @@
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: 9db2132a80b875db93ba9faa272d46c8e0b9bd3e561f457e4388b6b75f2da708
imports_resolved_ast: 1d17d29a3020a099484220650ad8f1477b713874f5ba7181a4e96752f9addbe3
canonicalized_ast: 1d17d29a3020a099484220650ad8f1477b713874f5ba7181a4e96752f9addbe3
type_inferenced_ast: 333404df1440cae1176b04c0c9eee5a0370c16295a20ce45c6144849e209ff44
- output:
- input_file: "[main]\na: u32 = 10;\nb: u32 = 100;\ny: bool = true;\n\n[registers]\nr0: bool = true;\nr1: bool = true;\n"
initial_input_ast: d718416ac1a3ae6c6d9cc30f75175eb408f584cff8de4994a756a054e4571dbc
symbol_table: 2cfbddeb0164fe71820d396f5eb04b09e354158022e54c498a676cb9ce676a57
initial_ast: af7f82d7b8b1c09d0658813c7f59fa5ae9b65f697ae04399d01f6fb142e5f880

View File

@ -2,21 +2,8 @@
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: baf6543c53c08f26703bca8541dd804c699470fd9378c5f1fc0edccf8f070a54
imports_resolved_ast: bc8f34c08103383ddc262f881a669798e66f8944302448fd87315928e5a161e4
canonicalized_ast: bc8f34c08103383ddc262f881a669798e66f8944302448fd87315928e5a161e4
type_inferenced_ast: ccdd5b12784e3763ec28fe860feb45e0c3b8866d15e8b939ab8fe8c343d1b855
- output:
- input_file: "[main]\na: u32 = 10;\nb: u32 = 100;\ny: bool = true;\n\n[registers]\nr0: bool = true;\nr1: bool = true;\n"
initial_input_ast: d718416ac1a3ae6c6d9cc30f75175eb408f584cff8de4994a756a054e4571dbc
symbol_table: b25c0ab70906c0cac81eca91609c3ad6201198c2f871147e455f0689d1222e6d
initial_ast: 3c9f874c442a8b41ff0e3f3f212d96690d2665022d7898045bec0b18495db1bc