add qlist debug predicate, actually add propositions to the query state
[scpubgit/DX.git] / lib / DX / Proposition.pm
CommitLineData
9d759b64 1package DX::Proposition;
2
3use DX::Class;
4
5has predicate => (is => 'ro', required => 1);
6
7has args => (is => 'ro', required => 1);
8
d1b6cb33 9has introduces_names => (is => 'ro', required => 1);
10
11has requires_names => (is => 'ro', required => 1);
12
9d759b64 13sub resolve_for {
14 my ($self, $scope) = @_;
15 my $predicate = $scope->lookup_predicate($self->predicate);
16 my @args = map { ref($_) ? $_ : $scope->lookup($_) } @{$self->args};
efad53c4 17 #if (my $step = $scope->known_facts->resolution_step_for($predicate, @args)) {
18 # return $step;
19 #}
9d759b64 20 return $predicate->resolution_step_for(@args);
21}
22
231;