has resolution_space => (is => 'ro', isa => ResolutionSpace);
-sub resolves { shift->resolution_space->proposition }
-
-sub current_resolution { shift->resolution_space->next_resolution }
-
-sub actions { shift->current_resolution->actions }
-
-sub depends_on { shift->current_resolution->veracity_depends_on }
-
sub but_first {
my ($self, @actions) = @_;
$self->but(actions => [ @actions, @{$self->actions} ]);
sub apply_to {
my ($self, $old_ss) = @_;
+ my $rspace = $self->resolution_space;
+ my $prop = $rspace->proposition;
+ my $res = $rspace->next_resolution;
+ my $vdeps = $res->veracity_depends_on;
trace resolve => [ statement => [
[ symbol => 'resolve' ],
[ block => [
[ statement => [
[ symbol => 'proposition' ],
- @{$self->resolves->for_deparse->[1]},
+ @{$prop->for_deparse->[1]},
] ],
- (@{$self->actions}
+ (@{$res->actions}
? [ statement => [
[ symbol => 'actions' ],
- [ block => $self->actions ],
+ [ block => $res->actions ],
] ]
: ()),
[ statement => [
map [ statement => [
[ symbol => (split '::', ${$_->[0]})[-1] ],
[ value_path => [ @{$_}[1..$#$_] ] ]
- ] ], @{$self->depends_on}
+ ] ], @{$vdeps}
] ],
] ],
] ]
] ];
- my $rspace = $self->resolution_space;
my $ss = $old_ss->but(
next_step => DX::Step::CompleteResolution->new(
original_search_state => $old_ss,
);
my $old_hyp = $old_ss->current_hypothesis;
(my $hyp, my @recheck) = $old_hyp->with_resolution(
- $self->resolves, $self->depends_on, $self->actions
+ $prop, $vdeps, $res->actions
);
return $ss->but(next_step => DX::Step::Backtrack->new) unless $hyp;
return $ss->but(current_hypothesis => $hyp) unless @recheck;