You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2019/12/03 14:51:00 UTC
[jira] [Commented] (JENA-1789) IsoMatcher can return "true" for
non-isomorphic patterns.
[ https://issues.apache.org/jira/browse/JENA-1789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16986969#comment-16986969 ]
ASF subversion and git services commented on JENA-1789:
-------------------------------------------------------
Commit dc5a751511680f4abd2835d07d2b96e2da03f08b in jena's branch refs/heads/master from Andy Seaborne
[ https://gitbox.apache.org/repos/asf?p=jena.git;h=dc5a751 ]
Merge pull request #642 from afs/iso
JENA-1789: Isomorphism fix and refactor
> IsoMatcher can return "true" for non-isomorphic patterns.
> ---------------------------------------------------------
>
> Key: JENA-1789
> URL: https://issues.apache.org/jira/browse/JENA-1789
> Project: Apache Jena
> Issue Type: Bug
> Affects Versions: Jena 3.13.1
> Reporter: Andy Seaborne
> Assignee: Andy Seaborne
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> This should be false but it returns true:
> {noformat}
> 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);
> }
> {noformat}
> BNodeIsoWithVar has the lines:
> {noformat}
> if ( n1.isVariable() && n2.isVariable() )
> return mapping.makeIsomorphic(n1, n2) ;
> {noformat}
> added.
> The bnode for variables case also fails.
> {noformat}
> graph1 = SSE.parseGraph("(graph (<_:a> :p1 <_:b>) (<_:b> :p2 <_:a>))");
> graph2 = SSE.parseGraph("(graph (<_:a> :p1 <_:b>) (<_:a> :p2 <_:b>))");
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)