pub struct RangeAnalyzer<'tcx, T: IntervalArithmetic + ConstConvert + Debug> {Show 13 fields
pub tcx: TyCtxt<'tcx>,
pub debug: bool,
pub ssa_def_id: Option<DefId>,
pub essa_def_id: Option<DefId>,
pub final_vars: RAResultMap<'tcx, T>,
pub ssa_places_mapping: FxHashMap<DefId, HashMap<Place<'tcx>, HashSet<Place<'tcx>>>>,
pub fn_constraintgraph_mapping: FxHashMap<DefId, ConstraintGraph<'tcx, T>>,
pub callgraph: CallGraphInfo<'tcx>,
pub body_map: FxHashMap<DefId, Body<'tcx>>,
pub cg_map: FxHashMap<DefId, Rc<RefCell<ConstraintGraph<'tcx, T>>>>,
pub vars_map: FxHashMap<DefId, Vec<RefCell<VarNodes<'tcx, T>>>>,
pub final_vars_vec: RAVecResultMap<'tcx, T>,
pub path_constraints: PathConstraintMap<'tcx>,
}
Fields§
§tcx: TyCtxt<'tcx>
§debug: bool
§ssa_def_id: Option<DefId>
§essa_def_id: Option<DefId>
§final_vars: RAResultMap<'tcx, T>
§ssa_places_mapping: FxHashMap<DefId, HashMap<Place<'tcx>, HashSet<Place<'tcx>>>>
§fn_constraintgraph_mapping: FxHashMap<DefId, ConstraintGraph<'tcx, T>>
§callgraph: CallGraphInfo<'tcx>
§body_map: FxHashMap<DefId, Body<'tcx>>
§cg_map: FxHashMap<DefId, Rc<RefCell<ConstraintGraph<'tcx, T>>>>
§vars_map: FxHashMap<DefId, Vec<RefCell<VarNodes<'tcx, T>>>>
§final_vars_vec: RAVecResultMap<'tcx, T>
§path_constraints: PathConstraintMap<'tcx>
Implementations§
Source§impl<'tcx, T> RangeAnalyzer<'tcx, T>
impl<'tcx, T> RangeAnalyzer<'tcx, T>
pub fn new(tcx: TyCtxt<'tcx>, debug: bool) -> Self
fn build_constraintgraph( &mut self, body_mut_ref: &'tcx Body<'tcx>, def_id: DefId, )
fn only_caller_range_analysis(&mut self)
pub fn start_path_constraints_analysis_for_defid( &mut self, def_id: DefId, ) -> Option<PathConstraint<'tcx>>
pub fn start_path_constraints_analysis(&mut self)
Trait Implementations§
Source§impl<'tcx, T> Analysis for RangeAnalyzer<'tcx, T>
impl<'tcx, T> Analysis for RangeAnalyzer<'tcx, T>
Source§impl<'tcx, T> RangeAnalysis<'tcx, T> for RangeAnalyzer<'tcx, T>
impl<'tcx, T> RangeAnalysis<'tcx, T> for RangeAnalyzer<'tcx, T>
Source§fn get_fn_range(&self, def_id: DefId) -> Option<RAResult<'tcx, T>>
fn get_fn_range(&self, def_id: DefId) -> Option<RAResult<'tcx, T>>
The fucntion returns the range information for all local variables (Places) in a given
function specified by
def_id
.Source§fn get_fn_ranges_percall(&self, def_id: DefId) -> Option<Vec<RAResult<'tcx, T>>>
fn get_fn_ranges_percall(&self, def_id: DefId) -> Option<Vec<RAResult<'tcx, T>>>
The function returns the range analysis results for each call instance of the specified function.
This is useful in interprocedural or context-sensitive analyses,
where a function might be analyzed multiple times under different calling contexts.
Source§fn get_all_fn_ranges(&self) -> RAResultMap<'tcx, T>
fn get_all_fn_ranges(&self) -> RAResultMap<'tcx, T>
The function returns the complete mapping of range information for all functions in the crate.
Source§fn get_all_fn_ranges_percall(&self) -> RAVecResultMap<'tcx, T>
fn get_all_fn_ranges_percall(&self) -> RAVecResultMap<'tcx, T>
The function returns the range results for every call instance of every function in the crate.
Source§fn get_fn_local_range(
&self,
def_id: DefId,
place: Place<'tcx>,
) -> Option<Range<T>>
fn get_fn_local_range( &self, def_id: DefId, place: Place<'tcx>, ) -> Option<Range<T>>
The function returns the inferred range for a specific variable (Place) in a specific function.
Source§fn get_fn_path_constraints(&self, def_id: DefId) -> Option<PathConstraint<'tcx>>
fn get_fn_path_constraints(&self, def_id: DefId) -> Option<PathConstraint<'tcx>>
The function returns a mapping from feasible control-flow paths to symbolic constraints.
Each constraint is a triple of (
Place
, Place
, BinOp
) representing
path-sensitive relational information useful for pruning infeasible paths.Source§fn get_all_path_constraints(&self) -> PathConstraintMap<'tcx>
fn get_all_path_constraints(&self) -> PathConstraintMap<'tcx>
The function returns path constraints for all functions in the crate.
Auto Trait Implementations§
impl<'tcx, T> Freeze for RangeAnalyzer<'tcx, T>
impl<'tcx, T> !RefUnwindSafe for RangeAnalyzer<'tcx, T>
impl<'tcx, T> !Send for RangeAnalyzer<'tcx, T>
impl<'tcx, T> !Sync for RangeAnalyzer<'tcx, T>
impl<'tcx, T> Unpin for RangeAnalyzer<'tcx, T>where
T: Unpin,
impl<'tcx, T> !UnwindSafe for RangeAnalyzer<'tcx, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more