);
}
-sub find_solution {
- my $state = $_[0];
- while ($state and $state->next_proposition) {
- $state = $state->with_one_step;
- }
- trace 'search.solution.hyp' => $state->current_hypothesis if $state;
- return $state;
-}
-
sub force_backtrack {
my ($self) = @_;
my ($first_alt, @rest_alt) = @{$self->alternatives};
);
}
-sub find_next_solution {
- my ($self) = @_;
- return undef unless my $bt = $self->force_backtrack;
- return $bt->find_solution;
-}
-
1;