1 package DX::Proposition;
3 use Types::Standard qw(HashRef ArrayRef Str);
6 has predicate => (is => 'ro', isa => Str, required => 1);
8 has args => (is => 'ro', isa => ArrayRef[Str|Value], required => 1);
10 has introduced_names => (is => 'ro', isa => HashRef[One], required => 1);
12 has required_names => (is => 'ro', isa => HashRef[One], required => 1);
17 [ symbol => $self->predicate ],
21 : [ symbol => $self->introduced_names->{$_} ? "?$_" : $_ ]
27 my ($self, $scope) = @_;
28 my $predicate = $scope->lookup_predicate($self->predicate);
29 my @args = map { ref($_) ? $_ : $scope->lookup($_) } @{$self->args};
30 #if (my $step = $scope->known_facts->resolution_step_for($predicate, @args)) {
33 return $predicate->resolution_step_for($self, @args);