1 package DX::SearchProcess;
6 has current_search_state => (
7 is => 'ro', isa => SearchState, required => 1,
9 current_hypothesis next_step propositions adjustments_made
14 my ($class, $hyp, $props) = @_;
16 current_search_state => DX::SearchState->new_for($hyp, $props),
22 my $new_ss = $self->current_search_state->with_one_step;
23 return undef unless $new_ss;
24 return $self->but(current_search_state => $new_ss);
29 my $state = $self->current_search_state;
30 while ($state and (not $state->is_solution_state)) {
31 $state = $state->with_one_step;
33 return undef unless $state;
34 return $self->but(current_search_state => $state);
39 my $new_ss = $self->current_search_state->force_backtrack;
40 return undef unless $new_ss;
41 return $self->but(current_search_state => $new_ss);
44 sub find_next_solution {
46 return undef unless my $bt = $self->force_backtrack;
47 return $bt->find_solution;