angr/state_plugins/history.py
def closest_common_ancestor(self, other):
        """
        Find the common ancestor between this history node and 'other'.

        :param other:    the PathHistory to find a common ancestor with.
        :return:        the common ancestor SimStateHistory, or None if there isn't one
        """
        our_history_iter = reversed(HistoryIter(self))
        their_history_iter = reversed(HistoryIter(other))
        sofar = set()

        while True:
            our_done = False
            their_done = False

            try:
                our_next = next(our_history_iter)
                if our_next in sofar:
                    # we found it!
                    return our_next
                sofar.add(our_next)
            except StopIteration:
                # we ran out of items during iteration
                our_done = True

            try:
                their_next = next(their_history_iter)
                if their_next in sofar:
                    # we found it!
                    return their_next
                sofar.add(their_next)
            except StopIteration:
                # we ran out of items during iteration
                their_done = True

            # if we ran out of both lists, there's no common ancestor
            if our_done and their_done:
                return None

        Find the common ancestor between this history node and 'other'.

        :param other:    the PathHistory to find a common ancestor with.
        :return:        the common ancestor SimStateHistory, or None if there isn't one
        
Find the common ancestor between this history node and 'other'.
Find the common ancestor between this history node and ' other ' .
def closest_common_ancestor(self, other):
        our_history_iter = reversed(HistoryIter(self))
        their_history_iter = reversed(HistoryIter(other))
        sofar = set()
        while True:
            our_done = False
            their_done = False
            try:
                our_next = next(our_history_iter)
                if our_next in sofar:
                    return our_next
                sofar.add(our_next)
            except StopIteration:
                our_done = True
            try:
                their_next = next(their_history_iter)
                if their_next in sofar:
                    return their_next
                sofar.add(their_next)
            except StopIteration:
                their_done = True
            if our_done and their_done:
                return None
def closest_common_ancestor ( self , other ) : our_history_iter = reversed ( HistoryIter ( self ) ) their_history_iter = reversed ( HistoryIter ( other ) ) sofar = set ( ) while True : our_done = False their_done = False try : our_next = next ( our_history_iter ) if our_next in sofar : return our_next sofar . add ( our_next ) except StopIteration : our_done = True try : their_next = next ( their_history_iter ) if their_next in sofar : return their_next sofar . add ( their_next ) except StopIteration : their_done = True if our_done and their_done : return None
Find the common ancestor between this history node and 'other'.
Find the common ancestor between this history node and ' other ' .
"""
        Find the common ancestor between this history node and 'other'.

        :param other:    the PathHistory to find a common ancestor with.
        :return:        the common ancestor SimStateHistory, or None if there isn't one
        """ # we found it! # we ran out of items during iteration # we found it! # we ran out of items during iteration # if we ran out of both lists, there's no common ancestor
the common ancestor SimStateHistory, or None if there isn't one
the common ancestor SimStateHistory or None if there isn ' t one
self
other
the PathHistory to find a common ancestor with.
the PathHistory to find a common ancestor with .