'Map our current slice to CFG.
Based on self._statements_per_run and self._exit_statements_per_run, this method will traverse the CFG and
check if there is any missing block on the path. If there is, the default exit of that missing block will be
included in the slice. This is because Slicecutor cannot skip individual basic blocks along a path.'

def _map_to_cfg(self):

    exit_statements_per_run = self.chosen_exits
    new_exit_statements_per_run = defaultdict(list)
    while len(exit_statements_per_run):
        for (block_address, exits) in exit_statements_per_run.iteritems():
            for (stmt_idx, exit_target) in exits:
                if (exit_target not in self.chosen_exits):
                    tpl = ('default', None)
                    if (tpl not in new_exit_statements_per_run[exit_target]):
                        new_exit_statements_per_run[exit_target].append(tpl)
        for (block_address, exits) in new_exit_statements_per_run.iteritems():
            for ex in exits:
                if (ex not in self.chosen_exits[block_address]):
                    self.chosen_exits[block_address].append(ex)
        exit_statements_per_run = new_exit_statements_per_run
        new_exit_statements_per_run = defaultdict(list)
