(self)
Pre-process the acyclic CFG.
        - Change all FakeRet edges to normal edges when necessary (e.g. the normal/expected return edge does not exist)
Pre-process the acyclic CFG.
        - Change all FakeRet edges to normal edges when necessary (e.g. the normal/expected return edge does not exist)
Pre - process the acyclic CFG . - Change all FakeRet edges to normal edges when necessary ( e . g . the normal / expected return edge does not exist )
def _pre_process_cfg(self):
        """
        Pre-process the acyclic CFG.
        - Change all FakeRet edges to normal edges when necessary (e.g. the normal/expected return edge does not exist)
        """
        for _, dst, data in self._acyclic_cfg.graph.edges(data=True):
            if 'jumpkind' in data and data['jumpkind'] == 'Ijk_FakeRet':
                all_edges_to_dst = self._acyclic_cfg.graph.in_edges([ dst ], data=True)
                if not any((s, d) for s, d, da in all_edges_to_dst if da['jumpkind'] != 'Ijk_FakeRet' ):
                    # All in edges are FakeRets
                    # Change them to a normal edge
                    for _, _, data_ in all_edges_to_dst:
                        data_['jumpkind'] = 'Ijk_Boring'
def _pre_process_cfg ( self ) : for _ , dst , data in self . _acyclic_cfg . graph . edges ( data = True ) : if 'jumpkind' in data and data [ 'jumpkind' ] == 'Ijk_FakeRet' : all_edges_to_dst = self . _acyclic_cfg . graph . in_edges ( [ dst ] , data = True ) if not any ( ( s , d ) for s , d , da in all_edges_to_dst if da [ 'jumpkind' ] != 'Ijk_FakeRet' ) : # All in edges are FakeRets # Change them to a normal edge for _ , _ , data_ in all_edges_to_dst : data_ [ 'jumpkind' ] = 'Ijk_Boring'