(self, **kwargs)
Empties the stack by processing every node in it.

        Processing is performed in two steps.
        1- A node is expanded and all its children are push to the stack
        2- Once all children have been processed, the result for the node
           is computed and memoized.
Empties the stack by processing every node in it.
Empties the stack by processing every node in it .
def _process_stack(self, **kwargs):
        """Empties the stack by processing every node in it.

        Processing is performed in two steps.
        1- A node is expanded and all its children are push to the stack
        2- Once all children have been processed, the result for the node
           is computed and memoized.
        """

        while self.stack:
            (was_expanded, formula) = self.stack.pop()
            if was_expanded:
                self._compute_node_result(formula, **kwargs)
            else:
                self._push_with_children_to_stack(formula, **kwargs)
def _process_stack ( self , * * kwargs ) : while self . stack : ( was_expanded , formula ) = self . stack . pop ( ) if was_expanded : self . _compute_node_result ( formula , * * kwargs ) else : self . _push_with_children_to_stack ( formula , * * kwargs )