sub _fmt_searchstate {
my ($self, $ss, $meta) = @_;
$self->_fmt_object([
- [ alternatives => '{...}' ],
+ [ adjustments_made => '{...}' ],
[ current_hypothesis => $ss->current_hypothesis ],
], $meta);
}
has current_search_state => (
is => 'ro', isa => SearchState, required => 1,
handles => [ qw(
- current_hypothesis next_step propositions alternatives
+ current_hypothesis next_step propositions adjustments_made
) ],
);
has propositions => (is => 'ro', isa => PropositionSequence, required => 1);
-has alternatives => (is => 'ro', isa => AlternativeList, required => 1);
+has adjustments_made => (is => 'ro', isa => AdjustmentList, required => 1);
has is_solution_state => (is => 'ro', required => 1);
my ($class, $hyp, $props) = @_;
$class->new(
current_hypothesis => $hyp,
- alternatives => [],
+ adjustments_made => [],
propositions => $props,
(@{$props->members}
? (
sub force_backtrack {
my ($self) = @_;
- my ($first_alt, @rest_alt) = @{$self->alternatives};
+ my ($first_alt, @rest_alt) = @{$self->adjustments_made};
return undef unless $first_alt;
return $self->but(
next_step => DX::Step::Backtrack->new,
sub apply_to {
my ($self, $ss) = @_;
- my ($first_alt, @rest_alt) = @{$ss->alternatives};
+ my ($first_alt, @rest_alt) = @{$ss->adjustments_made};
return $ss->but(next_step => $ss->on_exhaustion_step) unless $first_alt;
return $ss->but(
current_hypothesis => $first_alt->[1],
- alternatives => \@rest_alt,
+ adjustments_made => \@rest_alt,
next_step => $first_alt->[0]->alternative_step,
is_solution_state => 0,
);
my $ss = DX::SearchState->new(
current_hypothesis => $hyp,
- alternatives => [],
+ adjustments_made => [],
propositions => $pseq,
next_step => DX::Step::ConsiderProposition->new(
proposition => $prop,
my $ss = $old_ss->but(
next_step => $ns,
($alt_step
- ? (alternatives => [
+ ? (adjustments_made => [
[ $self, $old_ss->current_hypothesis ],
- @{$old_ss->alternatives}
+ @{$old_ss->adjustments_made}
])
: ()
),
class_type DictValue => { class => 'DX::Value::Dict' };
-declare AlternativeList => as ArrayRef[Tuple[Step, Hypothesis]];
+declare AdjustmentList => as ArrayRef[Tuple[Step, Hypothesis]];
declare DependencyType => where {
foreach my $cand (EXISTENCE_OF, TYPE_OF, INDICES_OF, CONTENTS_OF) {