Fix named graph constraints

Julien LepillerFri Apr 10 02:29:38+0200 2020

a336e68

Fix named graph constraints

rdf/rdf.scm

511511
        (g2 (rdf-dataset-default-graph d2))
512512
        (ng1 (rdf-dataset-named-graphs d1))
513513
        (ng2 (rdf-dataset-named-graphs d2)))
514-
    (list 'and (pk 'simpl (simplify-constraints (pk 'default (generate-graph-constraints g1 g2))))
514+
    (list 'and (simplify-constraints (generate-graph-constraints g1 g2))
515515
          (if (null? ng1)
516516
              'none
517517
              (fold (lambda (ng1 constraints)

523523
                             (fold (lambda (ng2 constraints)
524524
                                     (list 'or (list 'and (list 'equiv n1 (car ng2))
525525
                                                     (simplify-constraints
526-
                                                       (generate-graph-constraints g1 g2)))
526+
                                                       (generate-graph-constraints
527+
                                                         g1 (cdr ng2))))
527528
                                           constraints))
528529
                                   'bot
529530
                                   (filter (lambda (g2) (blank-node? (car g2))) ng2))

557558
  "Compare two datasets and return whether they are isomorphic."
558559
  (let* ((constraints (generate-dataset-constraints d1 d2))
559560
         (disjunctions (to-disjunctions constraints)))
560-
    (pk 'dis disjunctions)
561561
    (if (list? disjunctions)
562562
        (let loop ((disjunctions (filter sat? disjunctions)))
563563
          (match disjunctions