Skip to main content

SemanticOracle

Trait SemanticOracle 

Source
pub trait SemanticOracle: Send + Sync {
    // Required methods
    fn check_equivalence(&self, source: &str, target: &str) -> SemanticVerdict;
    fn ast_similarity(&self, source: &str, target: &str) -> f64;
    fn compare_memory(&self, source: &str, target: &str) -> bool;
    fn compare_performance(&self, source: &str, target: &str) -> Option<f64>;
}
Expand description

Semantic oracle trait

Required Methods§

Source

fn check_equivalence(&self, source: &str, target: &str) -> SemanticVerdict

Check semantic equivalence between source and target

Source

fn ast_similarity(&self, source: &str, target: &str) -> f64

Calculate AST similarity score

Source

fn compare_memory(&self, source: &str, target: &str) -> bool

Compare memory layouts

Source

fn compare_performance(&self, source: &str, target: &str) -> Option<f64>

Compare performance profiles

Implementors§