manual search process assembly in recheck
Matt S Trout [Sun, 10 Jul 2016 04:57:08 +0000 (04:57 +0000)]
lib/DX/Step/ResolveProposition.pm

index e18a47e..3728a63 100644 (file)
@@ -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;