Recognize both graphs before entailment
rdf/entailment/d.scm
165 | 165 | ||
166 | 166 | (define (entails? g e vocabulary) | |
167 | 167 | "Return true if g entails e" | |
168 | - | (let ((g (recognize g vocabulary))) | |
168 | + | (let ((g (recognize g vocabulary)) | |
169 | + | (e (recognize e vocabulary))) | |
169 | 170 | (or (not (consistent-graph? g vocabulary)) | |
170 | 171 | (let* ((constraints (fold (lambda (t constraints) | |
171 | 172 | (list 'and (generate-constraints t g) |
rdf/entailment/rdf.scm
192 | 192 | (define (entails? g e vocabulary) | |
193 | 193 | "Return true if g entails e" | |
194 | 194 | (let* ((g (recognize g vocabulary)) | |
195 | - | (g (augment g))) | |
195 | + | (g (augment g)) | |
196 | + | (e (recognize e vocabulary))) | |
196 | 197 | (or (not (consistent-graph? g vocabulary)) | |
197 | 198 | (d:entails? g e vocabulary)))) |
rdf/entailment/rdfs.scm
315 | 315 | (define (entails? g e vocabulary) | |
316 | 316 | "Return true if g entails e recognizing d" | |
317 | 317 | (let* ((g (recognize g vocabulary)) | |
318 | - | (g (augment g (rdf-vocabulary-datatypes vocabulary)))) | |
318 | + | (g (augment g (rdf-vocabulary-datatypes vocabulary))) | |
319 | + | (e (recognize e vocabulary))) | |
319 | 320 | (or (not (consistent-graph? g vocabulary)) | |
320 | 321 | (d:entails? g e vocabulary)))) |