package DX::Proposition;

use DX::Class;

has predicate => (is => 'ro', required => 1);

has args => (is => 'ro', required => 1);

sub resolve_for {
  my ($self, $scope) = @_;
  my $predicate = $scope->lookup_predicate($self->predicate);
  my @args = map { ref($_) ? $_ : $scope->lookup($_) } @{$self->args};
  #if (my $step = $scope->known_facts->resolution_step_for($predicate, @args)) {
  #  return $step;
  #}
  return $predicate->resolution_step_for(@args);
}

1;
