Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-1789

IsoMatcher can return "true" for non-isomorphic patterns.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Jena 3.13.1
    • Jena 3.14.0
    • None
    • None

    Description

      This should be false but it returns true:

          public static void main(String[] args) {
              Graph graph1 = SSE.parseGraph("(graph (?A :p1 ?B) (?B :p2 ?A))");
              Graph graph2 = SSE.parseGraph("(graph (?A :p1 ?B) (?A :p2 ?B))");
              IsoMatcher match = new IsoMatcher(tuplesTriples(graph1.find()), tuplesTriples(graph2.find()),
                                                new BNodeIsoWithVar(NodeUtils.sameValue));
              boolean b = match.match();
              System.out.println();
              System.out.println("IsoMatcher: "+b);
          }
      

      BNodeIsoWithVar has the lines:

                  if ( n1.isVariable() && n2.isVariable() )
                      return mapping.makeIsomorphic(n1, n2) ;
      

      added.

      The bnode for variables case also fails.

              graph1 = SSE.parseGraph("(graph (<_:a> :p1 <_:b>) (<_:b> :p2 <_:a>))");
              graph2 = SSE.parseGraph("(graph (<_:a> :p1 <_:b>) (<_:a> :p2 <_:b>))");
      

      Attachments

        Issue Links

          Activity

            People

              andy Andy Seaborne
              andy Andy Seaborne
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m