aml:hasAttribute aml:belt3 aml:hasName “Belt”^^ xsd:string aml:hasId “45e20f8e”^^ xsd:string aml:motor3 aml:hasAttribute aml:refSemanticBelt3 aml:hasRefSemantic “ECLASS:Belt..”^^ xsd:string aml:refSemanticValue aml:refSemanticMotor3 aml:hasRefSemantic aml:refSemanticDrive2 aml:hasRefSemantic “ECLASS:Drive..”^^ xsd:string aml:refSemanticValue aml:roller3 aml:hasAttribute aml:hasAttribute aml:refSemanticRoller3 aml:hasRefSemantic “ECLASS:Roller”^^ xsd:string aml:refSemanticValue “ECLASS:Motor”^^ xsd:string aml:refSemanticValue
(a) Ideal RDF graph
aml:refSemantic Roller1 aml:refSemantic Roller2 aml:refSemantic Roller2 aml:refSemantic Belt1 aml:refSemantic Belt2 aml:refSemantic Belt3 aml:refSemantic Motor1 aml:refSemantic
Motor2 aml:refSemanticMotor3
aml:motor1 aml:motor2 aml:motor3
aml:roller1 aml:roller2 aml:roller3
aml:belt1 aml:belt2 aml:belt3
(b) Homomorphism σ
Figure 6.7: Ideal conflict-free CPS knowledge graph. (a) An RDF graph where there is only one RDF resource for entities presenting semantic interoperability conflicts in the mechanical and electrical perspectives in Figure6.2. (b) A homomorphism σ maps entities presenting semantic interoperability conflicts into the RDF graph in Figure 6.6to the same resource in the ideal RDF graph.
Example 3 Given CPS knowledge graphs G1 and G ∗
from Example1 and Example 2, and the homomorphism σ in Figure 6.7(b). The set of conflicts(G1 | G∗, σ) corresponds to the set of pairs of RDF resources in the RDF graph in Figure 6.6 that σ maps to the same resource in the ideal RDF graph (cf. Figure 6.7(a)).
Given a CPS knowledge graph G = hI, V, L, Gi, the CPS Conflicts Identification problem determines if a pair (Ek, El) of CPS entities in I comprise semantic interoperability conflicts.
Definition 4 Consider a CPS knowledge graph G = hI, V, L, Gi, an ideal conflict-free CPS knowledge graph G∗ = hI∗, V, L, G∗i, and a homomorphism σ : I → I∗. The CPS Conflicts
Identification problem corresponds to the problem of deciding if (Ek, El) ∈ I × I belongs to conflicts(G | G∗, σ).
Definition 5 Consider a CPS knowledge graph G = hI, V, L, Gi and a set SC(G) of pairs of CPS entities comprising semantic interoperability conflicts in G. The problem of CPS Conflict
Resolution corresponds to the problem of creating a CPS knowledge graph G0 = hI0, V, L, G0i and
a homomorphism σ0 : I → I0, such that:
• For each (Ei, Ej) in SC(G), there is a CPS entity Em in I0 such that σ0(Ei) = σ0(Ej) =
Em.
• G0 = {(σ0(s), p, σ0(o)) | (s, p, o) ∈ G}.
G0 represents the CPS knowledge graph where pairs of CPS entities in SC(G) are represented as one RDF CPS entity.
6.3 A Deductive Database Approach
In this section, we outline an approach based on Deductive Databases. The presented approach aims at solving the problems of CPS Conflicts Identification and CPS Conflicts Resolution. Further, we present Alligator, which implements the proposed approach by relying on
Chapter 6 Integrating Cyber-Physical Systems into Knowledge Graphs
Deductive Databases. Alligator employs Deductive Databases and the AML ontology for representing CPS documents, as well as for detecting semantic heterogeneity conflicts whenever CPS perspectives need to be integrated.
The solution of the CPS Conflicts Identification and CPS Conflicts Resolution problems require the existence of the ideal conflict-free CPS document G∗ and the homomorphism σ. However, in practice, neither G∗ and σ are known, and Alligator computes an approximation of the problem. We use SC(G) to refer to the set of pairs (Ek, El) that correspond to the solutions of this problem. Once a set SC(G) of CPS entities presenting semantic interoperability conflicts in G is identified as the solution of the CPS Conflicts Identification problem, the problem of
CPS Conflicts Resolution corresponds to the problem of creating a CPS knowledge graph where
semantic interoperability conflicts in SC(G) are solved.
The documents that correspond to the different perspectives of the same CPS are the input for the creation of the knowledge graph G. G formally represents the union of these documents. Additionally, a set of Datalog extensional facts (EDB) representing the entities in the RDF document G is created. With the purpose of exploiting the knowledge encoded in such a knowledge graph, a set of Datalog intentional rules (IDB) is developed. These rules describe existing semantic interoperability conflicts that can occur among CPS documents. The goal of these rules is to compute the set SC(G) from the Datalog representation of G. SC(G) is computed as the least minimal fixpoint of the Datalog rules in IDB and the facts in EDB [224].
Alligator Rule-based representation of Interoperability Conflicts One of the key innovations of Alligator revolves on the use of a Datalog-rule approach to effectively resolve semantic heterogeneity conflicts between CPS documents. For this purpose, we have developed a set of rules covering the main characteristics of a standard commonly used for describing CPS, i.e., AML. It is important to remark that the rules have been defined taking into account the object and datatype properties of the AML ontology.
With respect to AML attributes, there are cases in which they share the same id and name but are not semantically equivalent. On the contrary, even if two attributes are defined with different names, e.g., Length and StrictLength, they can still be semantically equivalent whenever they refer to the same eCl@ss identification value, i.e., eCl@ss IRDI. In detail, the AML entity
refSemanticrefers to the eCl@ss IRDI by means of CorrespondingAttributePath(cf. Figure6.5
line 5).2 In order to identify and resolve this semantic heterogeneity conflict, the rules presented in Listing 6.1and in Listing 6.2are defined.
sameRefSemantic(T,Z)∧ hasRefSemantic(X,T) ∧ hasRefSemantic(Y,Z) ⇒ sameAttribute(X,Y)
Listing 6.1: Semantic equivalence of two AML attributes
hasCorrespondingAttributePath(X,Z) ∧ hasCorrespondingAttributePath(Y,Z) ⇒sameRefSemantic(X,Y)
Listing 6.2: Semantic equivalence of two semantic references
To determine that two entities of type Role Classes are semantically equivalent according to their reference to eCl@ss, they have to contain the same version, classification and IRDI. To represent these three conditions, the rule described in Listing6.3 is built.
2
The AML CorrespondingAttributePath is shortened to AttributePath in Figure6.5for space reasons.