1 package DX::Step::EnterRecheck;
3 use DX::Step::CompleteRecheck;
9 has proposition_list => (is => 'ro', required => 1);
11 has on_completion_step => (is => 'ro', required => 1);
14 my ($self, $old_ss) = @_;
16 my ($prop, @rest) = @{$self->proposition_list};
18 my $old_hyp = $old_ss->current_hypothesis;
20 # we should probably be doing something about pruning the scope
21 # but that's completely pointless until we have rules (and also,
22 # the lock_to_depth arg needs to come from the proposition somehow)
24 my $ap = DX::ActionPolicy::LockScope->new(
25 lock_to_depth => $old_hyp->scope->depth,
26 next_policy => $old_hyp->action_policy,
29 my $hyp = ref($old_hyp)->new(
30 scope => $old_hyp->scope,
31 resolved_propositions => DX::ResolvedPropositionSet->new_empty,
33 action_applications => [],
37 my $pseq = DX::PropositionSequence->new(
43 my $next_step = (@rest
44 ? $self->but(proposition_list => \@rest)
45 : $self->on_completion_step);
47 trace 'step.recheck.hyp' => $hyp;
49 my $ss = DX::SearchState->new(
50 current_hypothesis => $hyp,
52 propositions => $pseq,
53 next_step => DX::Step::ConsiderProposition->new(
56 is_solution_state => 0,
57 on_exhaustion_step => undef,
58 on_solution_step => DX::Step::CompleteRecheck->new(
59 resume_search_state => $old_ss->but(next_step => $next_step),
60 was_recheck_for => $prop,