pub struct ConstraintGraph<'tcx, T: IntervalArithmetic + ConstConvert + Debug> {Show 24 fields
pub self_def_id: DefId,
pub vars: VarNodes<'tcx, T>,
pub oprs: Vec<BasicOpKind<'tcx, T>>,
pub defmap: DefMap<'tcx>,
pub usemap: UseMap<'tcx>,
pub symbmap: SymbMap<'tcx>,
pub values_branchmap: HashMap<&'tcx Place<'tcx>, ValueBranchMap<'tcx, T>>,
constant_vector: Vec<T>,
pub inst_rand_place_set: Vec<Place<'tcx>>,
pub essa: DefId,
pub ssa: DefId,
pub index: i32,
pub dfs: HashMap<&'tcx Place<'tcx>, i32>,
pub root: HashMap<&'tcx Place<'tcx>, &'tcx Place<'tcx>>,
pub in_component: HashSet<&'tcx Place<'tcx>>,
pub components: HashMap<&'tcx Place<'tcx>, HashSet<&'tcx Place<'tcx>>>,
pub worklist: VecDeque<&'tcx Place<'tcx>>,
pub numAloneSCCs: usize,
pub numSCCs: usize,
pub final_vars: VarNodes<'tcx, T>,
pub arg_count: usize,
pub rerurn_places: HashSet<&'tcx Place<'tcx>>,
pub switchbbs: HashMap<BasicBlock, (Place<'tcx>, Place<'tcx>)>,
pub const_func_place: HashMap<&'tcx Place<'tcx>, usize>,
}
Fields§
§self_def_id: DefId
§vars: VarNodes<'tcx, T>
§oprs: Vec<BasicOpKind<'tcx, T>>
§defmap: DefMap<'tcx>
§usemap: UseMap<'tcx>
§symbmap: SymbMap<'tcx>
§values_branchmap: HashMap<&'tcx Place<'tcx>, ValueBranchMap<'tcx, T>>
§constant_vector: Vec<T>
§inst_rand_place_set: Vec<Place<'tcx>>
§essa: DefId
§ssa: DefId
§index: i32
§dfs: HashMap<&'tcx Place<'tcx>, i32>
§root: HashMap<&'tcx Place<'tcx>, &'tcx Place<'tcx>>
§in_component: HashSet<&'tcx Place<'tcx>>
§components: HashMap<&'tcx Place<'tcx>, HashSet<&'tcx Place<'tcx>>>
§worklist: VecDeque<&'tcx Place<'tcx>>
§numAloneSCCs: usize
§numSCCs: usize
§final_vars: VarNodes<'tcx, T>
§arg_count: usize
§rerurn_places: HashSet<&'tcx Place<'tcx>>
§switchbbs: HashMap<BasicBlock, (Place<'tcx>, Place<'tcx>)>
§const_func_place: HashMap<&'tcx Place<'tcx>, usize>
Implementations§
Source§impl<'tcx, T> ConstraintGraph<'tcx, T>
impl<'tcx, T> ConstraintGraph<'tcx, T>
pub fn convert_const(c: &Const<'_>) -> Option<T>
pub fn new(self_def_id: DefId, essa: DefId, ssa: DefId) -> Self
pub fn new_without_ssa(self_def_id: DefId) -> Self
pub fn build_final_vars( &mut self, places_map: &HashMap<Place<'tcx>, HashSet<Place<'tcx>>>, ) -> (VarNodes<'tcx, T>, Vec<Place<'tcx>>)
pub fn filter_final_vars( vars: &VarNodes<'tcx, T>, places_map: &HashMap<Place<'tcx>, HashSet<Place<'tcx>>>, ) -> HashMap<Place<'tcx>, Range<T>>
pub fn test_and_print_all_symbolic_expressions(&self)
pub fn rap_print_final_vars(&self)
pub fn rap_print_vars(&self)
pub fn print_vars(&self)
pub fn print_conponent_vars(&self)
fn print_values_branchmap(&self)
fn print_symbmap(&self)
fn print_defmap(&self)
fn print_compusemap( &self, component: &HashSet<&'tcx Place<'tcx>>, comp_use_map: &HashMap<&'tcx Place<'tcx>, HashSet<usize>>, )
fn print_usemap(&self)
pub fn get_vars(&self) -> &VarNodes<'tcx, T>
pub fn add_varnode(&mut self, v: &'tcx Place<'tcx>) -> &mut VarNode<'tcx, T>
pub fn build_graph(&mut self, body: &'tcx Body<'tcx>)
pub fn build_value_maps(&mut self, body: &'tcx Body<'tcx>)
pub fn build_value_branch_map( &mut self, body: &Body<'tcx>, discr: &'tcx Operand<'tcx>, targets: &'tcx SwitchTargets, block: BasicBlock, block_data: &'tcx BasicBlockData<'tcx>, )
pub fn flipped_binop(op: BinOp) -> Option<BinOp>
fn reverse_binop(op: BinOp) -> Option<BinOp>
fn extract_condition( &mut self, place: &'tcx Place<'tcx>, switch_block: &'tcx BasicBlockData<'tcx>, ) -> Option<(&'tcx Operand<'tcx>, &'tcx Operand<'tcx>, BinOp)>
fn apply_comparison<U: IntervalArithmetic>( &self, constant: U, cmp_op: BinOp, is_true_branch: bool, const_in_left: bool, ) -> Range<U>
fn build_value_goto_map(&self, block_index: BasicBlock, target: BasicBlock)
pub fn build_varnodes(&mut self)
pub fn build_symbolic_intersect_map(&mut self)
pub fn build_use_map( &mut self, component: &HashSet<&'tcx Place<'tcx>>, ) -> HashMap<&'tcx Place<'tcx>, HashSet<usize>>
pub fn build_terminator( &mut self, block: BasicBlock, terminator: &'tcx Terminator<'tcx>, )
pub fn build_operations( &mut self, inst: &'tcx Statement<'tcx>, block: BasicBlock, )
Sourcefn add_call_op(
&mut self,
sink: &'tcx Place<'tcx>,
args: &'tcx Box<[Spanned<Operand<'tcx>>]>,
terminator: &'tcx Terminator<'tcx>,
func: &'tcx Operand<'tcx>,
block: BasicBlock,
)
fn add_call_op( &mut self, sink: &'tcx Place<'tcx>, args: &'tcx Box<[Spanned<Operand<'tcx>>]>, terminator: &'tcx Terminator<'tcx>, func: &'tcx Operand<'tcx>, block: BasicBlock, )
Adds a function call operation to the graph.
fn add_ssa_op( &mut self, sink: &'tcx Place<'tcx>, inst: &'tcx Statement<'tcx>, operands: &'tcx IndexVec<FieldIdx, Operand<'tcx>>, )
fn add_use_op( &mut self, sink: &'tcx Place<'tcx>, inst: &'tcx Statement<'tcx>, op: &'tcx Operand<'tcx>, )
fn add_essa_op( &mut self, sink: &'tcx Place<'tcx>, inst: &'tcx Statement<'tcx>, operands: &'tcx IndexVec<FieldIdx, Operand<'tcx>>, block: BasicBlock, )
fn add_unary_op( &mut self, sink: &'tcx Place<'tcx>, inst: &'tcx Statement<'tcx>, operand: &'tcx Operand<'tcx>, op: UnOp, )
fn add_binary_op( &mut self, sink: &'tcx Place<'tcx>, inst: &'tcx Statement<'tcx>, op1: &'tcx Operand<'tcx>, op2: &'tcx Operand<'tcx>, bin_op: BinOp, )
fn fix_intersects(&mut self, component: &HashSet<&'tcx Place<'tcx>>)
pub fn widen( &mut self, op: usize, cg_map: &FxHashMap<DefId, Rc<RefCell<ConstraintGraph<'tcx, T>>>>, vars_map: &mut FxHashMap<DefId, Vec<RefCell<VarNodes<'tcx, T>>>>, ) -> bool
pub fn narrow( &mut self, op: usize, cg_map: &FxHashMap<DefId, Rc<RefCell<ConstraintGraph<'tcx, T>>>>, vars_map: &mut FxHashMap<DefId, Vec<RefCell<VarNodes<'tcx, T>>>>, ) -> bool
fn pre_update( &mut self, comp_use_map: &HashMap<&'tcx Place<'tcx>, HashSet<usize>>, entry_points: &HashSet<&'tcx Place<'tcx>>, cg_map: &FxHashMap<DefId, Rc<RefCell<ConstraintGraph<'tcx, T>>>>, vars_map: &mut FxHashMap<DefId, Vec<RefCell<VarNodes<'tcx, T>>>>, )
fn pos_update( &mut self, comp_use_map: &HashMap<&'tcx Place<'tcx>, HashSet<usize>>, entry_points: &HashSet<&'tcx Place<'tcx>>, cg_map: &FxHashMap<DefId, Rc<RefCell<ConstraintGraph<'tcx, T>>>>, vars_map: &mut FxHashMap<DefId, Vec<RefCell<VarNodes<'tcx, T>>>>, )
fn generate_active_vars( &mut self, component: &HashSet<&'tcx Place<'tcx>>, active_vars: &mut HashSet<&'tcx Place<'tcx>>, cg_map: &FxHashMap<DefId, Rc<RefCell<ConstraintGraph<'tcx, T>>>>, vars_map: &mut FxHashMap<DefId, Vec<RefCell<VarNodes<'tcx, T>>>>, )
fn generate_entry_points( &mut self, component: &HashSet<&'tcx Place<'tcx>>, entry_points: &mut HashSet<&'tcx Place<'tcx>>, cg_map: &FxHashMap<DefId, Rc<RefCell<ConstraintGraph<'tcx, T>>>>, vars_map: &mut FxHashMap<DefId, Vec<RefCell<VarNodes<'tcx, T>>>>, )
fn propagate_to_next_scc( &mut self, component: &HashSet<&'tcx Place<'tcx>>, cg_map: &FxHashMap<DefId, Rc<RefCell<ConstraintGraph<'tcx, T>>>>, vars_map: &mut FxHashMap<DefId, Vec<RefCell<VarNodes<'tcx, T>>>>, )
pub fn solve_const_func_call( &mut self, cg_map: &FxHashMap<DefId, Rc<RefCell<ConstraintGraph<'tcx, T>>>>, vars_map: &mut FxHashMap<DefId, Vec<RefCell<VarNodes<'tcx, T>>>>, )
pub fn store_vars(&mut self, varnodes_vec: &mut Vec<RefCell<VarNodes<'tcx, T>>>)
pub fn reset_vars(&mut self, varnodes_vec: &mut Vec<RefCell<VarNodes<'tcx, T>>>)
pub fn find_intervals( &mut self, cg_map: &FxHashMap<DefId, Rc<RefCell<ConstraintGraph<'tcx, T>>>>, vars_map: &mut FxHashMap<DefId, Vec<RefCell<VarNodes<'tcx, T>>>>, )
pub fn merge_return_places(&mut self)
pub fn add_control_dependence_edges(&mut self)
pub fn del_control_dependence_edges(&mut self)
pub fn build_nuutila(&mut self, single: bool)
pub fn visit( &mut self, place: &'tcx Place<'tcx>, stack: &mut Vec<&'tcx Place<'tcx>>, )
pub fn get_symbolicexpression( &self, place: &'tcx Place<'tcx>, ) -> Option<SymbolicExpr<'tcx>>
fn get_symbolic_expression_recursive( &self, place: &'tcx Place<'tcx>, memo: &mut HashMap<&'tcx Place<'tcx>, Option<SymbolicExpr<'tcx>>>, in_progress: &mut HashSet<&'tcx Place<'tcx>>, ) -> Option<SymbolicExpr<'tcx>>
fn op_kind_to_symbolic_expr( &self, op_kind: &BasicOpKind<'tcx, T>, memo: &mut HashMap<&'tcx Place<'tcx>, Option<SymbolicExpr<'tcx>>>, in_progress: &mut HashSet<&'tcx Place<'tcx>>, ) -> Option<SymbolicExpr<'tcx>>
pub fn start_analyze_path_constraints( &mut self, body: &'tcx Body<'tcx>, all_paths_indices: &[Vec<usize>], ) -> HashMap<Vec<usize>, Vec<(Place<'tcx>, Place<'tcx>, BinOp)>>
pub fn analyze_path_constraints( &self, body: &'tcx Body<'tcx>, all_paths_indices: &[Vec<usize>], ) -> HashMap<Vec<usize>, Vec<(Place<'tcx>, Place<'tcx>, BinOp)>>
Trait Implementations§
Source§impl<'tcx, T: Clone + IntervalArithmetic + ConstConvert + Debug> Clone for ConstraintGraph<'tcx, T>
impl<'tcx, T: Clone + IntervalArithmetic + ConstConvert + Debug> Clone for ConstraintGraph<'tcx, T>
Source§fn clone(&self) -> ConstraintGraph<'tcx, T>
fn clone(&self) -> ConstraintGraph<'tcx, T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'tcx, T: Debug + IntervalArithmetic + ConstConvert + Debug> Debug for ConstraintGraph<'tcx, T>
impl<'tcx, T: Debug + IntervalArithmetic + ConstConvert + Debug> Debug for ConstraintGraph<'tcx, T>
Auto Trait Implementations§
impl<'tcx, T> Freeze for ConstraintGraph<'tcx, T>
impl<'tcx, T> !RefUnwindSafe for ConstraintGraph<'tcx, T>
impl<'tcx, T> Send for ConstraintGraph<'tcx, T>where
T: Send,
impl<'tcx, T> Sync for ConstraintGraph<'tcx, T>where
T: Sync,
impl<'tcx, T> Unpin for ConstraintGraph<'tcx, T>where
T: Unpin,
impl<'tcx, T> !UnwindSafe for ConstraintGraph<'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