(self, var_def, simplified_graph=True)
return consumers
Find all consumers to the specified variable definition.

        :param ProgramVariable var_def: The variable definition.
        :param bool simplified_graph: True if we want to search in the simplified graph, False otherwise.
        :return: A collection of all consumers to the specified variable definition.
        :rtype: list
Find all consumers to the specified variable definition.
Find all consumers to the specified variable definition .
def find_consumers(self, var_def, simplified_graph=True):
        """
        Find all consumers to the specified variable definition.

        :param ProgramVariable var_def: The variable definition.
        :param bool simplified_graph: True if we want to search in the simplified graph, False otherwise.
        :return: A collection of all consumers to the specified variable definition.
        :rtype: list
        """

        if simplified_graph:
            graph = self.simplified_data_graph
        else:
            graph = self.data_graph

        if var_def not in graph:
            return []

        consumers = []
        srcs = [var_def]
        traversed = set()

        while srcs:
            src = srcs.pop()
            out_edges = graph.out_edges(src, data=True)
            for _, dst, data in out_edges:
                if 'type' in data and data['type'] == 'kill':
                    # skip killing edges
                    continue
                if isinstance(dst.variable, SimTemporaryVariable):
                    if dst not in traversed:
                        srcs.append(dst)
                        traversed.add(dst)
                else:
                    if dst not in consumers:
                        consumers.append(dst)

        return consumers
def find_consumers ( self , var_def , simplified_graph = True ) : if simplified_graph : graph = self . simplified_data_graph else : graph = self . data_graph if var_def not in graph : return [ ] consumers = [ ] srcs = [ var_def ] traversed = set ( ) while srcs : src = srcs . pop ( ) out_edges = graph . out_edges ( src , data = True ) for _ , dst , data in out_edges : if 'type' in data and data [ 'type' ] == 'kill' : # skip killing edges continue if isinstance ( dst . variable , SimTemporaryVariable ) : if dst not in traversed : srcs . append ( dst ) traversed . add ( dst ) else : if dst not in consumers : consumers . append ( dst ) return consumers