% This LaTeX document was generated using the LaTeX backend of PlDoc, % The SWI-Prolog documentation system \section{library(semweb/rdf_compare): Compare RDF graphs} \label{sec:rdfcompare} This library provides predicates that compare RDF graphs. The current version only provides one predicate: \predref{rdf_equal_graphs}{3} verifies that two graphs are identical after proper labeling of the blank nodes. Future versions of this library may contain more advanced operations, such as diffing two graphs.\vspace{0.7cm} \begin{description} \predicate[semidet]{rdf_equal_graphs}{3}{+GraphA, +GraphB, -Substition} True if \arg{GraphA} and \arg{GraphB} are the same under \arg{Substition}. \arg{Substition} is a list of BNodeA = BNodeB, where BNodeA is a blank node that appears in \arg{GraphA} and BNodeB is a blank node that appears in \arg{GraphB}. \begin{arguments} \arg{GraphA} & is a list of \verb$rdf(S,P,O)$ terms \\ \arg{GraphB} & is a list of \verb$rdf(S,P,O)$ terms \\ \arg{Substition} & is a list if NodeA = NodeB terms. \\ \end{arguments} \begin{tags} \tag{To be done} The current implementation is rather naive. After dealing with the subgraphs that contain no bnodes, it performs a fully non-deterministic substitution. \end{tags} \end{description}