From: Matt S Trout Date: Sun, 10 Jul 2016 04:57:08 +0000 (+0000) Subject: manual search process assembly in recheck X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=310662b5561b21ba1ec8c9857672f866342a9845;p=scpubgit%2FDX.git manual search process assembly in recheck --- diff --git a/lib/DX/Step/ResolveProposition.pm b/lib/DX/Step/ResolveProposition.pm index e18a47e..3728a63 100644 --- a/lib/DX/Step/ResolveProposition.pm +++ b/lib/DX/Step/ResolveProposition.pm @@ -100,16 +100,30 @@ sub _recheck_one { trace 'step.recheck.hyp' => $hyp; - my $ss = DX::SearchProcess->new_for($hyp, $pseq); + my $ss = DX::SearchState->new( + current_hypothesis => $hyp, + alternatives => [], + propositions => $pseq, + next_step => DX::Step::ConsiderProposition->new( + proposition => $prop, + ), + is_solution_state => 0, + on_exhaustion_step => undef, + on_solution_step => DX::Step::MarkAsSolution->new, + ); + + my $sp = DX::SearchProcess->new( + current_search_state => $ss, + ); - my $sol_ss = $ss->find_solution; + my $sol_sp = $sp->find_solution; - unless ($sol_ss) { + unless ($sol_sp) { trace 'step.recheck.fail' => 'argh'; return undef; } - my $sol_rps = $sol_ss->current_hypothesis->resolved_propositions; + my $sol_rps = $sol_sp->current_hypothesis->resolved_propositions; my $rps = $old_hyp->resolved_propositions;