private final void trackBack ( ) { logger . trace ( "No valid action available. Perform back tracking..." ) ; BacktrackLocation backtrackLocation = backtrackStack . peek ( ) ; streamPosition = backtrackLocation . getStreamPosition ( ) ; stepCounter = backtrackLocation . getStepCounter ( ) ; while ( actionStack . size ( ) > backtrackLocation . getActionStackSize ( ) ) { actionStack . remove ( actionStack . size ( ) - 1 ) ; } stateStack = backtrackLocation . getStateStack ( ) ; stepCounter -- ; }
This method perform the back tracking by popping all relevant information from the stacks .