MCPcopy Create free account
hub / github.com/Rust-API/Rust-API-Bypass-Checker / extrapolate

Method extrapolate

src/analysis/mir_visitor/body_visitor.rs:569–587  ·  view source on GitHub ↗

Perform widening if the iteration counter exceeds `widening_delay`

(
        &mut self,
        circle: &WtoCircle,
        before: AbstractDomain<DomainType>,
        after: AbstractDomain<DomainType>,
    )

Source from the content-addressed store, hash-verified

567
568 /// Perform widening if the iteration counter exceeds `widening_delay`
569 fn extrapolate(
570 &mut self,
571 circle: &WtoCircle,
572 before: AbstractDomain<DomainType>,
573 after: AbstractDomain<DomainType>,
574 ) -> AbstractDomain<DomainType> {
575 let iteration = circle.get_iter_num();
576 let widening_delay = self.context.analysis_options.widening_delay;
577 let bb = circle.head().node(); // Get head basic block from circle
578
579 if iteration <= widening_delay {
580 // We haven't reached the threshold for widening, so we just execute lub
581 before.join(&after)
582 } else {
583 debug!("Widening for {:?} at iteration: {}", bb, iteration);
584 // We have reached the threshold for widening, execute widening
585 before.widening_with(&after)
586 }
587 }
588
589 /// Perform narrowing according to the iteration counter
590 fn refine(

Callers 1

visit_circleMethod · 0.80

Calls 5

get_iter_numMethod · 0.80
nodeMethod · 0.80
headMethod · 0.80
joinMethod · 0.45
widening_withMethod · 0.45

Tested by

no test coverage detected