my ($self, $prop) = @_;
my $prop_seq = $self->proposition_sequence
->but_append_proposition($prop);
+ my $sol_ss = $self->new_search_state_for($prop_seq)
+ ->find_solution;
+ die "No solution" unless $sol_ss;
$self->but(
proposition_sequence => $prop_seq,
- search_state => $self->new_search_state_for($prop_seq)
+ search_state => $sol_ss,
);
}
introduces_names => $intro,
requires_names => $need,
);
- my $qstate = $self->shell_state->current_query_state;
- $qstate = $qstate->with_additional_proposition($prop);
+ my $old_qstate = $self->shell_state->current_query_state;
+ my $qstate = $old_qstate->with_additional_proposition($prop);
+ my $old_action_count = @{
+ $old_qstate->search_state->current_hypothesis->actions
+ };
+ my @actions = @{$qstate->search_state->current_hypothesis->actions};
+ push our @Result,
+ map [ output => $_ ], @actions[$old_action_count..$#actions];
$self->_set_shell_state(
$self->shell_state->but(
current_query_state => $qstate