mirror of
https://github.com/powdr-labs/powdr.git
synced 2026-04-20 03:03:25 -04:00
Adjust paths.
This commit is contained in:
@@ -21,7 +21,6 @@ members = [
|
||||
"linker",
|
||||
"asm_utils",
|
||||
"airgen",
|
||||
"type_check",
|
||||
"riscv_executor",
|
||||
]
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#![deny(clippy::print_stdout)]
|
||||
|
||||
mod block_enforcer;
|
||||
mod machine_check;
|
||||
pub mod machine_check;
|
||||
mod vm;
|
||||
|
||||
use ast::{asm_analysis::AnalysisASMFile, parsed::asm::ASMProgram, DiffMonitor};
|
||||
@@ -60,15 +60,3 @@ pub mod utils {
|
||||
.unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_util {
|
||||
use ast::asm_analysis::AnalysisASMFile;
|
||||
use importer::load_dependencies_and_resolve_str;
|
||||
use number::FieldElement;
|
||||
|
||||
/// A test utility to process a source file until after type checking
|
||||
pub fn typecheck_str<T: FieldElement>(source: &str) -> Result<AnalysisASMFile<T>, Vec<String>> {
|
||||
analysis::machine_check::check(load_dependencies_and_resolve_str(source))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ mod tests {
|
||||
use importer::load_dependencies_and_resolve_str;
|
||||
use number::Bn254Field;
|
||||
|
||||
use crate::check;
|
||||
use super::check;
|
||||
|
||||
// A utility to test behavior of the type checker on source inputs
|
||||
// TODO: test returned values, not just success
|
||||
|
||||
@@ -25,23 +25,18 @@ pub(crate) fn analyze<T: FieldElement>(
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_utils {
|
||||
use crate::test_util::typecheck_str;
|
||||
|
||||
use super::*;
|
||||
|
||||
/// A test utility to process a source file until after inference
|
||||
pub fn infer_str<T: FieldElement>(source: &str) -> Result<AnalysisASMFile<T>, Vec<String>> {
|
||||
inference::infer(typecheck_str(source).unwrap())
|
||||
let machines =
|
||||
crate::machine_check::check(importer::load_dependencies_and_resolve_str(source))
|
||||
.unwrap();
|
||||
inference::infer(machines)
|
||||
}
|
||||
|
||||
/// A test utility to process a source file until after batching
|
||||
pub fn batch_str<T: FieldElement>(source: &str) -> AnalysisASMFile<T> {
|
||||
batcher::batch(infer_str(source).unwrap())
|
||||
}
|
||||
|
||||
/// A test utility to process a source file until after asm to pil reduction
|
||||
#[allow(dead_code)]
|
||||
pub fn asm_to_pil_str<T: FieldElement>(source: &str) -> AnalysisASMFile<T> {
|
||||
asm_to_pil::compile(batch_str(source))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ mod tests {
|
||||
src: &str,
|
||||
) -> BTreeMap<AbsoluteSymbolPath, (Machine<T>, Option<Rom<T>>)> {
|
||||
let parsed = parser::parse_asm(None, src).unwrap();
|
||||
let checked = type_check::check(parsed).unwrap();
|
||||
let checked = analysis::machine_check::check(parsed).unwrap();
|
||||
checked
|
||||
.items
|
||||
.into_iter()
|
||||
|
||||
Reference in New Issue
Block a user