private function revert($level)
    {
        while (!$this->decisions->isEmpty()) {
            $literal = $this->decisions->lastLiteral();

            if ($this->decisions->undecided($literal)) {
                break;
            }

            $decisionLevel = $this->decisions->decisionLevel($literal);

            if ($decisionLevel <= $level) {
                break;
            }

            $this->decisions->revertLast();
            $this->propagateIndex = count($this->decisions);
        }

        while (!empty($this->branches) && $this->branches[count($this->branches) - 1][self::BRANCH_LEVEL] >= $level) {
            array_pop($this->branches);
        }
    }
private function revert($level)
    {
        while (!$this->decisions->isEmpty()) {
            $literal = $this->decisions->lastLiteral();

            if ($this->decisions->undecided($literal)) {
                break;
            }

            $decisionLevel = $this->decisions->decisionLevel($literal);

            if ($decisionLevel <= $level) {
                break;
            }

            $this->decisions->revertLast();
            $this->propagateIndex = count($this->decisions);
        }

        while (!empty($this->branches) && $this->branches[count($this->branches) - 1][self::BRANCH_LEVEL] >= $level) {
            array_pop($this->branches);
        }
    }
private function revert ( $ level ) { while ( ! $ this -> decisions -> isEmpty ( ) ) { $ literal = $ this -> decisions -> lastLiteral ( ) ; if ( $ this -> decisions -> undecided ( $ literal ) ) { break ; } $ decisionLevel = $ this -> decisions -> decisionLevel ( $ literal ) ; if ( $ decisionLevel <= $ level ) { break ; } $ this -> decisions -> revertLast ( ) ; $ this -> propagateIndex = count ( $ this -> decisions ) ; } while ( ! empty ( $ this -> branches ) && $ this -> branches [ count ( $ this -> branches ) - 1 ] [ self :: BRANCH_LEVEL ] >= $ level ) { array_pop ( $ this -> branches ) ; } }
Reverts a decision at the given level.

@param int $level
Reverts a decision at the given level .