has alternatives => (is => 'ro', isa => AlternativeList, required => 1);
+has is_solution_state => (is => 'ro', required => 1);
+
sub next_proposition {
my ($self, $hyp) = @_;
$hyp ||= $self->current_hypothesis;
$class->new(
current_hypothesis => $hyp,
alternatives => [],
- next_step => DX::Step::InvokeNextPredicate->new(
- proposition => $props->members->[0],
- ),
propositions => $props,
+ (@{$props->members}
+ ? (
+ next_step => DX::Step::InvokeNextPredicate->new(
+ proposition => $props->members->[0],
+ ),
+ is_solution_state => 0,
+ )
+ : ( is_solution_state => 1 )
+ ),
);
}