mate_query.cpg.query.cfg_avoiding module

mate_query.cpg.query.cfg_avoiding.control_flow_avoiding(cpg: CPG, start_cte: CTE, avoid_map_cte: CTE, stop_map_cte: CTE, stack_bound: Optional[int] = None, limit: Optional[int] = None) Iterable[Tuple[Optional[str], Instruction, str, Instruction, str]]

Finds pairs of instruction/contexts from start_cte and stop_map_cte that are reachable in the control-flow graph without passing through the designated nodes in avoid_map_cte.

start_cte must be a CTE with columns info, start_uuid and start_context. avoid_map_cte must be a CTE with columns info, start_uuid, start_context, avoid_uuid, and avoid_context. stop_map_cte must be a CTE with columns info, start_uuid, start_context, stop_uuid, and stop_context.

Parameters
  • cpg (CPG) –

  • start_cte (CTE) –

  • avoid_map_cte (CTE) –

  • stop_map_cte (CTE) –

  • stack_bound (Optional[int]) –

  • limit (Optional[int]) –

Return type

Iterable[Tuple[Optional[str], Instruction, str, Instruction, str]]