(self, variable, location=None, simplified_graph=True)
return defs
Find all definitions of the given variable.

        :param SimVariable variable:
        :param bool simplified_graph: True if you just want to search in the simplified graph instead of the normal
                                      graph. Usually the simplified graph suffices for finding definitions of register
                                      or memory variables.
        :return: A collection of all variable definitions to the specific variable.
        :rtype: list
Find all definitions of the given variable.
Find all definitions of the given variable .
def find_definitions(self, variable, location=None, simplified_graph=True):
        """
        Find all definitions of the given variable.

        :param SimVariable variable:
        :param bool simplified_graph: True if you just want to search in the simplified graph instead of the normal
                                      graph. Usually the simplified graph suffices for finding definitions of register
                                      or memory variables.
        :return: A collection of all variable definitions to the specific variable.
        :rtype: list
        """

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

        defs = []

        for n in graph.nodes():  # type: ProgramVariable
            if n.variable == variable:
                if location is None:
                    defs.append(n)
                else:
                    # TODO: finish this part
                    if n.location.block_addr == location.block_addr:
                        defs.append(n)

        return defs
def find_definitions ( self , variable , location = None , simplified_graph = True ) : if simplified_graph : graph = self . simplified_data_graph else : graph = self . data_graph defs = [ ] for n in graph . nodes ( ) : # type: ProgramVariable if n . variable == variable : if location is None : defs . append ( n ) else : # TODO: finish this part if n . location . block_addr == location . block_addr : defs . append ( n ) return defs