Merge branch 'testnet3' into feat/loop-unrolling

This commit is contained in:
Pranav Gaddamadugu 2022-07-18 07:54:48 -07:00
commit 1b872576b2
375 changed files with 1800 additions and 1712 deletions

821
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -28,6 +28,7 @@ path = "leo/main.rs"
[workspace]
members = [
"compiler/compiler",
"compiler/parser",
"docs/grammar",
"errors",
"leo/package",
@ -46,18 +47,22 @@ version = "1.5.3"
path = "./leo/package"
version = "1.5.3"
[dependencies.leo-parser]
path = "./compiler/parser"
version = "1.5.3"
[dependencies.leo-span]
path = "./compiler/span"
version = "1.5.3"
[dependencies.aleo]
git = "https://github.com/AleoHQ/aleo.git"
rev = "02db93e"
rev = "220e56"
[dependencies.snarkvm]
#path = "../snarkVM"
git = "https://github.com/AleoHQ/snarkVM.git"
rev = "0dea89e"
rev = "5657881"
features = ["circuit", "console"]
[dependencies.backtrace]

View File

@ -260,6 +260,11 @@ pub trait ProgramReconstructor: StatementReconstructor {
name: input.name,
network: input.network,
expected_input: input.expected_input,
imports: input
.imports
.into_iter()
.map(|(id, import)| (id, self.reconstruct_import(import)))
.collect(),
functions: input
.functions
.into_iter()
@ -287,4 +292,8 @@ pub trait ProgramReconstructor: StatementReconstructor {
fn reconstruct_circuit(&mut self, input: Circuit) -> Circuit {
input
}
fn reconstruct_import(&mut self, input: Program) -> Program {
input
}
}

View File

@ -173,6 +173,8 @@ pub trait StatementVisitor<'a>: ExpressionVisitor<'a> {
/// A Visitor trait for the program represented by the AST.
pub trait ProgramVisitor<'a>: StatementVisitor<'a> {
fn visit_program(&mut self, input: &'a Program) {
input.imports.values().for_each(|import| self.visit_import(import));
input
.functions
.values()
@ -189,4 +191,8 @@ pub trait ProgramVisitor<'a>: StatementVisitor<'a> {
}
fn visit_circuit(&mut self, _input: &'a Circuit) {}
fn visit_import(&mut self, input: &'a Program) {
self.visit_program(input)
}
}

View File

@ -33,6 +33,8 @@ pub struct Program {
/// Expected main function inputs.
/// Empty after parsing.
pub expected_input: Vec<FunctionInput>,
/// A map from import names to import definitions.
pub imports: IndexMap<Identifier, Program>,
/// A map from function names to function definitions.
pub functions: IndexMap<Identifier, Function>,
/// A map from circuit names to circuit definitions.
@ -41,6 +43,9 @@ pub struct Program {
impl fmt::Display for Program {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
for (id, _import) in self.imports.iter() {
writeln!(f, "import {}.leo;", id)?;
}
for (_, function) in self.functions.iter() {
function.fmt(f)?;
writeln!(f,)?;
@ -60,6 +65,7 @@ impl Default for Program {
name: String::new(),
network: String::new(),
expected_input: vec![],
imports: IndexMap::new(),
functions: IndexMap::new(),
circuits: IndexMap::new(),
}

View File

@ -15,18 +15,27 @@
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
use super::*;
use leo_errors::{ParserError, ParserWarning, Result};
use crate::parse_ast;
use leo_errors::{CompilerError, ParserError, ParserWarning, Result};
use leo_span::source_map::FileName;
use leo_span::sym;
use leo_span::symbol::with_session_globals;
use std::fs;
impl ParserContext<'_> {
/// Returns a [`Program`] AST if all tokens can be consumed and represent a valid Leo program.
pub fn parse_program(&mut self) -> Result<Program> {
let mut imports = IndexMap::new();
let mut functions = IndexMap::new();
let mut circuits = IndexMap::new();
while self.has_next() {
match &self.token.token {
Token::Import => {
let (id, import) = self.parse_import()?;
imports.insert(id, import);
}
Token::Circuit | Token::Record => {
let (id, circuit) = self.parse_circuit()?;
circuits.insert(id, circuit);
@ -47,6 +56,7 @@ impl ParserContext<'_> {
name: String::new(),
network: String::new(),
expected_input: Vec::new(),
imports,
functions,
circuits,
})
@ -64,6 +74,53 @@ impl ParserContext<'_> {
)
}
/// Parses an import statement `import foo.leo;`.
pub(super) fn parse_import(&mut self) -> Result<(Identifier, Program)> {
// Parse `import`.
let _start = self.expect(&Token::Import)?;
// Parse `foo`.
let import_name = self.expect_identifier()?;
// Parse `.leo`.
self.expect(&Token::Dot)?;
let leo_file_extension = self.expect_identifier()?;
// Throw error for non-leo files.
if leo_file_extension.name.ne(&sym::leo) {
return Err(ParserError::leo_imports_only(leo_file_extension, self.token.span).into());
}
let _end = self.expect(&Token::Semicolon)?;
// Tokenize and parse import file.
// Todo: move this to a different module.
let mut import_file_path =
std::env::current_dir().map_err(|err| CompilerError::cannot_open_cwd(err, self.token.span))?;
import_file_path.push("imports");
import_file_path.push(format!("{}.leo", import_name.name));
// Throw an error if the import file doesn't exist.
if !import_file_path.exists() {
return Err(CompilerError::import_not_found(import_file_path.display(), self.token.span).into());
}
// Read the import file into string.
// Todo: protect against cyclic imports.
let program_string =
fs::read_to_string(&import_file_path).map_err(|e| CompilerError::file_read_error(&import_file_path, e))?;
// Create import file name.
let name: FileName = FileName::Real(import_file_path);
// Register the source (`program_string`) in the source map.
let prg_sf = with_session_globals(|s| s.source_map.new_source(&program_string, name));
// Use the parser to construct the imported abstract syntax tree (ast).
let program_ast = parse_ast(self.handler, &prg_sf.src, prg_sf.start_pos)?;
Ok((import_name, program_ast.into_repr()))
}
/// Returns a [`Vec<CircuitMember>`] AST node if the next tokens represent a circuit member variable
/// or circuit member function or circuit member constant.
pub fn parse_circuit_members(&mut self) -> Result<(Vec<CircuitMember>, Span)> {

View File

@ -314,6 +314,7 @@ impl Token {
"i128" => Token::I128,
"if" => Token::If,
"in" => Token::In,
"import" => Token::Import,
"let" => Token::Let,
"public" => Token::Public,
"record" => Token::Record,

View File

@ -94,17 +94,18 @@ pub enum Token {
// Regular Keywords
Circuit,
Console,
/// Const variable and a const function.
// Const variable and a const function.
Const,
/// Constant parameter
// Constant parameter
Constant,
Else,
For,
Function,
If,
Import,
In,
Let,
/// For public inputs.
// For public inputs.
Public,
Return,
SelfLower,
@ -137,6 +138,7 @@ pub const KEYWORD_TOKENS: &[Token] = &[
Token::I64,
Token::I128,
Token::If,
Token::Import,
Token::In,
Token::Let,
Token::Public,
@ -182,6 +184,7 @@ impl Token {
Token::I128 => sym::i128,
Token::If => sym::If,
Token::In => sym::In,
Token::Import => sym::import,
Token::Let => sym::Let,
Token::Public => sym::Public,
Token::Record => sym::record,
@ -277,6 +280,7 @@ impl fmt::Display for Token {
For => write!(f, "for"),
Function => write!(f, "function"),
If => write!(f, "if"),
Import => write!(f, "import"),
In => write!(f, "in"),
Let => write!(f, "let"),
SelfLower => write!(f, "self"),

View File

@ -156,7 +156,14 @@ impl<'a> CodeGenerator<'a> {
fn visit_circuit_init(&mut self, input: &'a CircuitExpression) -> (String, String) {
// Lookup circuit or record.
let name = if let Some(type_) = self.composite_mapping.get(&input.name.name) {
format!("{}.{}", input.name.to_string().to_lowercase(), type_)
let name = input.name.to_string().to_lowercase();
if name.eq("record") {
// record.private;
format!("{}.{}", name, type_)
} else {
// foo; // no visibility for interfaces
name
}
} else {
unreachable!("All composite types should be known at this phase of compilation")
};

View File

@ -16,7 +16,7 @@
use crate::CodeGenerator;
use leo_ast::{Circuit, CircuitMember, Function, Program};
use leo_ast::{Circuit, CircuitMember, Function, Identifier, Program};
use indexmap::IndexMap;
use itertools::Itertools;
@ -24,9 +24,31 @@ use std::fmt::Write as _;
impl<'a> CodeGenerator<'a> {
pub(crate) fn visit_program(&mut self, input: &'a Program) -> String {
let mut program_string = format!("program {}.{};\n", input.name, input.network);
// Accumulate instructions into a program string.
let mut program_string = String::new();
// Visit each `Circuit` or `Record` in the Leo AST and produce a bytecode circuit.
if !input.imports.is_empty() {
// Visit each import statement and produce a Aleo import instruction.
program_string.push_str(
&input
.imports
.iter()
.map(|(identifier, imported_program)| self.visit_import(identifier, imported_program))
.join("\n"),
);
// Newline separator.
program_string.push('\n');
}
// Print the program id.
writeln!(program_string, "program {}.{};", input.name, input.network)
.expect("Failed to write program id to string.");
// Newline separator.
program_string.push('\n');
// Visit each `Circuit` or `Record` in the Leo AST and produce a Aleo interface instruction.
program_string.push_str(
&input
.circuits
@ -35,9 +57,10 @@ impl<'a> CodeGenerator<'a> {
.join("\n"),
);
// Newline separator.
program_string.push('\n');
// Visit each `Function` in the Leo AST and produce a bytecode function.
// Visit each `Function` in the Leo AST and produce a Aleo function instruction.
program_string.push_str(
&input
.functions
@ -49,6 +72,15 @@ impl<'a> CodeGenerator<'a> {
program_string
}
fn visit_import(&mut self, import_name: &'a Identifier, import_program: &'a Program) -> String {
// Load symbols into composite mapping.
let _import_program_string = self.visit_program(import_program);
// todo: We do not need the import program string because we generate instructions for imports separately during leo build.
// Generate string for import statement.
format!("import {}.aleo;", import_name)
}
fn visit_circuit_or_record(&mut self, circuit: &'a Circuit) -> String {
if circuit.is_record {
self.visit_record(circuit)

View File

@ -57,4 +57,8 @@ impl<'a> ProgramVisitor<'a> for CreateSymbolTable<'a> {
self.handler.emit_err(err);
}
}
fn visit_import(&mut self, input: &'a Program) {
self.visit_program(input)
}
}

View File

@ -191,8 +191,10 @@ symbols! {
function,
If: "if",
In: "in",
import,
input,
Let: "let",
leo,
log,
main,
Mut: "mut",

View File

@ -401,13 +401,6 @@ create_messages!(
help: None,
}
@backtraced
failed_to_open_manifest {
args: (error: impl Display),
msg: format!("Failed to open manifest file: {}", error),
help: Some("Create a package by running `leo new`.".to_string()),
}
@backtraced
failed_to_load_instructions {
args: (error: impl Display),
@ -456,6 +449,13 @@ create_messages!(
msg: format!("Failed to parse the `aleo run` command.\nSnarkVM Error: {}", error),
help: None,
}
@backtraced
failed_to_execute_aleo_clean {
args: (error: impl Display),
msg: format!("Failed to execute the `aleo clean` command.\nSnarkVM Error: {}", error),
help: None,
}
);
impl CliError {

View File

@ -309,7 +309,21 @@ create_messages!(
@formatted
illegal_static_member_assignment {
args: (member: impl Display),
msg: format!("Tried to assign to static member `{}`", member),
msg: format!("Tried to assign to static member `{member}`"),
help: None,
}
@formatted
import_not_found {
args: (file_path: impl Display),
msg: format!("Attempted to import a file that does not exist `{file_path}`."),
help: None,
}
@formatted
cannot_open_cwd {
args: (err: impl ErrorArg),
msg: format!("Failed to open current working directory. Error: {err}"),
help: None,
}
);

View File

@ -317,14 +317,6 @@ create_messages!(
help: None,
}
/// For when removing the circuit file failed.
@backtraced
failed_to_remove_aleo_file {
args: (path: impl Debug),
msg: format!("failed removing aleo file from the provided file path - {:?}", path),
help: None,
}
/// For when removing the circuit file failed.
@backtraced
failed_to_remove_circuit_file {
@ -427,47 +419,39 @@ create_messages!(
@backtraced
failed_to_create_source_directory {
args: (error: impl ErrorArg),
msg: format!("failed creating source directory {}", error),
msg: format!("Failed creating source directory {}.", error),
help: None,
}
/// For when getting a source file entry failed.
/// For when getting a Leo file entry failed.
@backtraced
failed_to_get_source_file_entry {
failed_to_get_leo_file_entry {
args: (error: impl ErrorArg),
msg: format!("failed to get input file entry: {}", error),
msg: format!("Failed to get Leo file entry: {}.", error),
help: None,
}
/// For when getting the source file extension failed.
@backtraced
failed_to_get_source_file_extension {
failed_to_get_leo_file_extension {
args: (extension: impl Debug),
msg: format!("failed to get source file extension: {:?}", extension),
msg: format!("Failed to get Leo file extension: {:?}.", extension),
help: None,
}
/// For when getting the source file type failed.
/// For when getting the Leo file type failed.
@backtraced
failed_to_get_source_file_type {
failed_to_get_leo_file_type {
args: (file: impl Debug, error: impl ErrorArg),
msg: format!("failed to get source file `{:?}` type: {}", file, error),
msg: format!("Failed to get Leo file `{:?}` type: {}.", file, error),
help: None,
}
/// For when getting the source file has an invalid extension.
/// For when the Leo file has an invalid extension.
@backtraced
invalid_source_file_extension {
invalid_leo_file_extension {
args: (file: impl Debug, extension: impl Debug),
msg: format!("source file `{:?}` has invalid extension: {:?}", file, extension),
help: None,
}
/// For when getting the source file has an invalid file type.
@backtraced
invalid_source_file_type {
args: (file: impl Debug, type_: std::fs::FileType),
msg: format!("source file `{:?}` has invalid type: {:?}", file, type_),
msg: format!("Source file `{:?}` has invalid extension: {:?}.", file, extension),
help: None,
}
@ -541,11 +525,19 @@ create_messages!(
help: None,
}
/// For when opening a directory failed.
@backtraced
directory_not_found {
args: (dirname: impl Display, path: impl Display),
msg: format!("The `{}` does not exist at `{}`.", dirname, path),
help: None,
}
/// For when creating a directory failed.
@backtraced
failed_to_create_directory {
args: (dirname: impl Display, error: impl ErrorArg),
msg: format!("failed to create directory: {}, error: {}", dirname, error),
msg: format!("failed to create directory `{}`, error: {}.", dirname, error),
help: None,
}
@ -580,4 +572,53 @@ create_messages!(
msg: format!("i/o operation failed, file: {}, error: {}", file, error),
help: None,
}
@backtraced
failed_to_get_file_name {
args: (),
msg: "Failed to get names of Leo files in the `src/` directory.".to_string(),
help: Some("Check your `src/` directory for invalid file names.".to_string()),
}
@backtraced
failed_to_set_cwd {
args: (dir: impl Display, error: impl ErrorArg),
msg: format!("Failed to set current working directory to `{}`. Error: {}.", dir, error),
help: None,
}
@backtraced
failed_to_open_manifest {
args: (error: impl Display),
msg: format!("Failed to open manifest file: {}", error),
help: Some("Create a package by running `leo new`.".to_string()),
}
@backtraced
failed_to_open_aleo_file {
args: (error: impl Display),
msg: format!("Failed to open Aleo file: {}", error),
help: Some("Create a package by running `leo new`.".to_string()),
}
@backtraced
failed_to_create_aleo_file {
args: (error: impl Display),
msg: format!("Failed to create Aleo file: {}.", error),
help: None,
}
@backtraced
failed_to_write_aleo_file {
args: (error: impl Display),
msg: format!("Failed to write aleo file: {}.", error),
help: None,
}
@backtraced
failed_to_remove_aleo_file {
args: (error: impl Display),
msg: format!("Failed to remove aleo file: {}.", error),
help: None,
}
);

View File

@ -389,4 +389,11 @@ create_messages!(
msg: format!("Invalid associated access call to circuit {name}."),
help: Some("Double colon `::` syntax is only supported for core circuits in Leo for testnet3.".to_string()),
}
@formatted
leo_imports_only {
args: (name: impl Display),
msg: format!("Invalid import call to non-leo file `{name}`."),
help: Some("Only imports of Leo `.leo` files are currently supported.".to_string()),
}
);

View File

@ -0,0 +1,3 @@
circuit Other {
a: u64,
}

View File

@ -2,3 +2,4 @@
[main]
public a: u32 = 1u32;
b: u32 = 2u32; // Input variable `b` is private by default.

View File

@ -1,7 +0,0 @@
program helloworld.aleo;
function main:
input r0 as u32.public;
input r1 as u32.private;
add r0 r1 into r2;
output r2 as u32.private;

View File

@ -1,4 +1,8 @@
import other.leo;
// The 'helloworld' main function.
function main(public a: u32, b: u32) -> u32 {
let o: Other = Other { a: 1u64 };
return a + b;
}

View File

@ -1,3 +1,7 @@
// The program input for message/src/main.leo
// To pass "m" into the "main" function we
// 1. Define the "Message" type.
// 2. Use brackets `{ }` to enclose the circuit members.
// 3. Define each circuit member `name : value`.
[main]
a: Message = Message { first: 2field, second: 3field };
m: Message = Message { first: 2field, second: 3field };

View File

@ -1,10 +0,0 @@
program message.aleo;
interface message:
first as field;
second as field;
function main:
input r0 as message.private;
cast r0.first r0.second into r1 as message;
add r1.first r1.second into r2;
output r2 as field.private;

View File

@ -1,13 +1,27 @@
// The 'message' main function.
// This example demonstrates the definition and initialization of a "circuit" type in Leo.
// Circuit types are similar to composite types in other languages such as "struct".
// The "Message" circuit type.
circuit Message {
// A circuit member named "first" with type "field".
first: field,
// A circuit member named "second" with type "field".
second: field,
}
// The "main" function of this Leo program takes a "Message" circuit type as input.
// To see how to input variable "m" is passed in open up `inputs/message.in`.
function main(m: Message) -> field {
// 1. Define the "Message" type.
// 2. Use brackets `{ }` to enclose the circuit members.
// 3. Define each circuit member `name : value`.
let m1: Message = Message {
first: m.first,
second: m.second,
};
// Access the members of a circuit with dot syntax.
// `circuit_name.member`
return m1.first + m1.second;
}

View File

@ -1,10 +0,0 @@
program token.aleo;
record token:
owner as address.private;
balance as u64.private;
token_amount as u64.private;
function main:
input r0 as token.record;
add r0.token_amount r0.token_amount into r1;
output r1 as u64.private;

View File

@ -1,21 +0,0 @@
program transfer.aleo;
record token:
owner as address.private;
balance as u64.private;
amount as u64.private;
function main:
input r0 as address.private;
input r1 as u64.private;
cast r0 0u64 r1 into r2 as token.record;
output r2 as token.record;
function transfer:
input r0 as token.record;
input r1 as address.private;
input r2 as u64.private;
sub r0.amount r2 into r3;
cast r1 0u64 r2 into r4 as token.record;
cast r0.owner r0.balance r3 into r5 as token.record;
output r4 as token.record;
output r5 as token.record;

View File

@ -14,20 +14,26 @@
// You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
use super::*;
use crate::{commands::Command, context::Context};
use leo_compiler::{Compiler, InputAst, OutputOptions};
use leo_errors::{CliError, Result};
use leo_errors::{CliError, CompilerError, PackageError, Result};
use leo_package::source::{SourceDirectory, MAIN_FILENAME};
use leo_package::{
inputs::InputFile,
outputs::{ChecksumFile, OutputsDirectory, OUTPUTS_DIRECTORY_NAME},
source::{MainFile, MAIN_FILENAME, SOURCE_DIRECTORY_NAME},
outputs::{ChecksumFile, OutputsDirectory},
};
use leo_span::symbol::with_session_globals;
use aleo::commands::Build as AleoBuild;
use clap::StructOpt;
use colored::Colorize;
use std::io::Write;
use std::path::{Path, PathBuf};
use leo_errors::emitter::Handler;
use leo_package::build::BuildDirectory;
use leo_package::imports::ImportsDirectory;
use tracing::span::Span;
/// Compiler Options wrapper for Build command. Also used by other commands which
@ -91,111 +97,175 @@ impl Command for Build {
fn apply(self, context: Context, _: Self::Input) -> Result<Self::Output> {
// Get the package path.
let path = context.dir()?;
let package_path = context.dir()?;
// Get the program name.
let program_name = context.program_name()?;
let package_name = context.open_manifest()?.program_id().name().to_string();
// Sanitize the package path to the root directory.
let mut package_path = path.clone();
if package_path.is_file() {
package_path.pop();
}
// Create the outputs directory.
let outputs_directory = OutputsDirectory::create(&package_path)?;
// Construct the path to the output directory.
let mut output_directory = package_path.clone();
output_directory.push(OUTPUTS_DIRECTORY_NAME);
tracing::info!("Starting...");
// Compile the main.leo file along with constraints
if !MainFile::exists_at(&package_path) {
return Err(CliError::package_main_file_not_found().into());
}
// Construct the path to the main file in the source directory
let mut main_file_path = package_path.clone();
main_file_path.push(SOURCE_DIRECTORY_NAME);
main_file_path.push(MAIN_FILENAME);
// Load the input file at `package_name.in`
let input_path = InputFile::new(&program_name).setup_file_path(&path);
// Create the outputs directory
OutputsDirectory::create(&package_path)?;
// Log compilation of files to console
tracing::info!("Compiling main program... ({:?})", main_file_path);
// Open the build directory.
let build_directory = BuildDirectory::open(&package_path)?;
// Initialize error handler
let handler = leo_errors::emitter::Handler::default();
// Create a new instance of the Leo compiler.
let mut program = Compiler::new(
program_name.to_string(),
String::from("aleo"),
&handler,
main_file_path,
output_directory,
Some(self.compiler_options.into()),
);
program.parse_input(input_path.to_path_buf())?;
// Fetch paths to all .leo files in the source directory.
let source_files = SourceDirectory::files(&package_path)?;
// Compute the current program checksum
let program_checksum = program.checksum()?;
// Compile the program.
{
// Compile the Leo program into Aleo instructions.
let (_, instructions) = program.compile_and_generate_instructions()?;
// // Parse the generated Aleo instructions into an Aleo file.
// let file = AleoFile::<Network>::from_str(&instructions).map_err(CliError::failed_to_load_instructions)?;
//
// // Create the path to the Aleo file.
// let mut aleo_file_path = package_path.clone();
// aleo_file_path.push(AleoFile::<Network >::main_file_name());
//
// // Write the Aleo file to `main.aleo`.
// file.write_to(&aleo_file_path)
// .map_err(|err| CliError::failed_to_write_to_aleo_file(aleo_file_path.display(), err))?;
// Create the path to the main Aleo file.
let mut aleo_file_path = package_path.clone();
aleo_file_path.push(AleoFile::<Network>::main_file_name());
// Write the instructions.
std::fs::File::create(&aleo_file_path)
.map_err(CliError::failed_to_load_instructions)?
.write_all(instructions.as_bytes())
.map_err(CliError::failed_to_load_instructions)?;
// Call the `aleo build` command from the Aleo SDK.
let res = AleoBuild.parse().map_err(CliError::failed_to_execute_aleo_build)?;
// Log the result of the build
tracing::info!("Result: {}", res);
// Compile all .leo files into .aleo files.
for file_path in source_files.into_iter() {
compile_leo_file(
file_path,
&package_path,
&package_name,
&outputs_directory,
&build_directory,
&handler,
self.compiler_options.clone(),
)?;
}
// If a checksum file exists, check if it differs from the new checksum
let checksum_file = ChecksumFile::new(&program_name);
let checksum_differs = if checksum_file.exists_at(&package_path) {
let previous_checksum = checksum_file.read_from(&package_path)?;
if !ImportsDirectory::is_empty(&package_path)? {
// Create Aleo build/imports/ directory.
let build_imports_directory = ImportsDirectory::create(&build_directory)?;
// Fetch paths to all .leo files in the imports directory.
let import_files = ImportsDirectory::files(&package_path)?;
// Compile all .leo files into .aleo files.
for file_path in import_files.into_iter() {
compile_leo_file(
file_path,
&package_path,
&package_name,
&outputs_directory,
&build_imports_directory,
&handler,
self.compiler_options.clone(),
)?;
}
}
// Load the input file at `package_name.in`
let input_file_path = InputFile::new(&package_name).setup_file_path(&package_path);
// Parse the input file.
let input_ast = if input_file_path.exists() {
// Load the input file into the source map.
let input_sf = with_session_globals(|s| s.source_map.load_file(&input_file_path))
.map_err(|e| CompilerError::file_read_error(&input_file_path, e))?;
leo_parser::parse_input(&handler, &input_sf.src, input_sf.start_pos).ok()
} else {
None
};
// Change the cwd to the build directory to compile aleo files.
std::env::set_current_dir(&build_directory)
.map_err(|err| PackageError::failed_to_set_cwd(build_directory.display(), err))?;
// Call the `aleo build` command from the Aleo SDK.
let result = AleoBuild.parse().map_err(CliError::failed_to_execute_aleo_build)?;
// Log the result of the build
tracing::info!("{}", result);
Ok(input_ast)
}
}
fn compile_leo_file(
file_path: PathBuf,
package_path: &PathBuf,
package_name: &String,
outputs: &Path,
build: &Path,
handler: &Handler,
options: BuildOptions,
) -> Result<()> {
// Construct the Leo file name with extension `foo.leo`.
let file_name = file_path
.file_name()
.and_then(|name| name.to_str())
.ok_or_else(PackageError::failed_to_get_file_name)?;
// Construct program name from file_path name `foo`.
let program_name = file_name
.strip_suffix(".leo")
.ok_or_else(PackageError::failed_to_get_file_name)?;
// Construct program id header for aleo file.
// Do not create a program with main.aleo as the ID.
let program_id_name = if file_name.eq(MAIN_FILENAME) {
package_name
} else {
program_name
};
// Create a new instance of the Leo compiler.
let mut program = Compiler::new(
program_id_name.to_string(),
String::from("aleo"), // todo: fetch this from Network::Testnet3
handler,
file_path.clone(),
outputs.to_path_buf(),
Some(options.into()),
);
// Check if we need to compile the Leo program.
let checksum_differs = {
// Compute the current program checksum.
let program_checksum = program.checksum()?;
// Get the current program checksum.
let checksum_file = ChecksumFile::new(program_name);
// If a checksum file exists, check if it differs from the new checksum.
let checksum_differs = if checksum_file.exists_at(package_path) {
let previous_checksum = checksum_file.read_from(package_path)?;
program_checksum != previous_checksum
} else {
// By default, the checksum differs if there is no checksum to compare against
// By default, the checksum differs if there is no checksum to compare against.
true
};
// If checksum differs, compile the program
if checksum_differs {
// Write the new checksum to the output directory
checksum_file.write_to(&path, program_checksum)?;
checksum_file.write_to(package_path, program_checksum)?;
tracing::debug!("Checksum saved ({:?})", path);
tracing::debug!("Checksum saved ({:?})", package_path);
}
tracing::info!("Complete");
checksum_differs
};
Ok(program.input_ast)
if checksum_differs {
// Compile the Leo program into Aleo instructions.
let (_, instructions) = program.compile_and_generate_instructions()?;
// Create the path to the Aleo file.
let mut aleo_file_path = build.to_path_buf();
aleo_file_path.push(format!("{}.aleo", program_name));
// Write the instructions.
std::fs::File::create(&aleo_file_path)
.map_err(CliError::failed_to_load_instructions)?
.write_all(instructions.as_bytes())
.map_err(CliError::failed_to_load_instructions)?;
// Prepare the path string.
let path_string = format!("(in \"{}\")", aleo_file_path.display());
// Log the build as successful.
tracing::info!(
"✅ Compiled '{}' into Aleo instructions {}",
file_name,
path_string.dimmed()
);
}
Ok(())
}

View File

@ -16,9 +16,11 @@
use crate::{commands::Command, context::Context};
use leo_errors::Result;
// use leo_package::outputs::ChecksumFile;
use leo_package::build::BuildDirectory;
use leo_package::outputs::OutputsDirectory;
use clap::StructOpt;
use colored::Colorize;
use tracing::span::Span;
/// Clean outputs folder command
@ -37,11 +39,16 @@ impl Command for Clean {
Ok(())
}
fn apply(self, _context: Context, _: Self::Input) -> Result<Self::Output> {
// let path = context.dir()?;
// let package_name = context.manifest()?.program_id().name().to_string();
fn apply(self, context: Context, _: Self::Input) -> Result<Self::Output> {
let path = context.dir()?;
// Removes the aleo file from the output directory.
// Removes the outputs/ directory.
let outputs_path = OutputsDirectory::remove(&path)?;
tracing::info!("✅ Cleaned the outputs directory {}", outputs_path.dimmed());
// Removes the build/ directory.
let build_path = BuildDirectory::remove(&path)?;
tracing::info!("✅ Cleaned the build directory {}", build_path.dimmed());
// Remove the checksum from the output directory
// ChecksumFile::new(&package_name).remove(&path)?;

View File

@ -33,8 +33,6 @@ pub use run::Run;
use crate::context::*;
use leo_errors::Result;
use snarkvm::file::AleoFile;
use std::time::Instant;
use tracing::span::Span;

View File

@ -14,12 +14,15 @@
// You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
use crate::commands::Network;
use crate::{
commands::{Command, ALEO_CLI_COMMAND},
context::Context,
};
use leo_errors::{CliError, Result};
use leo_errors::{CliError, PackageError, Result};
use leo_package::build::BUILD_DIRECTORY_NAME;
use leo_package::package::Package;
use snarkvm::file::AleoFile;
use aleo::commands::New as AleoNew;
@ -46,25 +49,58 @@ impl Command for New {
}
fn apply(self, context: Context, _: Self::Input) -> Result<Self::Output> {
tracing::info!("Starting...");
// Call the `aleo new` command from the Aleo SDK.
let command =
AleoNew::try_parse_from(&[ALEO_CLI_COMMAND, &self.name]).map_err(CliError::failed_to_parse_aleo_new)?;
let result = command.parse().map_err(CliError::failed_to_execute_aleo_new)?;
// Derive the program directory path.
let mut path = context.dir()?;
path.push(&self.name);
// Initialize the Leo package in the directory created by `aleo new`.
Package::initialize(&self.name, &path)?;
// todo: modify the readme file to recommend building with `leo build`.
// Log the output of the `aleo new` command.
tracing::info!("{}", result);
// Derive the program directory path.
let mut package_path = context.dir()?;
package_path.push(&self.name);
// Initialize the Leo package in the directory created by `aleo new`.
Package::initialize(&self.name, &package_path)?;
// Change the cwd to the Leo package directory. to compile aleo files.
std::env::set_current_dir(&package_path)
.map_err(|err| PackageError::failed_to_set_cwd(package_path.display(), err))?;
// Open the program manifest.
let manifest = context.open_manifest()?;
// Create a path to the build directory.
let mut build_directory = package_path.clone();
build_directory.push(BUILD_DIRECTORY_NAME);
// Write the Aleo file into the build directory.
AleoFile::create(&build_directory, manifest.program_id(), true)
.map_err(PackageError::failed_to_create_aleo_file)?;
// build_aleo_file.push(AleoFile::<Network>::main_file_name());
//
// println!("{}", build_aleo_file.display());
//
//
// std::fs::File::create(build_aleo_file).map_err()
// aleo_file.write_to(&build_aleo_file).map_err(PackageError::failed_to_write_aleo_file)?;
// Open the `main.aleo` file path.
let aleo_file = AleoFile::open(&package_path, manifest.program_id(), true)
.map_err(PackageError::failed_to_open_aleo_file)?;
let mut aleo_file_path = package_path.clone();
aleo_file_path.push(AleoFile::<Network>::main_file_name());
// Remove the Aleo file from the package directory.
aleo_file
.remove(&aleo_file_path)
.map_err(PackageError::failed_to_remove_aleo_file)?;
Ok(())
}
}

View File

@ -20,7 +20,8 @@ use crate::{
commands::{Build, Command},
context::Context,
};
use leo_errors::{CliError, Result};
use leo_errors::{CliError, PackageError, Result};
use leo_package::build::BuildDirectory;
use aleo::commands::Run as AleoRun;
@ -52,7 +53,7 @@ impl Command for Run {
.execute(context)
}
fn apply(self, _context: Context, input: Self::Input) -> Result<Self::Output> {
fn apply(self, context: Context, input: Self::Input) -> Result<Self::Output> {
// Compose the `aleo run` command.
let mut arguments = vec![ALEO_CLI_COMMAND.to_string(), "main".to_string()];
@ -65,6 +66,14 @@ impl Command for Run {
tracing::info!("Starting...");
// Open the Leo build/ directory
let path = context.dir()?;
let build_directory = BuildDirectory::open(&path)?;
// Change the cwd to the Leo build/ directory to compile aleo files.
std::env::set_current_dir(&build_directory)
.map_err(|err| PackageError::failed_to_set_cwd(build_directory.display(), err))?;
// Call the `aleo run` command from the Aleo SDK.
let command = AleoRun::try_parse_from(&arguments).map_err(CliError::failed_to_parse_aleo_run)?;
let res = command.parse().map_err(CliError::failed_to_execute_aleo_run)?;

View File

@ -15,10 +15,14 @@
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
use crate::commands::Network;
use leo_errors::{CliError, Result};
use leo_errors::{CliError, PackageError, Result};
use snarkvm::file::Manifest;
use std::{env::current_dir, path::PathBuf};
use leo_package::build::{BuildDirectory, BUILD_DIRECTORY_NAME};
use std::{
env::current_dir,
path::{Path, PathBuf},
};
/// Project context, manifest, current directory etc
/// All the info that is relevant in most of the commands
@ -41,16 +45,28 @@ impl Context {
}
}
/// Returns the program name as a String.
pub fn program_name(&self) -> Result<String> {
/// Returns the package name as a String.
/// Opens the manifest file `program.json` and creates the build directory if it doesn't exist.
pub fn open_manifest(&self) -> Result<Manifest<Network>> {
// Open the manifest file.
let path = self.dir()?;
let manifest = Manifest::<Network>::open(&path).map_err(CliError::failed_to_open_manifest)?;
let manifest = Manifest::<Network>::open(&path).map_err(PackageError::failed_to_open_manifest)?;
// Lookup the program id.
let program_id = manifest.program_id();
// Create the Leo build/ directory if it doesn't exist.
let build_path = path.join(Path::new(BUILD_DIRECTORY_NAME));
if !build_path.exists() {
BuildDirectory::create(&build_path)?;
}
// Mirror the program.json file in the Leo build/ directory for Aleo SDK compilation.
if !Manifest::<Network>::exists_at(&build_path) {
Manifest::<Network>::create(&build_path, program_id).map_err(PackageError::failed_to_open_manifest)?;
}
// Get package name from program id.
Ok(program_id.name().to_string())
Ok(manifest)
}
}

View File

@ -0,0 +1,65 @@
// Copyright (C) 2019-2022 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 <https://www.gnu.org/licenses/>.
use leo_errors::{PackageError, Result};
use std::path::PathBuf;
use std::{borrow::Cow, fs, path::Path};
pub static BUILD_DIRECTORY_NAME: &str = "build/";
pub struct BuildDirectory;
impl BuildDirectory {
/// Returns the path to the build directory if it exists.
pub fn open(path: &Path) -> Result<PathBuf> {
let mut path = Cow::from(path);
if path.is_dir() && !path.ends_with(BUILD_DIRECTORY_NAME) {
path.to_mut().push(BUILD_DIRECTORY_NAME);
}
if path.exists() {
Ok(path.to_path_buf())
} else {
Err(PackageError::directory_not_found(BUILD_DIRECTORY_NAME, path.display()).into())
}
}
/// Creates a directory at the provided path with the default directory name.
pub fn create(path: &Path) -> Result<PathBuf> {
let mut path = Cow::from(path);
if path.is_dir() && !path.ends_with(BUILD_DIRECTORY_NAME) {
path.to_mut().push(BUILD_DIRECTORY_NAME);
}
fs::create_dir_all(&path).map_err(|err| PackageError::failed_to_create_directory(BUILD_DIRECTORY_NAME, err))?;
Ok(path.to_path_buf())
}
/// Removes the directory at the provided path.
pub fn remove(path: &Path) -> Result<String> {
let mut path = Cow::from(path);
if path.is_dir() && !path.ends_with(BUILD_DIRECTORY_NAME) {
path.to_mut().push(BUILD_DIRECTORY_NAME);
}
if path.exists() {
fs::remove_dir_all(&path).map_err(|e| PackageError::failed_to_remove_directory(path.display(), e))?;
}
Ok(format!("(in \"{}\")", path.display()))
}
}

View File

@ -14,4 +14,5 @@
// You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
// pub mod initialize;
pub mod directory;
pub use directory::*;

View File

@ -0,0 +1,85 @@
// Copyright (C) 2019-2022 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 <https://www.gnu.org/licenses/>.
use crate::parse_file_paths;
use leo_errors::{PackageError, Result};
use std::path::PathBuf;
use std::{borrow::Cow, fs, path::Path};
pub static IMPORTS_DIRECTORY_NAME: &str = "imports/";
pub struct ImportsDirectory;
impl ImportsDirectory {
/// Creates a directory at the provided path with the default directory name if it does not exist.
pub fn create(path: &Path) -> Result<PathBuf> {
let mut path = Cow::from(path);
if path.is_dir() && !path.ends_with(IMPORTS_DIRECTORY_NAME) {
path.to_mut().push(IMPORTS_DIRECTORY_NAME);
}
if !path.exists() {
fs::create_dir_all(&path)
.map_err(|err| PackageError::failed_to_create_directory(IMPORTS_DIRECTORY_NAME, err))?;
}
Ok(path.to_path_buf())
}
/// Removes the directory at the provided path.
pub fn remove(path: &Path) -> Result<String> {
let mut path = Cow::from(path);
if path.is_dir() && !path.ends_with(IMPORTS_DIRECTORY_NAME) {
path.to_mut().push(IMPORTS_DIRECTORY_NAME);
}
if path.exists() {
fs::remove_dir_all(&path).map_err(|e| PackageError::failed_to_remove_directory(path.display(), e))?;
}
Ok(format!("(in \"{}\")", path.display()))
}
/// Returns true if the imports directory does not exist or does not contain files.
pub fn is_empty(path: &Path) -> Result<bool> {
let imports_path = path.join(Path::new(IMPORTS_DIRECTORY_NAME));
if !imports_path.exists() {
return Ok(true);
}
Ok(imports_path
.read_dir()
.map_err(|err| PackageError::failed_to_read_file(IMPORTS_DIRECTORY_NAME, err))?
.next()
.is_none())
}
/// Returns a list of files in the imports directory.
pub fn files(path: &Path) -> Result<Vec<PathBuf>> {
let mut path = Cow::from(path);
if path.is_dir() && !path.ends_with(IMPORTS_DIRECTORY_NAME) {
path.to_mut().push(IMPORTS_DIRECTORY_NAME);
}
let directory = fs::read_dir(&path).map_err(|err| PackageError::failed_to_read_file(path.display(), err))?;
let mut file_paths = Vec::new();
parse_file_paths(directory, &mut file_paths)?;
Ok(file_paths)
}
}

View File

@ -14,4 +14,5 @@
// You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
pub mod manifest;
pub mod directory;
pub use directory::*;

View File

@ -16,32 +16,49 @@
#![doc = include_str!("../README.md")]
// pub mod imports;
pub mod build;
pub mod imports;
pub mod inputs;
pub mod outputs;
pub mod package;
pub mod root;
pub mod source;
// use std::path::Path;
//
// use leo_errors::Result;
//
// pub struct LeoPackage;
//
// impl LeoPackage {
// /// Initializes a Leo package at the given path.
// pub fn initialize(package_name: &str, path: &Path, author: Option<String>) -> Result<()> {
// package::Package::initialize(package_name, path, author)
// }
//
// /// Returns `true` if the given Leo package name is valid.
// pub fn is_package_name_valid(package_name: &str) -> bool {
// package::Package::is_package_name_valid(package_name)
// }
//
// /// Removes an imported Leo package
// pub fn remove_imported_package(package_name: &str, path: &Path) -> Result<()> {
// package::Package::remove_imported_package(package_name, path)
// }
// }
use leo_errors::{PackageError, Result};
use std::fs::ReadDir;
use std::{fs, path::PathBuf};
pub static LEO_FILE_EXTENSION: &str = ".leo";
pub(crate) fn parse_file_paths(directory: ReadDir, file_paths: &mut Vec<PathBuf>) -> Result<()> {
for file_entry in directory {
let file_entry = file_entry.map_err(PackageError::failed_to_get_leo_file_entry)?;
let file_path = file_entry.path();
// Verify that the entry is structured as a valid file or directory
if file_path.is_dir() {
let directory =
fs::read_dir(&file_path).map_err(|err| PackageError::failed_to_read_file(file_path.display(), err))?;
parse_file_paths(directory, file_paths)?;
continue;
} else {
// Verify that the file has the Leo file extension
let file_extension = file_path
.extension()
.ok_or_else(|| PackageError::failed_to_get_leo_file_extension(file_path.as_os_str().to_owned()))?;
if file_extension != LEO_FILE_EXTENSION.trim_start_matches('.') {
return Err(PackageError::invalid_leo_file_extension(
file_path.as_os_str().to_owned(),
file_extension.to_owned(),
)
.into());
}
file_paths.push(file_path);
}
}
Ok(())
}

View File

@ -16,6 +16,7 @@
use leo_errors::{PackageError, Result};
use std::path::PathBuf;
use std::{borrow::Cow, fs, path::Path};
pub static OUTPUTS_DIRECTORY_NAME: &str = "outputs/";
@ -24,27 +25,27 @@ pub struct OutputsDirectory;
impl OutputsDirectory {
/// Creates a directory at the provided path with the default directory name.
pub fn create(path: &Path) -> Result<()> {
pub fn create(path: &Path) -> Result<PathBuf> {
let mut path = Cow::from(path);
if path.is_dir() && !path.ends_with(OUTPUTS_DIRECTORY_NAME) {
path.to_mut().push(OUTPUTS_DIRECTORY_NAME);
}
fs::create_dir_all(&path).map_err(PackageError::failed_to_create_inputs_directory)?;
Ok(())
Ok(path.to_path_buf())
}
/// Removes the directory at the provided path.
pub fn remove(path: &Path) -> Result<()> {
pub fn remove(path: &Path) -> Result<String> {
let mut path = Cow::from(path);
if path.is_dir() && !path.ends_with(OUTPUTS_DIRECTORY_NAME) {
path.to_mut().push(OUTPUTS_DIRECTORY_NAME);
}
if path.exists() {
fs::remove_dir_all(&path).map_err(PackageError::failed_to_create_inputs_directory)?;
fs::remove_dir_all(&path).map_err(|e| PackageError::failed_to_remove_directory(path.display(), e))?;
}
Ok(())
Ok(format!("(in \"{}\")", path.display()))
}
}

View File

@ -22,6 +22,7 @@ use crate::{
use leo_errors::{PackageError, Result};
use crate::build::BuildDirectory;
use serde::Deserialize;
use std::path::Path;
@ -168,19 +169,21 @@ impl Package {
// Create the source directory.
SourceDirectory::create(path)?;
// Create the input directory.
// Create the inputs directory.
InputsDirectory::create(path)?;
// Create the Leo build/ directory
BuildDirectory::create(&path)?;
// Create the input file in the inputs directory.
InputFile::new(package_name).write_to(path)?;
// Create the main file in the source directory.
MainFile::new(package_name).write_to(path)?;
// Next, verify that a valid Leo package has been initialized in this directory
{
if !Self::is_initialized(package_name, path) {
return Err(PackageError::failed_to_initialize_package(package_name, path.as_os_str()).into());
}
if !Self::is_initialized(package_name, path) {
return Err(PackageError::failed_to_initialize_package(package_name, path.as_os_str()).into());
}
Ok(())

View File

@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
use crate::parse_file_paths;
use leo_errors::{PackageError, Result};
use std::{
@ -24,8 +25,6 @@ use std::{
pub static SOURCE_DIRECTORY_NAME: &str = "src/";
pub static SOURCE_FILE_EXTENSION: &str = ".leo";
pub struct SourceDirectory;
impl SourceDirectory {
@ -43,38 +42,15 @@ impl SourceDirectory {
/// Returns a list of files in the source directory.
pub fn files(path: &Path) -> Result<Vec<PathBuf>> {
let mut path = Cow::from(path);
path.to_mut().push(SOURCE_DIRECTORY_NAME);
let directory = fs::read_dir(&path).map_err(PackageError::failed_to_read_inputs_directory)?;
let mut file_paths = Vec::new();
for file_entry in directory {
let file_entry = file_entry.map_err(PackageError::failed_to_get_source_file_entry)?;
let file_path = file_entry.path();
// Verify that the entry is structured as a valid file
let file_type = file_entry
.file_type()
.map_err(|e| PackageError::failed_to_get_source_file_type(file_path.as_os_str().to_owned(), e))?;
if !file_type.is_file() {
return Err(PackageError::invalid_source_file_type(file_path.as_os_str().to_owned(), file_type).into());
}
// Verify that the file has the default file extension
let file_extension = file_path
.extension()
.ok_or_else(|| PackageError::failed_to_get_source_file_extension(file_path.as_os_str().to_owned()))?;
if file_extension != SOURCE_FILE_EXTENSION.trim_start_matches('.') {
return Err(PackageError::invalid_source_file_extension(
file_path.as_os_str().to_owned(),
file_extension.to_owned(),
)
.into());
}
file_paths.push(file_path);
if path.is_dir() && !path.ends_with(SOURCE_DIRECTORY_NAME) {
path.to_mut().push(SOURCE_DIRECTORY_NAME);
}
let directory = fs::read_dir(&path).map_err(|err| PackageError::failed_to_read_file(path.display(), err))?;
let mut file_paths = Vec::new();
parse_file_paths(directory, &mut file_paths)?;
Ok(file_paths)
}
}

View File

@ -1,133 +0,0 @@
// Copyright (C) 2019-2022 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 <https://www.gnu.org/licenses/>.
use crate::test_dir;
use leo_package::{
inputs::{InputFile, InputsDirectory, StateFile},
package::Package,
root::Manifest,
source::{MainFile, SourceDirectory},
};
const TEST_PACKAGE_NAME: &str = "test-package";
#[test]
fn initialize_valid_package() {
let test_directory = test_dir();
// Ensure a package can be initialized at the `test_directory`
assert!(Package::can_initialize(TEST_PACKAGE_NAME, &test_directory));
// Initialize a package at the `test_directory`
assert!(Package::initialize(TEST_PACKAGE_NAME, &test_directory, None).is_ok());
// Ensure a package is initialized at the `test_directory`
assert!(Package::is_initialized(TEST_PACKAGE_NAME, &test_directory));
}
#[test]
fn initialize_valid_package_with_author() {
let test_directory = test_dir();
// Ensure a package can be initialized at the `test_directory`
assert!(Package::can_initialize(TEST_PACKAGE_NAME, &test_directory));
// Initialize a package at the `test_directory`
assert!(Package::initialize(TEST_PACKAGE_NAME, &test_directory, Some(String::from("test_user"))).is_ok());
// Ensure a package is initialized at the `test_directory`
assert!(Package::is_initialized(TEST_PACKAGE_NAME, &test_directory));
}
#[test]
#[ignore]
fn initialize_fails_with_invalid_package_names() {
unimplemented!()
}
#[test]
fn initialize_fails_with_existing_manifest() {
let test_directory = test_dir();
// Ensure a package can be initialized at the `test_directory`
assert!(Package::can_initialize(TEST_PACKAGE_NAME, &test_directory));
// Manually add a manifest file to the `test_directory`
Manifest::new(TEST_PACKAGE_NAME, None)
.unwrap()
.write_to(&test_directory)
.unwrap();
// Attempt to initialize a package at the `test_directory`
assert!(Package::initialize(TEST_PACKAGE_NAME, &test_directory, None).is_err());
// Ensure package is not initialized at the `test_directory`
assert!(!Package::is_initialized(TEST_PACKAGE_NAME, &test_directory));
}
#[test]
fn initialize_fails_with_existing_input_file() {
let test_directory = test_dir();
// Ensure a package can be initialized at the `test_directory`
assert!(Package::can_initialize(TEST_PACKAGE_NAME, &test_directory));
// Manually add an inputs directory and an input file to the `test_directory`
InputsDirectory::create(&test_directory).unwrap();
InputFile::new(TEST_PACKAGE_NAME).write_to(&test_directory).unwrap();
// Attempt to initialize a package at the `test_directory`
assert!(Package::initialize(TEST_PACKAGE_NAME, &test_directory, Some(String::from("test_user"))).is_err());
// Ensure package is not initialized at the `test_directory`
assert!(!Package::is_initialized(TEST_PACKAGE_NAME, &test_directory));
}
#[test]
fn initialize_fails_with_existing_state_file() {
let test_directory = test_dir();
// Ensure a package can be initialized at the `test_directory`
assert!(Package::can_initialize(TEST_PACKAGE_NAME, &test_directory));
// Manually add an inputs directory and a state file to the `test_directory`
InputsDirectory::create(&test_directory).unwrap();
StateFile::new(TEST_PACKAGE_NAME).write_to(&test_directory).unwrap();
// Attempt to initialize a package at the `test_directory`
assert!(Package::initialize(TEST_PACKAGE_NAME, &test_directory, None).is_err());
// Ensure package is not initialized at the `test_directory`
assert!(!Package::is_initialized(TEST_PACKAGE_NAME, &test_directory));
}
#[test]
fn initialize_fails_with_existing_main_file() {
let test_directory = test_dir();
// Ensure a package can be initialized at the `test_directory`
assert!(Package::can_initialize(TEST_PACKAGE_NAME, &test_directory));
// Manually add a source directory and a main file to the `test_directory`
SourceDirectory::create(&test_directory).unwrap();
MainFile::new(TEST_PACKAGE_NAME).write_to(&test_directory).unwrap();
// Attempt to initialize a package at the `test_directory`
assert!(Package::initialize(TEST_PACKAGE_NAME, &test_directory, None).is_err());
// Ensure package is not initialized at the `test_directory`
assert!(!Package::is_initialized(TEST_PACKAGE_NAME, &test_directory));
}

View File

@ -1,169 +0,0 @@
// Copyright (C) 2019-2022 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 <https://www.gnu.org/licenses/>.
// Tests for package manifest
use crate::test_dir;
use leo_package::root::{Manifest, MANIFEST_FILENAME};
use std::{
convert::TryFrom,
fs::File,
io::{Read, Write},
path::{Path, PathBuf},
};
const OLD_MANIFEST_FORMAT: &str = r#"[package]
name = "test-package"
version = "0.1.0"
description = "Testing manifest updates."
license = "MIT"
remote = "author/test-package"
"#;
const NEW_REMOTE_FORMAT: &str = r#"
[remote]
author = "author"
"#;
const OLD_PROJECT_FORMAT: &str = "[package]";
const NEW_PROJECT_FORMAT: &str = "[project]";
/// Create a manifest file with outdated formatting.
fn create_outdated_manifest_file(path: PathBuf) -> PathBuf {
let mut path = path;
if path.is_dir() {
path.push(MANIFEST_FILENAME);
}
let mut file = File::create(&path).unwrap();
file.write_all(OLD_MANIFEST_FORMAT.as_bytes()).unwrap();
path
}
/// Read the manifest file into a string.
fn read_manifest_file(path: &Path) -> String {
let mut file = File::open(path).unwrap();
let size = file.metadata().unwrap().len() as usize;
let mut buffer = String::with_capacity(size);
file.read_to_string(&mut buffer).unwrap();
buffer
}
/// Read the manifest file and check that the remote format is updated.
fn remote_is_updated(path: &Path) -> bool {
let manifest_string = read_manifest_file(path);
for line in manifest_string.lines() {
if line.starts_with("remote") {
return false;
}
}
manifest_string.contains(NEW_REMOTE_FORMAT)
}
/// Read the manifest file and check that the project format is updated.
fn project_is_updated(path: &Path) -> bool {
let manifest_string = read_manifest_file(path);
!manifest_string.contains(OLD_PROJECT_FORMAT) && manifest_string.contains(NEW_PROJECT_FORMAT)
}
#[test]
#[cfg_attr(
any(feature = "manifest_refactor_project", feature = "manifest_refactor_remote"),
ignore
)]
fn test_manifest_no_refactors() {
// Create an outdated manifest file.
let test_directory = test_dir();
let manifest_path = create_outdated_manifest_file(test_directory);
// Load the manifest file, and discard the new struct.
let _manifest = Manifest::try_from(manifest_path.as_path()).unwrap();
// Check that the manifest file project has NOT been updated.
assert!(!project_is_updated(&manifest_path));
// Check that the manifest file remote has NOT been updated.
assert!(!remote_is_updated(&manifest_path));
}
#[test]
#[cfg_attr(
any(feature = "manifest_refactor_project", not(feature = "manifest_refactor_remote")),
ignore
)]
fn test_manifest_refactor_remote() {
// Create an outdated manifest file.
let test_directory = test_dir();
let manifest_path = create_outdated_manifest_file(test_directory);
// Load the manifest file, and discard the new struct.
let _manifest = Manifest::try_from(manifest_path.as_path()).unwrap();
// Check that the manifest file project has NOT been updated.
assert!(!project_is_updated(&manifest_path));
// Check that the manifest file remote has been updated.
assert!(remote_is_updated(&manifest_path));
}
#[test]
#[cfg_attr(
any(not(feature = "manifest_refactor_project"), feature = "manifest_refactor_remote"),
ignore
)]
fn test_manifest_refactor_project() {
// Create an outdated manifest file.
let test_directory = test_dir();
let manifest_path = create_outdated_manifest_file(test_directory);
// Load the manifest file, and discard the new struct.
let _manifest = Manifest::try_from(manifest_path.as_path()).unwrap();
// Check that the manifest file project has been updated.
assert!(project_is_updated(&manifest_path));
// Check that the manifest file remote has NOT been updated.
assert!(!remote_is_updated(&manifest_path));
}
#[test]
#[cfg_attr(
any(
not(feature = "manifest_refactor_project"),
not(feature = "manifest_refactor_remote")
),
ignore
)]
fn test_manifest_refactors() {
// Create an outdated manifest file.
let test_directory = test_dir();
let manifest_path = create_outdated_manifest_file(test_directory);
// Load the manifest file, and discard the new struct.
let _manifest = Manifest::try_from(manifest_path.as_path()).unwrap();
// Check that the manifest file project has been updated.
assert!(project_is_updated(&manifest_path));
// Check that the manifest file remote has been updated.
assert!(remote_is_updated(&manifest_path));
}

View File

@ -1,74 +0,0 @@
// Copyright (C) 2019-2022 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 <https://www.gnu.org/licenses/>.
#![allow(clippy::module_inception)]
// pub mod initialize;
// pub mod manifest;
//
// use lazy_static::lazy_static;
// use std::{
// cell::RefCell,
// env, fs,
// path::PathBuf,
// sync::atomic::{AtomicUsize, Ordering},
// };
//
// const PACKAGE_TEST_DIRECTORY: &str = "package-testing";
//
// thread_local! {
// /// Establish a test id for each test.
// pub static TEST_ID: RefCell<Option<usize>> = RefCell::new(None);
// }
//
// lazy_static! {
// /// Create a testing directory for packages in `target/`
// pub static ref TEST_DIR: PathBuf = {
// let mut path = env::current_exe().unwrap();
// path.pop(); // Remove executable name
// path.pop(); // Remove 'debug'
//
// // Attempt to point at the `target` directory
// if path.file_name().and_then(|s| s.to_str()) != Some("target") {
// path.pop();
// }
//
// path.push(PACKAGE_TEST_DIRECTORY);
// fs::create_dir_all(&path).unwrap();
//
// path
// };
// }
//
// /// Create a new directory for each test based on the ID of the test.
// pub(crate) fn test_dir() -> PathBuf {
// static NEXT_ID: AtomicUsize = AtomicUsize::new(0);
//
// let id = NEXT_ID.fetch_add(1, Ordering::Relaxed);
// TEST_ID.with(|n| *n.borrow_mut() = Some(id));
//
// let path: PathBuf = TEST_DIR.join(&format!("t{}", id));
//
// if path.exists() {
// if let Err(e) = fs::remove_dir_all(&path) {
// panic!("failed to remove {:?}: {:?}", &path, e)
// }
// }
//
// fs::create_dir_all(&path).unwrap();
//
// path
// }

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: fe880c907d0257c9fc8314b8b98cabd8a8282b587d2d618408cc3cd8e528fda5
initial_ast: 74db04eff83c5719d8265824487945bce5713a8a6f731d7008bb2b7779ec57a3
unrolled_ast: 74db04eff83c5719d8265824487945bce5713a8a6f731d7008bb2b7779ec57a3
initial_ast: 996cad7b93bbb652c713081c7ce8d2474ff8f4c36a07af754bb0aad7071f29b2
unrolled_ast: 996cad7b93bbb652c713081c7ce8d2474ff8f4c36a07af754bb0aad7071f29b2

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 00f5aba05e4efae5a125eb52f02f16400132085b8a34919d910aa40c6c405a22
initial_ast: 64da8309a6212bc505ed8092f6d65d5058d9135f7c9dfd0b7afa0ec4d7c23ef8
unrolled_ast: 64da8309a6212bc505ed8092f6d65d5058d9135f7c9dfd0b7afa0ec4d7c23ef8
initial_ast: 4bad6e13408592021cfde9c7053e3111cbd23bc62f6c75dc7bc9e26cf22cde8c
unrolled_ast: 4bad6e13408592021cfde9c7053e3111cbd23bc62f6c75dc7bc9e26cf22cde8c

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 03e9df3bd1409f4af9e2a7f55130bc52f27d41f32a624ffa27f0ab114bf6fbf4
initial_ast: 5f3c8ccefe7f00da812f3ed29612437f875c227de4d3132c8a39df46afe20d43
unrolled_ast: 5f3c8ccefe7f00da812f3ed29612437f875c227de4d3132c8a39df46afe20d43
initial_ast: 494c4c6b3f2301e6cf95f51c0f25788fed9e5ed739f325442abb91a7e0a07479
unrolled_ast: 494c4c6b3f2301e6cf95f51c0f25788fed9e5ed739f325442abb91a7e0a07479

View File

@ -5,5 +5,5 @@ outputs:
- output:
- initial_input_ast: ec3cfeb93ea66a530150a5c5e2bd396688b3ef9b9fb0bcb961c62dac4daa064e
- initial_input_ast: cb1d48114c10b2b732ad47a46fc8d05bf7a3e783da89e7f00065244bfc8d15c8
initial_ast: 9d86ab07623cb2ddd95540b1d3128499b178ae85682cf93e4063f9b2745d9fe0
unrolled_ast: 9d86ab07623cb2ddd95540b1d3128499b178ae85682cf93e4063f9b2745d9fe0
initial_ast: e91c495b93b52509cdb008dbb9fef3d0baf1438be7505285ce53ba32af5271dc
unrolled_ast: e91c495b93b52509cdb008dbb9fef3d0baf1438be7505285ce53ba32af5271dc

View File

@ -7,5 +7,5 @@ outputs:
- initial_input_ast: 5f19f0086b0509628dc64db0f69000d599bc761cb8e3125144de44367081126a
- initial_input_ast: 4c5eeffd0306b20c8deece509782b81ea8583245f650e40a4a300d517f6ed5f4
- initial_input_ast: a56b3f9908dec2acaed302691d4fe0c2cf046f0deb8f188f617e042e75502f71
initial_ast: 5d9edadf873e47ef0b3fd4de1e110591056b0f5c904af5352789956c8018a424
unrolled_ast: 5d9edadf873e47ef0b3fd4de1e110591056b0f5c904af5352789956c8018a424
initial_ast: 86e914325e67e129cc7e6738b7924fb1b9d72e49b008c8dd0c4da86d57d2132d
unrolled_ast: 86e914325e67e129cc7e6738b7924fb1b9d72e49b008c8dd0c4da86d57d2132d

View File

@ -7,5 +7,5 @@ outputs:
- initial_input_ast: 9af3ce639269ea18073cb3b1a19520ba98f0484a04b20526584131d18c54712c
- initial_input_ast: 7a1c39dec2388ab801496ceb17ca85665d2f515269929925b7cc9018e14297ea
- initial_input_ast: 650984ca5077d11a815889421656b7735b4c6bd320bdf68b4deb87dfc0f49388
initial_ast: b5ca7ecbd7860fdd531daa3b575d0396dc8ff469350d77c050935e221892dd50
unrolled_ast: b5ca7ecbd7860fdd531daa3b575d0396dc8ff469350d77c050935e221892dd50
initial_ast: fe582e7789f2199f81249864983873612bc4f24ae7086fac13f88515c2f89d81
unrolled_ast: fe582e7789f2199f81249864983873612bc4f24ae7086fac13f88515c2f89d81

View File

@ -7,5 +7,5 @@ outputs:
- initial_input_ast: 5f19f0086b0509628dc64db0f69000d599bc761cb8e3125144de44367081126a
- initial_input_ast: 4c5eeffd0306b20c8deece509782b81ea8583245f650e40a4a300d517f6ed5f4
- initial_input_ast: a56b3f9908dec2acaed302691d4fe0c2cf046f0deb8f188f617e042e75502f71
initial_ast: 993b5ba359d01e7ca3c745a8547d33fb06a851ad39a33c52ceb29f9d80c5f61f
unrolled_ast: 993b5ba359d01e7ca3c745a8547d33fb06a851ad39a33c52ceb29f9d80c5f61f
initial_ast: e4dded56ee2ee6cbd2bbf301a3c87c09d35aafad9b66b8a7a8592f9d16aad47f
unrolled_ast: e4dded56ee2ee6cbd2bbf301a3c87c09d35aafad9b66b8a7a8592f9d16aad47f

View File

@ -7,5 +7,5 @@ outputs:
- initial_input_ast: 5f19f0086b0509628dc64db0f69000d599bc761cb8e3125144de44367081126a
- initial_input_ast: 4c5eeffd0306b20c8deece509782b81ea8583245f650e40a4a300d517f6ed5f4
- initial_input_ast: a56b3f9908dec2acaed302691d4fe0c2cf046f0deb8f188f617e042e75502f71
initial_ast: 99adc86987f19c3e75d507e6ef98ffc55bea8403410c2a4fa99ab4c6d69e131b
unrolled_ast: 99adc86987f19c3e75d507e6ef98ffc55bea8403410c2a4fa99ab4c6d69e131b
initial_ast: 90bb6f3c3453976ec13875f39ad9ae5c852f3d24bd76e6c170e526f11f91b626
unrolled_ast: 90bb6f3c3453976ec13875f39ad9ae5c852f3d24bd76e6c170e526f11f91b626

View File

@ -7,5 +7,5 @@ outputs:
- initial_input_ast: 3254bbbc78ad3eec1c6667ade0b3d3da5ee17c7e569118cc1c771ba607e79ab0
- initial_input_ast: 19f1be52a19445695f23724e1979b362dd3fcf31aace997c829e2206dc1cccbe
- initial_input_ast: d2fc1992beaf062678bbf6c3e862820dbbea39926589afcdc46c19c8669f0e37
initial_ast: 10acf87c7211999c31d2a9ea2fba3fb4bee0304c03dd23b0501f2ba0fadd0177
unrolled_ast: 10acf87c7211999c31d2a9ea2fba3fb4bee0304c03dd23b0501f2ba0fadd0177
initial_ast: 108d88ba3cf24132b4d3c837cff16834aaeaaddc296ce85fd116b75eee51fc8b
unrolled_ast: 108d88ba3cf24132b4d3c837cff16834aaeaaddc296ce85fd116b75eee51fc8b

View File

@ -7,5 +7,5 @@ outputs:
- initial_input_ast: 5f19f0086b0509628dc64db0f69000d599bc761cb8e3125144de44367081126a
- initial_input_ast: 4c5eeffd0306b20c8deece509782b81ea8583245f650e40a4a300d517f6ed5f4
- initial_input_ast: a56b3f9908dec2acaed302691d4fe0c2cf046f0deb8f188f617e042e75502f71
initial_ast: 0ea2461cca0ef0c18d5eec530ec6dbc5a3ec662b094442c150b1e8d0bc849446
unrolled_ast: 0ea2461cca0ef0c18d5eec530ec6dbc5a3ec662b094442c150b1e8d0bc849446
initial_ast: 907f4bebafce2bdcd67c2f8f00282e71b50b1fddc7144f5266e6012ef9f48bf5
unrolled_ast: 907f4bebafce2bdcd67c2f8f00282e71b50b1fddc7144f5266e6012ef9f48bf5

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: f1af7e79dff9ede0d2a1c88d5d22801cb3dfe3a9fb34e93bca646e29a61e9f65
initial_ast: 74b9dd3f7abf4686ca41c4020d93b042ae55a84773b8b66a57a146425c5e3b0b
unrolled_ast: 74b9dd3f7abf4686ca41c4020d93b042ae55a84773b8b66a57a146425c5e3b0b
initial_ast: 0d1943f75169de8cb57944e500b0f1d1a1a5611bd18bf26718542087f26edc0f
unrolled_ast: 0d1943f75169de8cb57944e500b0f1d1a1a5611bd18bf26718542087f26edc0f

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: no input
initial_ast: f6c5dae60f1af3a71a7d2c9dc01af78a643de065cacebc1c43cc135fa5e9288d
unrolled_ast: f6c5dae60f1af3a71a7d2c9dc01af78a643de065cacebc1c43cc135fa5e9288d
initial_ast: 49b0fa702fc5eef216b5852ab6d15103c2007c285f8e4c816ad34174341ba033
unrolled_ast: 49b0fa702fc5eef216b5852ab6d15103c2007c285f8e4c816ad34174341ba033

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 29f6139d908d390f890f04d8ee620757d29b7f71cd48c46ff65bc1e70aae840c
initial_ast: 4e007a67995eba456cb723c50f2d68e0e75defbdaf16977519fb74b3d6635df9
unrolled_ast: 4e007a67995eba456cb723c50f2d68e0e75defbdaf16977519fb74b3d6635df9
initial_ast: 4aa8927cbdb480bca202261e8213f99d7f20a2c2984996dd6fcac770d2774f5d
unrolled_ast: 4aa8927cbdb480bca202261e8213f99d7f20a2c2984996dd6fcac770d2774f5d

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 15a1f00a6c0ca8141202e45e534b7afd196e9391c184a4efd94f0d0ccf04a59d
initial_ast: db5d6991262358d8a9915ea7adf990aa0a11f17c420639c85be6b341c035dc80
unrolled_ast: db5d6991262358d8a9915ea7adf990aa0a11f17c420639c85be6b341c035dc80
initial_ast: f8f5c01bf6a9bcaa57c44e48e4b1d873a526b7f24efce54928b5bd7d17568f54
unrolled_ast: f8f5c01bf6a9bcaa57c44e48e4b1d873a526b7f24efce54928b5bd7d17568f54

View File

@ -5,5 +5,5 @@ outputs:
- output:
- initial_input_ast: 8b94c0dbc84f44bd29c614b87947e625ad136549ea29ff18233ba5b01ce63c9b
- initial_input_ast: a62874e75304ab81d487909be1c6b1efa2e5756a2980b46e3bb1368586c3ee83
initial_ast: c6321d54b4e0f42c7c6cff2662052d850ba3af8ce2f858784adf98bd1ccb87f0
unrolled_ast: c6321d54b4e0f42c7c6cff2662052d850ba3af8ce2f858784adf98bd1ccb87f0
initial_ast: 4adda6e6c732a161071c21da51ba8902e7f351722971fd1834a560e5f672d2e8
unrolled_ast: 4adda6e6c732a161071c21da51ba8902e7f351722971fd1834a560e5f672d2e8

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 14cd2c781b154a9037de84e945cfb348e9c587cef94d3e1f3be83e4306f92a0e
initial_ast: 70e69c20b6435a96842fdc4c44a067602d3ae3dbcdaab9b0fbb4648fb590bdc9
unrolled_ast: 70e69c20b6435a96842fdc4c44a067602d3ae3dbcdaab9b0fbb4648fb590bdc9
initial_ast: d8ad2aeb376197baa9983ae969d6e5d2a190675c8001a66a6062b7c3c9fda6b8
unrolled_ast: d8ad2aeb376197baa9983ae969d6e5d2a190675c8001a66a6062b7c3c9fda6b8

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: fd19d82c3aba921f01b37174e3eb7fb603438506fe511657e21235b9fb3647d2
initial_ast: ac34d0d4cc9594de65d202f2ee9e693293221b121bc8b4cff4ef2746bc3109c8
unrolled_ast: ac34d0d4cc9594de65d202f2ee9e693293221b121bc8b4cff4ef2746bc3109c8
initial_ast: 003f8bcd2065401f1ed21d8ca268a02a7da3c0f7dcbbfd1b145ba76b9cf9885d
unrolled_ast: 003f8bcd2065401f1ed21d8ca268a02a7da3c0f7dcbbfd1b145ba76b9cf9885d

View File

@ -5,5 +5,5 @@ outputs:
- output:
- initial_input_ast: 12a0efa27e9b65c045088e471e6c254bb71c60cca4eb369f41e83a29301130cf
- initial_input_ast: 5622eb396c2aea656e3bfa6b1ad0d39fce6bc221978a13c9be4d750da46cfc48
initial_ast: d3cc0b8f43226ee293dc4146caab70f4936c8eaebebce770a3934743dc64d407
unrolled_ast: d3cc0b8f43226ee293dc4146caab70f4936c8eaebebce770a3934743dc64d407
initial_ast: 6c7e6756250ed03109d11b90db2cd72e3db761c0ef2d1f8467d8a069df29cfb2
unrolled_ast: 6c7e6756250ed03109d11b90db2cd72e3db761c0ef2d1f8467d8a069df29cfb2

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 0961f603812e241567b6e3ef5adb458309f1829eb2c08a216efccb17bea89faf
initial_ast: a9744d52aa60e29370ea0089e3e7b113ae8942c2cfc968eeeb965cc15604b847
unrolled_ast: a9744d52aa60e29370ea0089e3e7b113ae8942c2cfc968eeeb965cc15604b847
initial_ast: 2b70c901581ffad2061e1a3ad8cef937b7fc3d251a7967704c28ce0613aa0217
unrolled_ast: 2b70c901581ffad2061e1a3ad8cef937b7fc3d251a7967704c28ce0613aa0217

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: f18a0e019ca4719c4c4ef5b7313f562c3bc9581819d161d84566e706f3765249
initial_ast: 72d770c33d31e1e91a36822c5e2e225f2cd500f7c67db73c8abaa431db020d8b
unrolled_ast: 72d770c33d31e1e91a36822c5e2e225f2cd500f7c67db73c8abaa431db020d8b
initial_ast: 64bbdbb801591bfdd54cf70019107a359ca2ef0d326be54c4d5622c848cb8de0
unrolled_ast: 64bbdbb801591bfdd54cf70019107a359ca2ef0d326be54c4d5622c848cb8de0

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 16910a94cf1f803ae6425ae6bee9422b01651c2c243b5e46807dc3191d169e64
initial_ast: 8777cfc18568dcd54cacffbc2a68ce2bba5cbe0c74d6e40a2534c7ecd2408007
unrolled_ast: 8777cfc18568dcd54cacffbc2a68ce2bba5cbe0c74d6e40a2534c7ecd2408007
initial_ast: 46c9559d438edf0a3ea4939dc33277a04ea67b88424d5aeb56de436635fd83ca
unrolled_ast: 46c9559d438edf0a3ea4939dc33277a04ea67b88424d5aeb56de436635fd83ca

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: no input
initial_ast: e1397e3a912685e40f2d239bd7fdb57b7c616ca41e7137194324ff29e2687e06
unrolled_ast: e1397e3a912685e40f2d239bd7fdb57b7c616ca41e7137194324ff29e2687e06
initial_ast: c82482109b2b5c7186d74b1f6a71aff3e0a5b1c5262b8a78c44fa62a9c9f0793
unrolled_ast: c82482109b2b5c7186d74b1f6a71aff3e0a5b1c5262b8a78c44fa62a9c9f0793

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: no input
initial_ast: e5b52f3d610c89b80f80f7990f00e469c9122666bb1ab9e1cfa25f611598d4d9
unrolled_ast: e5b52f3d610c89b80f80f7990f00e469c9122666bb1ab9e1cfa25f611598d4d9
initial_ast: 56a17552b6c128ee9673d45adc754753d762990f121e9bd0376496beecb3eabf
unrolled_ast: 56a17552b6c128ee9673d45adc754753d762990f121e9bd0376496beecb3eabf

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: no input
initial_ast: 395c6e7f1c23f14e7eb954f86db7caf562f9afcf8ba74dd68c987da2bd4b5b31
unrolled_ast: 395c6e7f1c23f14e7eb954f86db7caf562f9afcf8ba74dd68c987da2bd4b5b31
initial_ast: 8882395c16e9800e80deebecb06005952b99a88723eee04e9bf1f4ee5d42bf1c
unrolled_ast: 8882395c16e9800e80deebecb06005952b99a88723eee04e9bf1f4ee5d42bf1c

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: b649852fa2fd7eda05bd0ba261f01dcee93b6b825d5d30fddb8dd5c5710081ca
initial_ast: 98d2449e87f1a922f56aefb40d5e9edaf9e5c6c177810defee8c55e862a0c43f
unrolled_ast: 98d2449e87f1a922f56aefb40d5e9edaf9e5c6c177810defee8c55e862a0c43f
initial_ast: 6b8b967664dbbb3e22420516aeac72957bf62b07a87851cf7ba803aac76fb752
unrolled_ast: 6b8b967664dbbb3e22420516aeac72957bf62b07a87851cf7ba803aac76fb752

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 3f35e74d282a1e5281e7f283d1e572a3dc75dea1a5ef1a0f8c7f46412ef946a7
initial_ast: d511c6a8b6d3aa29c4d52dab27af3b5a0b2ef3a57b042b620a8cc91b00472f47
unrolled_ast: d511c6a8b6d3aa29c4d52dab27af3b5a0b2ef3a57b042b620a8cc91b00472f47
initial_ast: 9ac9a6615a1b0a46478b319e69f84de3a9a39123ddf9c8c7009931d7319967fc
unrolled_ast: 9ac9a6615a1b0a46478b319e69f84de3a9a39123ddf9c8c7009931d7319967fc

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 4e3882d83c8044e40258f8414966b09c715b00e08bc3383030cecf2c4a825c60
initial_ast: 93bfac16d1f7c126b55801c5dbd4fe5f917278dff864bc76c6815e23433158c2
unrolled_ast: 93bfac16d1f7c126b55801c5dbd4fe5f917278dff864bc76c6815e23433158c2
initial_ast: 78cd624d5a41679923d1802a284924d1f2de370a6ab422f1f9b04096707c8731
unrolled_ast: 78cd624d5a41679923d1802a284924d1f2de370a6ab422f1f9b04096707c8731

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: eeba130bda3ee24f2a4bf92f67fb555ab849173910a647096e28729c2ebd71c2
initial_ast: 27b16b423a07ea4bc103ee0ad466de6bb8b756a84c3fd9c6c2a6671ca317154d
unrolled_ast: 27b16b423a07ea4bc103ee0ad466de6bb8b756a84c3fd9c6c2a6671ca317154d
initial_ast: 460afe0b1aaa06f664fcee198f09df7295b79e5abe384748ac533a1196b38e90
unrolled_ast: 460afe0b1aaa06f664fcee198f09df7295b79e5abe384748ac533a1196b38e90

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 3a510480221eb323713b4b10cc374ba357f130e8ac2b07bf1c69ad5d8c936f12
initial_ast: 66e040c644e245d90b9ee3d4c6a5d712643956f2b7182431e4a3124429e0328f
unrolled_ast: 66e040c644e245d90b9ee3d4c6a5d712643956f2b7182431e4a3124429e0328f
initial_ast: 8bd0eddab31639bbf9b59055aabaaac96f6b4ecf0cfb9237dfaa7cb8029c6bad
unrolled_ast: 8bd0eddab31639bbf9b59055aabaaac96f6b4ecf0cfb9237dfaa7cb8029c6bad

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 3f35e74d282a1e5281e7f283d1e572a3dc75dea1a5ef1a0f8c7f46412ef946a7
initial_ast: a8425ef9203a8d4e1a0b2b63ae71c97af8ad6549c6ef1290e90263c7f119d941
unrolled_ast: a8425ef9203a8d4e1a0b2b63ae71c97af8ad6549c6ef1290e90263c7f119d941
initial_ast: 214befce37c1b0c1be25f614a3d928bae22f6d1dc518288b7ed4d007eddec2a7
unrolled_ast: 214befce37c1b0c1be25f614a3d928bae22f6d1dc518288b7ed4d007eddec2a7

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 9206742d7f18345efbd4d9077cd1aca0855d43a2436be0697ec22954650e3737
initial_ast: 9aa2f475e157ef05f8719a3cf9b9ec66ff624e42f630c5271d5b133dc07737cb
unrolled_ast: 9aa2f475e157ef05f8719a3cf9b9ec66ff624e42f630c5271d5b133dc07737cb
initial_ast: 30a95deb7c12861dc98cbed1fb9ba37af688ad23504ac80bfedb74d00bcb1d32
unrolled_ast: 30a95deb7c12861dc98cbed1fb9ba37af688ad23504ac80bfedb74d00bcb1d32

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 047866515f4dc74cd9966242734984b53e72f87afc21f7171b118e6defa1f166
initial_ast: a2f110a65a61c8d6dc2f3f1d0fed51d3b237943c538d99e3059a24f248e323ac
unrolled_ast: a2f110a65a61c8d6dc2f3f1d0fed51d3b237943c538d99e3059a24f248e323ac
initial_ast: 258b60821103350d8e3247c0b4ab8804bae030a7906d4a88ac99e6d45b5245c7
unrolled_ast: 258b60821103350d8e3247c0b4ab8804bae030a7906d4a88ac99e6d45b5245c7

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 5e0a61d909d2e94dfbc95775e4c5c356adb61375ceef2d583a5ab927b3b6342e
initial_ast: 010a79bb3a9c1741cf10c9e389a27d6144de9ff20e98d27981edf903d56c5cec
unrolled_ast: 010a79bb3a9c1741cf10c9e389a27d6144de9ff20e98d27981edf903d56c5cec
initial_ast: f0ecb5dc7f27c72f38e0822af08476c24981fd6aed3a17e3588753c7a5f8e2fa
unrolled_ast: f0ecb5dc7f27c72f38e0822af08476c24981fd6aed3a17e3588753c7a5f8e2fa

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 4e3882d83c8044e40258f8414966b09c715b00e08bc3383030cecf2c4a825c60
initial_ast: bf9d7a6d419a40d9f4e7e042d36d785efe72d8fcf431ebcf8737aa35c42e9195
unrolled_ast: bf9d7a6d419a40d9f4e7e042d36d785efe72d8fcf431ebcf8737aa35c42e9195
initial_ast: c725f6542c21f1324498289b9496365219fc1dd662af5767d36455751ceb7f95
unrolled_ast: c725f6542c21f1324498289b9496365219fc1dd662af5767d36455751ceb7f95

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: e19dcac0064fed4ec8293b9b40ec70cb94b5fdb05f1081fc29f46a023bf79b09
initial_ast: afe13dd9ae15d78809d112dd37d150e9b178f03253ea4d87bed659d4d8861cb2
unrolled_ast: afe13dd9ae15d78809d112dd37d150e9b178f03253ea4d87bed659d4d8861cb2
initial_ast: 227822368d014c2dc16897037981786cba91cade824469e49792f12638e8ce6c
unrolled_ast: 227822368d014c2dc16897037981786cba91cade824469e49792f12638e8ce6c

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: ae0703890dbea144e675f85228e958d6903df0d1ebd88f16a531624270205cc2
initial_ast: bb10833ffed86bf9aa0bb3d2319dc806fc7c60de7035f1d66889a8f9ecd74e12
unrolled_ast: bb10833ffed86bf9aa0bb3d2319dc806fc7c60de7035f1d66889a8f9ecd74e12
initial_ast: 85d116272d15c32e476cdebedd70fb8d5ce65b5d0046603759760fd6ca8e11fc
unrolled_ast: 85d116272d15c32e476cdebedd70fb8d5ce65b5d0046603759760fd6ca8e11fc

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 20c78fdc1aa61aab7198367aa6618923dca3acf5d2a4abaf1724786fb156234b
initial_ast: 6204df703e19fa26867cada7982cfee6fd2e52bf55882c9aa44555fd7837f67c
unrolled_ast: 40ce1a9c6499c9a9f86452c6dd9affb02751ecfee2627bbf6380ba613c8a7878
initial_ast: 65e331213ebc81e4a8db15f62396000aef025bc21f34723887037e7814ec12f7
unrolled_ast: eab4690376f15faa63bac593f9a9cb2405021db2ae9c5cd61c4ce6245347a451

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: ab4d5c5684c7eac16c0eef269b050be81f9b5af82e541d9bc43b1da5f2dfce33
initial_ast: e1ee866cad028d2b6f22cf8e3edac81260e0bff8356d57fc35f26ded47d181d4
unrolled_ast: 1f885a10e89e5a51467dd69f1609c833823809e43bc007638c55e38071748ddb
initial_ast: af3e8506e2267f6c88b43589a7ab8e4d94444be0e3f5780231e05be360be55c6
unrolled_ast: 4d58d47b6a6208107daf7151c5165377d37a94add78e407788e8563671eead07

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 9af772ba2f200de34252f1d0306b9dd5d028f5019ff940be9c3624c4c78e1518
initial_ast: 6d702bfd15851a7b6ed1266b8f222099e735fa40fd3f6c7afbf8abfbb34b40eb
unrolled_ast: 6d702bfd15851a7b6ed1266b8f222099e735fa40fd3f6c7afbf8abfbb34b40eb
initial_ast: 2e9336522825840daf82b99d91d4634aba2678e4f98d136a1a0121c51b2e5999
unrolled_ast: 2e9336522825840daf82b99d91d4634aba2678e4f98d136a1a0121c51b2e5999

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: b36400e27028efb4b1b490603f9f3d4f1ab5b6c0d2556e951977e5cc6637221e
initial_ast: 45bfb8ecfef348a2f572ef16e4a8acddf4ba4100f4635622c9123900a13d4aa1
unrolled_ast: 45bfb8ecfef348a2f572ef16e4a8acddf4ba4100f4635622c9123900a13d4aa1
initial_ast: d133b0af76fb581e058760fc979962d122e3bc43cf156684449335c405536d33
unrolled_ast: d133b0af76fb581e058760fc979962d122e3bc43cf156684449335c405536d33

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: a28b88dc36ace78ed0de93b56db7274f16521597ccf1e820a17fdb60a1e3d92a
initial_ast: 1d86e1aac0e25fdc1240d21db65e5560d9239e8a688f36434d776a2a2cbfbf7f
unrolled_ast: 1d86e1aac0e25fdc1240d21db65e5560d9239e8a688f36434d776a2a2cbfbf7f
initial_ast: 1fd23b66e7ae5a9ec8168c559fa30f913c853d2a8bd64e8e5a56d39a3c18e33f
unrolled_ast: 1fd23b66e7ae5a9ec8168c559fa30f913c853d2a8bd64e8e5a56d39a3c18e33f

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 00c3cc87ce3c30894ad6b6874ce6dacfa02c9f2bc171615ff627f06f2e201997
initial_ast: f18d5c334bc0c747499eacb6a0352da66a286d1f481ecd803465de3c2ee0cde2
unrolled_ast: f18d5c334bc0c747499eacb6a0352da66a286d1f481ecd803465de3c2ee0cde2
initial_ast: 05854d5dee2e23cb551eb131f9d3bec4d7f33fbbed3c29dbecf055f7d8995d9e
unrolled_ast: 05854d5dee2e23cb551eb131f9d3bec4d7f33fbbed3c29dbecf055f7d8995d9e

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: no input
initial_ast: 450c975f0cda3f2d34473d49050d7d416fc412c9d45b52123c596ed29e857f0d
unrolled_ast: 450c975f0cda3f2d34473d49050d7d416fc412c9d45b52123c596ed29e857f0d
initial_ast: 6a32094f12cc52922f026312670190a793a549a5fa1f33b86357826505737677
unrolled_ast: 6a32094f12cc52922f026312670190a793a549a5fa1f33b86357826505737677

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: no input
initial_ast: dbe6aa13dda7ff3cb32573764fb36109c7bd274d52af44ff575f2ea6d15555eb
unrolled_ast: dbe6aa13dda7ff3cb32573764fb36109c7bd274d52af44ff575f2ea6d15555eb
initial_ast: ec25234e7830d5dc5e78ece4cb625478fb91d15dda627a6f0f32ab85a2c12244
unrolled_ast: ec25234e7830d5dc5e78ece4cb625478fb91d15dda627a6f0f32ab85a2c12244

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: no input
initial_ast: 74b5313552bdb51bdad8a657d0654be98aa4af8dad03ddbba2bb361ec73a0f79
unrolled_ast: 74b5313552bdb51bdad8a657d0654be98aa4af8dad03ddbba2bb361ec73a0f79
initial_ast: 45eba143ed60c3504606b1d63c9b222b3680ea90431aebdd74fbcc9e7eae0ed2
unrolled_ast: 45eba143ed60c3504606b1d63c9b222b3680ea90431aebdd74fbcc9e7eae0ed2

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 00c3cc87ce3c30894ad6b6874ce6dacfa02c9f2bc171615ff627f06f2e201997
initial_ast: f18d5c334bc0c747499eacb6a0352da66a286d1f481ecd803465de3c2ee0cde2
unrolled_ast: f18d5c334bc0c747499eacb6a0352da66a286d1f481ecd803465de3c2ee0cde2
initial_ast: 05854d5dee2e23cb551eb131f9d3bec4d7f33fbbed3c29dbecf055f7d8995d9e
unrolled_ast: 05854d5dee2e23cb551eb131f9d3bec4d7f33fbbed3c29dbecf055f7d8995d9e

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: c93f9fd667509aa0aa3896c261cb48c7d579d9856d0a14b96e9b2c7e04566a0a
initial_ast: f18d5c334bc0c747499eacb6a0352da66a286d1f481ecd803465de3c2ee0cde2
unrolled_ast: f18d5c334bc0c747499eacb6a0352da66a286d1f481ecd803465de3c2ee0cde2
initial_ast: 05854d5dee2e23cb551eb131f9d3bec4d7f33fbbed3c29dbecf055f7d8995d9e
unrolled_ast: 05854d5dee2e23cb551eb131f9d3bec4d7f33fbbed3c29dbecf055f7d8995d9e

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 7b0236b04ad9caa4039a989b91e7f49021a9daf09a495a9cdad7c371ee196761
initial_ast: bbac1db068d093084fd034e7d0f9ef850730b08b2cd6f7539fd189479aa12932
unrolled_ast: bbac1db068d093084fd034e7d0f9ef850730b08b2cd6f7539fd189479aa12932
initial_ast: 02a6c3318bd4ccf328425cd890e16d2933b67e5b9b14ac6244c743275f03a1a6
unrolled_ast: 02a6c3318bd4ccf328425cd890e16d2933b67e5b9b14ac6244c743275f03a1a6

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 5e1e23855cb6841ee210c8a24e11cc819e91ce3b087a8c961035c574baa1784b
initial_ast: acb9a51c34074ae6b32540d3ce7564527272200903a9ca0c94a54c94ffd2a6d8
unrolled_ast: acb9a51c34074ae6b32540d3ce7564527272200903a9ca0c94a54c94ffd2a6d8
initial_ast: d362fcd34317c6af293d435e907f137d6aa71f95683629e0cb9c68f92393a677
unrolled_ast: d362fcd34317c6af293d435e907f137d6aa71f95683629e0cb9c68f92393a677

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: no input
initial_ast: afc00f6d0f1e6251069f2eca6dd149916466c4d0f5d2e8584df2435b3dd25c71
unrolled_ast: afc00f6d0f1e6251069f2eca6dd149916466c4d0f5d2e8584df2435b3dd25c71
initial_ast: 201ffacb298e0bcf45934c7a3691cf9c0390e16cb26677f695d497555359b1e9
unrolled_ast: 201ffacb298e0bcf45934c7a3691cf9c0390e16cb26677f695d497555359b1e9

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: a60503e3f83fbee658d02fb3806b3a3326fc6d4f4e43ac05bce7b16ac0552edb
initial_ast: 77951acb353c18168cb7bab88a3f7ebec29c530438ac34d4cd470d44d94d9ad2
unrolled_ast: 77951acb353c18168cb7bab88a3f7ebec29c530438ac34d4cd470d44d94d9ad2
initial_ast: d94d68376f1f45ec2e63b49e01939c95625f6db92f2a7ca9210c0bf2bd22a0ae
unrolled_ast: d94d68376f1f45ec2e63b49e01939c95625f6db92f2a7ca9210c0bf2bd22a0ae

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: no input
initial_ast: 3e92165f6dbeaa140379a0879c6642741370d57f8c2cba40d8f3afc944a77691
unrolled_ast: 3e92165f6dbeaa140379a0879c6642741370d57f8c2cba40d8f3afc944a77691
initial_ast: 7cb90e649202bf8b76da1a6d4eaf65b55d6872aa372ad3cbc72fd6224f9378c0
unrolled_ast: 7cb90e649202bf8b76da1a6d4eaf65b55d6872aa372ad3cbc72fd6224f9378c0

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: 1b5330a3356c437ddc09afc027d1365eedb24c56777772fd83b9167cfebb4435
initial_ast: a625b5a5741abd87a155a202fb53c5843bd311c11e6df9adb27ad3f91d7e42e1
unrolled_ast: a625b5a5741abd87a155a202fb53c5843bd311c11e6df9adb27ad3f91d7e42e1
initial_ast: 89a9088b787d344c1d55e7fba58c94773a58dde967d2499e897ce19ba5587653
unrolled_ast: 89a9088b787d344c1d55e7fba58c94773a58dde967d2499e897ce19ba5587653

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: no input
initial_ast: 5b0c90ba10301efea7f65fb625aa2e1fa476f21f1f897c107f4c0c713fca5c97
unrolled_ast: 5b0c90ba10301efea7f65fb625aa2e1fa476f21f1f897c107f4c0c713fca5c97
initial_ast: adb2ec4ebdcef7f0602644d8a81ea57dbeaeec9e67a0b91fc2dec3052ff29d6c
unrolled_ast: adb2ec4ebdcef7f0602644d8a81ea57dbeaeec9e67a0b91fc2dec3052ff29d6c

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: a28b88dc36ace78ed0de93b56db7274f16521597ccf1e820a17fdb60a1e3d92a
initial_ast: 3d25db905c46d12c33837641c989a6e304ff06d8a632c5e19c2aa281fa47c66a
unrolled_ast: 3d25db905c46d12c33837641c989a6e304ff06d8a632c5e19c2aa281fa47c66a
initial_ast: 9e499c18873510b9af07db030a4d5a14064e9353fd68ab0462c3ebd9a24fe066
unrolled_ast: 9e499c18873510b9af07db030a4d5a14064e9353fd68ab0462c3ebd9a24fe066

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: d12e492b73a208051457ad2ce9ed8dbbb5a8096f32f52d697c41972ba8b88d35
initial_ast: 20bbc0fc6395c2ab6f4b698107a5e77a95ad851bf12a7715b0ae69f740c6fc36
unrolled_ast: 20bbc0fc6395c2ab6f4b698107a5e77a95ad851bf12a7715b0ae69f740c6fc36
initial_ast: 30580664411bf43d964ec10dba049e94d4a99100822658c90c5558cb2e447635
unrolled_ast: 30580664411bf43d964ec10dba049e94d4a99100822658c90c5558cb2e447635

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: no input
initial_ast: efc5103265669cbb2f34ccd0fc92191aa66772481e811b73c011374cdd4b8b6a
unrolled_ast: efc5103265669cbb2f34ccd0fc92191aa66772481e811b73c011374cdd4b8b6a
initial_ast: 76d2092acc0e16f777d8b00394a135d6542a02223f429c95a73fabf0ac857b44
unrolled_ast: 76d2092acc0e16f777d8b00394a135d6542a02223f429c95a73fabf0ac857b44

View File

@ -4,5 +4,5 @@ expectation: Pass
outputs:
- output:
- initial_input_ast: no input
initial_ast: 844d8a50fd65fbcb171cf66b21c1e6bb1b6f73e0087010a3b7b3214dda022722
unrolled_ast: 844d8a50fd65fbcb171cf66b21c1e6bb1b6f73e0087010a3b7b3214dda022722
initial_ast: 5935d41219c0dba10f8f198e4c7cfde47e03048f96060be76fb19454a6ef9ba3
unrolled_ast: 5935d41219c0dba10f8f198e4c7cfde47e03048f96060be76fb19454a6ef9ba3

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