#![cfg_attr(coverage_nightly, coverage(off))]
use crate::services::deep_wasm::{
DeepWasmResult, DwarfDebugEntry, Location, SourceMapEntry, SourceToWasmMapping,
};
use std::collections::HashMap;
use std::path::PathBuf;
fn estimate_function_index(die_offset: u64) -> u32 {
(die_offset / 100) as u32
}
pub struct CorrelationEngine {
confidence_threshold: f64,
}
impl CorrelationEngine {
#[provable_contracts_macros::contract("pmat-core.yaml", equation = "check_compliance")]
pub fn new() -> Self {
Self {
confidence_threshold: 0.7, }
}
#[provable_contracts_macros::contract("pmat-core.yaml", equation = "check_compliance")]
pub fn with_confidence_threshold(threshold: f64) -> Self {
Self {
confidence_threshold: threshold.clamp(0.0, 1.0),
}
}
}
impl Default for CorrelationEngine {
fn default() -> Self {
Self::new()
}
}
include!("correlation_engine_correlate.rs");
include!("correlation_engine_line_programs.rs");
include!("correlation_engine_lookups.rs");
include!("correlation_engine_unit_tests.rs");