SPARQL Update under RDFS Entailment in Fully Materialized and Redundancy-Free Triple Stores

Similar documents
Updating RDFS ABoxes and TBoxes in SPARQL

SPARQL Update for Materialised Triple Stores under DL-Lite RDFS Entailment

Towards SPARQL instance-level Update in the Presence of OWL-DL TBoxes

Coloring RDF Triples to Capture Provenance

Coloring RDF Triples to Capture Provenance

Non-homogeneous Generalization in Privacy Preserving Data Publishing

Capturing Provenance of RDF Triples through Colors

COMP718: Ontologies and Knowledge Bases

On the Hardness of Counting the Solutions of SPARQL Queries

Towards Equivalences for Federated SPARQL Queries

Online Appendix to: Generalizing Database Forensics

Mastro Studio: a system for Ontology-Based Data Management

Variable Independence and Resolution Paths for Quantified Boolean Formulas

CS 106 Winter 2016 Craig S. Kaplan. Module 01 Processing Recap. Topics

Coupling the User Interfaces of a Multiuser Program

Supervised tracking and correction of inconsistencies in RDF data

On the Role of Multiply Sectioned Bayesian Networks to Cooperative Multiagent Systems

Queueing Model and Optimization of Packet Dropping in Real-Time Wireless Sensor Networks

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Skyline Community Search in Multi-valued Networks

State Indexed Policy Search by Dynamic Programming. Abstract. 1. Introduction. 2. System parameterization. Charles DuHadway

Distributed Line Graphs: A Universal Technique for Designing DHTs Based on Arbitrary Regular Graphs

BIJECTIONS FOR PLANAR MAPS WITH BOUNDARIES

Random Clustering for Multiple Sampling Units to Speed Up Run-time Sample Generation

Handling Inconsistencies due to Class Disjointness in SPARQL Updates. joint work with: Albin Ahmeti, Diego Calvanese, Vadim Savenkov.

Practical Aspects of Query Rewriting for OWL 2

Characterizing Decoding Robustness under Parametric Channel Uncertainty

An Algorithm for Building an Enterprise Network Topology Using Widespread Data Sources

Generalized Edge Coloring for Channel Assignment in Wireless Networks

Comparison of Methods for Increasing the Performance of a DUA Computation

CS269I: Incentives in Computer Science Lecture #8: Incentives in BGP Routing

Kinematic Analysis of a Family of 3R Manipulators

Generalized Edge Coloring for Channel Assignment in Wireless Networks

The Reconstruction of Graphs. Dhananjay P. Mehendale Sir Parashurambhau College, Tilak Road, Pune , India. Abstract

Message Transport With The User Datagram Protocol

Transient analysis of wave propagation in 3D soil by using the scaled boundary finite element method

EXACT SIMULATION OF A BOOLEAN MODEL

Evaluation of Query Rewriting Approaches for OWL 2

A Classification of 3R Orthogonal Manipulators by the Topology of their Workspace

Almost Disjunct Codes in Large Scale Multihop Wireless Network Media Access Control

Learning convex bodies is hard

Using Vector and Raster-Based Techniques in Categorical Map Generalization

IEEE JOURNAL ON SELECTED AREAS IN COMMUNICATIONS, VOL. 31, NO. 4, APRIL

Updating data and knowledge bases

MASTRO-I: Efficient integration of relational data through DL ontologies

Trace-based Approach to Editability and Correspondence Analysis for Bidirectional Graph Transformations

SURVIVABLE IP OVER WDM: GUARANTEEEING MINIMUM NETWORK BANDWIDTH

Logical reconstruction of RDF and ontology languages

Design of Policy-Aware Differentially Private Algorithms

Cluster Center Initialization Method for K-means Algorithm Over Data Sets with Two Clusters

Intensive Hypercube Communication: Prearranged Communication in Link-Bound Machines 1 2

Updating data and knowledge bases

Database Optimization Techniques for Semantic Queries

Frequent Pattern Mining. Frequent Item Set Mining. Overview. Frequent Item Set Mining: Motivation. Frequent Pattern Mining comprises

MORA: a Movement-Based Routing Algorithm for Vehicle Ad Hoc Networks

6.854J / J Advanced Algorithms Fall 2008

Compiler Optimisation

Table-based division by small integer constants

d 3 d 4 d d d d d d d d d d d 1 d d d d d d

On Reconciling Data Exchange, Data Integration, and Peer Data Management

THE BAYESIAN RECEIVER OPERATING CHARACTERISTIC CURVE AN EFFECTIVE APPROACH TO EVALUATE THE IDS PERFORMANCE

Modifying ROC Curves to Incorporate Predicted Probabilities

Adjacency Matrix Based Full-Text Indexing Models

AnyTraffic Labeled Routing

Classifying Facial Expression with Radial Basis Function Networks, using Gradient Descent and K-means

Semantic data integration in P2P systems

TrOWL: Tractable OWL 2 Reasoning Infrastructure

Proving Vizing s Theorem with Rodin

Memoing Evaluation for Constraint Extensions of Datalog *

Indexing the Edges A simple and yet efficient approach to high-dimensional indexing

Dense Disparity Estimation in Ego-motion Reduced Search Space

Learning Polynomial Functions. by Feature Construction

Improving Spatial Reuse of IEEE Based Ad Hoc Networks

Algebraic transformations of Gauss hypergeometric functions

Semantic reasoning for dynamic knowledge bases. Lionel Médini M2IA Knowledge Dynamics 2018

Computer Organization

Shift-map Image Registration

The Inverse of a Schema Mapping

RDF Data Management: Reasoning on Web Data

Analyzing Real-World SPARQL Queries in the Light of Probabilistic Data

Image compression predicated on recurrent iterated function systems

ACE: And/Or-parallel Copying-based Execution of Logic Programs

Throughput Characterization of Node-based Scheduling in Multihop Wireless Networks: A Novel Application of the Gallai-Edmonds Structure Theorem

A Knowledge Compilation Technique for ALC Tboxes

A Unified Logical Framework for Rules (and Queries) with Ontologies - position paper -

Coordinating Distributed Algorithms for Feature Extraction Offloading in Multi-Camera Visual Sensor Networks

EDOVE: Energy and Depth Variance-Based Opportunistic Void Avoidance Scheme for Underwater Acoustic Sensor Networks

Considering bounds for approximation of 2 M to 3 N

Supporting Fully Adaptive Routing in InfiniBand Networks

On Effectively Determining the Downlink-to-uplink Sub-frame Width Ratio for Mobile WiMAX Networks Using Spline Extrapolation

OWL extended with Meta-modelling

Shift-map Image Registration

Discrete Markov Image Modeling and Inference on the Quadtree

Solution Representation for Job Shop Scheduling Problems in Ant Colony Optimisation

A Convex Clustering-based Regularizer for Image Segmentation

Handling missing values in kernel methods with application to microbiology data

EXTRACTION OF MAIN AND SECONDARY ROADS IN VHR IMAGES USING A HIGHER-ORDER PHASE FIELD MODEL

A Duality Based Approach for Realtime TV-L 1 Optical Flow

Politecnico di Torino. Porto Institutional Repository

Offloading Cellular Traffic through Opportunistic Communications: Analysis and Optimization

Transcription:

SPARQL Upate uner RDFS Entailment in Fully Materialize an Reunancy-Free Triple Stores Albin Ahmeti 1 an Axel Polleres 2 1 Vienna University of Technology, Favoritenstraße 9, 1040 Vienna, Austria 2 Vienna University of Economics an Business, Welthanelsplatz 1, 1020 Vienna, Austria Abstract. Processing the ynamic evolution of RDF stores has recently been stanarize in the SPARQL 1.1 Upate specification. However, computing answers entaile by ontologies in triple stores is usually treate orthogonal to upates. Even the W3C s recent SPARQL 1.1 Upate language an SPARQL 1.1 Entailment Regimes specifications explicitly exclue a stanar behavior how SPARQL enpoints shoul treat entailment regimes other than simple entailment in the context of upates. In this paper, we take a first step to close this gap, by rawing from query rewriting techniques explore in the context of DL-Lite. We efine a fragment of SPARQL basic graph patterns corresponing to (the RDFS fragment of) DL-Lite an the corresponing SPARQL upate language iscussing possible semantics along with potential strategies for implementing them. We treat both (i) reuce RDF Stores, that is, reunancy-free RDF stores that o not store any RDF triples (corresponing to DL Lite ABox statements) entaile by others alreay, an (ii) materialize RDF stores, which store all entaile triples explicitly. 1 Introuction SPARQL provies a stanar for accessing structure Data on the Web an the availability of such a stanar may well be calle one of the key factors to the success an increasing aoption of RDF an semantic technologies. Still, in its first iteration the SPARQL specification has neither efine any stanar way how to treat entailments with respect to RDFS an OWL ontologies, nor provie stanar means how to upate ynamic RDF ata. Both these gaps have been aresse within the recent SPARQL 1.1 specification, which both provies means to efine query answers uner ontological entailments (SPARQL 1.1 Entailment Regimes [6]) as well as an upate language to upate RDF ata store in a triple store (SPARQL 1.1 Upate [5]). 3 Nonetheless, these specifications o not provie a stanar behavior how SPARQL enpoints shoul treat entailment regimes other than simple entailment in the context of upates. The main issue of upates uner entailments is how upates shall eal with implie statements: What oes it mean if an implie triple is explicitly (re-)inserte (or, resp., elete)? Which (if any) aitional triples shoul be inserte, (or, resp., elete) upon upates? 3 For the sake of simplicity we o not take into account NAMED graphs in this paper, which is why we speak of triple stores as oppose to graph stores.

In the context of RDFS one might further ask about how to eal with axiomatic triples such as rf:type a rf:property., issues aroun the treatment of blank noes [12], or, in the context of OWL, the treatment of inconsistencies arising through upates; for the sake of this present paper, we o not treat these aitional issues separately, but focus on a eliberately minimal treatment of RDFS inferences along the lines of [14]. As it turns out, even in this confine setting, upates as efine in the SPARQL 1.1 Upate specification impose non-trivial challenges; particularly, specific issues arise through the interplay of INSERT, DELETE, an WHERE clauses within a single SPARQL upate operation, which to the best of our knowlege have not been consiere in the literature in combination as of yet. Example 1. As a running example, let us assume a RDF triple store G, containing ata about family relationships along with a RDFS ontology O fam comprising the following axioms (in Turtle syntax). :hasfather rfs:subpropertyof :hasparent. :hasmother rfs:subpropertyof :hasparent. :Father rfs:subclassof :Parent. :Mother rfs:subclassof :Parent. :hasfather rfs:range :Father; rfs:omain :Chil. :hasmother rfs:range :Mother; rfs:omain :Chil. :hasparent rfs:range :Parent; rfs:omain :Chil. Assuming now that the following ata assertions are also in the RDF Store G :joe :hasparent :jack. :joe :hasmother :jane. the following query shoul return both :jack an :jane as (RDFS entaile) answers: SELECT?Y WHERE { :joe :hasparent?y. } A SPARQL enpoint that only consiers simple entailment though, woul only return :jack as an answer. The intene behavior for the query in Example 1 is typically achieve by either (i) computing entaile answers at query runtime, which can actually be achieve by query rewriting techniques, or (ii) by materializing all implie triples in the store, normally at loaing time. That is, on the one han, borrowing from query rewriting techniques from DL-Lite (such as e.g. PerfectRef [3], several refinements of which have been propose in the literature) one can reformulate such a query to return also the implie answers. A minimalist query reformulation algorithm that is, a own-strippe version of PerfectRef [3], covering the essential entailments of RDFS is shown in Alg. 1. Example 2 (cont ). If we interpret the WHERE clause in the query in Example 1 as a conjunctive query, an the RDFS axioms from O fam as DL TBox, the resulting UCQ as from Alg. 1 can be just translate back into SPARQL as follows. SELECT?Y WHERE {{ :joe :hasparent?y. } UNION { :joe :hasfather?y. } UNION { :joe :hasmother?y. }} Inee this query returns both parents, :jane an :jack.

While the rewritten query is exponential in the worst case wrt. the size of the ontology, for moerate size ontologies, such a rewriting approach is quite feasible. On the other han, an alternative is to materialize all inferences (for instance prouce by the minimalist inference rules set for RDFS from [14]) in the triple store, such that the original query can be use as is. Example 3 (cont ). The materialize version of G woul contain the following triples for conciseness we only show assertional implie triples here, that is triples from rules 2)b), 3)b), 4)a)+b) from [14]. :joe :hasparent :jack. :joe a :Chil. :jack a :Parent. :joe :hasmother :jane; :hasparent :jane. :jane a :Mother, :Parent. Obviously, on such an enpoint, the original query from Example 1 woul alreay return the expecte results. However, when it comes to upating the RDF store in terms of SPARQL 1.1 Upate, things become less clear. Example 4 (cont ). The following operation tries to elete an implie class membership whereas it tries to (re-)insert another implie class membership. DELETE{?X a :Chil.} INSERT {?Y a :Mother.} WHERE {?X :hasmother?y.} Various existing triple stores offer ifferent solutions to these problems, ranging from probably most commonly ignoring entailments in upates altogether to keeping explicit an implicit triples separate an recomputing all entailments upon upates. That is, in the former case (ignoring entailments) upates only refer to explicitly asserte information, which may result in non-intuitive behaviors, whereas the latter case (rematerialization) may be very costly while still not eliminating all non-intuitive cases, as we will see. The problem is aggravate by no systematic approach to which implie triples to store explicitly in a triple store an which not. As an example, take for instance Algorithm 1: rewrite Input: Conjunctive query q, TBox T Output: Union (set) of conjunctive queries 1 P := {q} 2 repeat 3 P := P 4 foreach q P o 5 foreach g in q o // expansion 6 foreach inclusion axiom I in T o 7 if I is applicable to g then 8 P := P { q[g/ gr(g, I)] } 9 until P = P 10 return P Table 1. DL-Lite axioms vs. RDF(S) DL RDFS RDFS 1 A 1 A 2 A 1 rfs : subclassof A 2. 2 P A P rfs : omain A. 3 P A P rfs : range A. 4 P 1 P 2 P 1 rfs : subpropertyof P 2. 5 A(x) x rf : type A. 6 P (x, y) x P y. Table 2. Semantics of gr(g, I) in Alg.1 g I gr(g/i) A(x) B A B(x) A(x) P A P (x, _) A(x) P A P (_, x) P 1(x, y) P 2 P 1 P 2(x, y) Here, _ stans for a fresh variable.

DBpeia which stores certain entaile triples, but not all (cf. the example in [16]). In this paper we try to argue for a more systematic approach for ealing with upates in the context of RDFS entailments. More specifically, we will istinguish between two kins of triple stores, that is (i) reuce RDF Stores, that is, reunancy-free RDF stores that o not store any assertional (ABox) triples entaile by others alreay, an (ii) materialize RDF stores, which store all entaile ABox triples explicitly. Next, we propose alternative upate samentics that preserve the respective types (i) an (ii) of triple stores, an iscuss possible implementation strategies, partially inspire by query rewriting techniques that have become popular in the context of ontology-base ata access (OBDA) [11] an DL-Lite [3]. For the sake of this paper we will assume RDFS ontologies to be static an only assertional statements (ABoxes) to be upate. Along these lines, we will efine a fragment of the SPARQL 1.1 Upate language, that allows to A/Delete assertional ABox statements, but not terminological statements (using the RDFS vocabulary). As alreay shown in [8], erasure of ABox statements is eterministic in the context of RDFS, but insertion an particularly the interplay of DELETE/INSERT in SPARQL 1.1 Upate has not been consiere therein. The remainer of this paper continues with preliminaries (RDFS, SPARQL, DL-Lite, SPARQL upate operations) in Section 2. We then present alternative upate semantics along with possible implementation strategies in Section 3, an subsequently iscuss future an relate work (Section 4) before we conclue (Section 5). 2 Preliminaries Since we will raw from ieas coming from OBDA an DL-Lite, we will use RDF graphs an RDFS ontologies compatible with DL-Lite ontologies in the present paper. Definition 1 (RDFS ontology, ABox, TBox, triple store). Let A be an atomic concept (or class, resp.) name an P be an atomic role (or, property, resp.) name, an Γ be a set of constants which in context of RDF(S) coincies with the set I of IRIs. We assume the IRIs use for concepts, roles, an constants to be isjoint from IRIs of the RDFS an OWL vocabularies. 4 Let x, y Γ, then we call a set of inclusion axioms of the forms 1-4 in Tab. 1 a RDFS ontology, or (RDFS) TBox, whereas we call a set of assertions of the forms 5+6 in Tab. 1 an (RDF) ABox, where we view RDF an DL notation interchangeably. Finally, we call a container G = T A holing a TBox T an an ABox A an (RDFS) triple store. That is, more informally, we treat any RDF graph consisting of triples without non-stanar RDFS vocabulary use as a pair of ABox an TBox triples, where, for the purposes of this paper, we will consier the latter fixe/immutable. Further to this, we will treat conjunctive queries (with only istinguishe variables) an SPARQL basic graph patterns (BGPs) interchangeably in this paper as follows. Note that we o not provie etails on more complex patterns (OPTIONAL, NOT EXISTS, FILTER, etc.) in 4 That is, we assume no non-stanar use [16] of these vocabularies. We may also assume concept names, role names an constants mutually isjoint (or istinguish them in the sense of punning [13] base on their position in atoms or RDF triples).

SPARQL 1.1 which are efine on top of BGP matching, but refer the reaer to [9] for etails on the semantics of these patterns. Definition 2 (BGP, CQ, UCQ). A conjunctive query (CQ) q, or basic graph pattern (BGP), is a set of atoms of the forms 5+6 from Tab. 1, where x, y are either constants from Γ or variables (written as alphanumeric strings precee by? ). A union of conjunctive queries (UCQ) Q, or UNION pattern, is a set of conjunctive queries. By V ar(q) (or V ar(q), resp.) we enote the set of variables occurring in q (or Q, resp.). This efinition allows only restricte forms of general SPARQL BGPs that correspon to conjunctive queries along the lines of Description Logics; that is, we o not allow, e.g., queries with variables in preicate positions nor terminological queries, e.g. {?X rfs:subclassof?y.}. We neither consier blank noes separately in this paper. 5 By these restrictions, we can treat query answering an BGP matching in SPARQL analogously an efine it in terms of interpretations an moels (as usual in Description Logics) as follows. Definition 3 (Interpretation, satisfaction, moel). An interpretation I = Δ I, I consists of a non-empty set Δ I calle the object omain, an an interpretation function I which maps each atomic concept A to a subset of the omain A I Δ I, each atomic role P to a binary relation over the omain P I Δ I Δ I, each element of Γ to an element of Δ I. For concept escriptions the interpretation function is efine as follows: ( R) I = { x Δ I y.(x, y) R I } ( R ) I = { y Δ I x.(x, y) R I} An interpretation I satisfies an inclusion axiom E 1 E 2 (of one of the forms 1-4 in Tab. 1) if E I 1 E I 2. Analogously, I satisfies an ABox assertion of the form A(x) if x I A I P (x, y) if (x I, y I ) P I Finally, an interpretation I is calle a moel of a triple store G = T A, enote I = G, if I = T an I = A, that is, if I satisfies all terminological axioms in T an all ABox assertions in A. Definition 4 (Query answers). For a CQ q (or, UCQ Q, resp.) an a triple store G, a substitution θ from variables in V ar(q) to constants in Γ such that qθ is true (or, there exists a q Q with qθ is true) in every moel of G is calle an answer (uner RDFS Entailment) to q, an we enote the set of all answers by ans RDFS (q, G) (or, ans RDFS (Q, G), resp.). Since we only treat RDFS entailment, but no other entailment regimes in this paper, in the following we will rop the subscript an simply write ans instea of ans RDFS. The following results follow immeiately from e.g. [8,14] & [3] an show that query answering uner RDF can be one by either query rewriting or materialization. 5 Blank noes in a triple store may be consiere as constants an we o not allow blank noes in queries, which oes not affect the expressivity of SPARQL.

Proposition 1. Let G = T A be a triple store, q be a CQ. Further, let rewrite(q, T ) be as per Alg. 1 above, whereas by materialize(g) = T A we enote the triple store obtaine from exhaustive application of the following inference rules on G: 6?P rfs:subpropertyof?q.?s?p?o.?s?q?o.?p rfs:omain?c.?s?p?o.?s rf:type?c.?c rfs:subclassof?d.?s rf:type?c.?s rf:type?d.?p rfs:range?c.?s?p?o.?o rf:type?c. Then, ans(q, G) = ans(rewrite(q, T ), G T ) = ans(q, materialize(g) T ). Various existing triple stores (such as e.g. BigOWLIM [2]) have the option to perform materialization irectly upon loaing ata. Accoringly, we will call materialize triple stores all triple stores that in each state always guarantee G = materialize(g). On the other extreme, this suggests alternatively to iscuss triple stores that o not store any reunant ABox triples. By reuce(g) we will enote the hypothetical operator that prouces the reuce core of G, an we call a triple store reuce if G = reuce(g). While we o not provie the algorithm to compute reuce(g), we note that this core is uniquely etermine in our setting whenever T is acyclic (which is usually a safe assumption) 7 ; it coul be naïvely compute by exhaustively marking each triple that can be inferre from applying any of the rules in Prop. 1 an subsequently removing all marke elements of A. The following observation follows trivially. Lemma 1. Let G = T be a triple store with an empty ABox, then G is both reuce an materialize. Finally, we introuce the notion of a SPARQL upate operation. Definition 5 (SPARQL upate operation). Let P, P i be BGPs an P w a BGP or UNION pattern. Then an upate operation u(p, P i, P w ) has the form DELETE P INSERT P i WHERE P w Intuitively, the semantics of executing u(p, P i, P w ) on G, enote as G u(p,p i,p w) is efine interpreting both P an P i as templates to be instantiate with the solutions of ans(p w, G), resulting in sets of ABox statements A an A i to be elete from an inserte into G, respectively. A naïve upate semantics follows straightforwarly. Definition 6 (Naïve upate semantics). Let G = T A be a triple store, u(p, P i, P w ) be an upate operation, then G u(p,p i,p w) = (G A ) A i, where A = P θ an A i = P i θ. θ ans(p w,g) θ ans(p w,g) As easily seen, this naïve semantics neither preserves materialize nor reuce triple stores; we leave it to the reaer to confirm this observation on the upate from Example 4 both on the reuce triple store from Example 1 an, resp., on the materialize triple store from Example 3. 6 These rules correspon to rules 2)b), 3)b), 4)a)+b) from [14]; since we neither consier blank noes nor terminological inferences, we o not nee the further rules from [14]. 7 We note that even in the case when the TBox is cyclic we coul efine a eterministic way to remove reunancies, e.g. by preserving the lexicographically smallest ABox statements only within a cycle. That is, given TBox A B C A an ABox A(x), C(x); we woul elete C(x) an retain A(x) only, to preserve reuceness.

3 Materialize/Reuce Preserving Upate Semantics In this section, we will investigate alternative upate semantics uner RDFS entailment that either preserve materialize or reuce stores an iscuss in how far these semantics can similar to query answering be implemente in off-the-shelf SPARQL 1.1 triple stores by simple rewriting techniques. We will look into the following possible semantics: 0 : As a baseline for a materialize-preserving semantics, we iscuss to apply the naïve semantics, followe by (re-)materialization of the whole triple store. 1 : Another materialize-preserving semantics coul follow the intention to elete the instantiations of P plus all their causes; insert the instantiations of P i plus all their effects. 2 : This semantics is also materialize-preserving but extens 1 with the intention to aitionally (recursively) elete angling effects for instantiations of P, that is, effect of to-be-elete triples that woul not be implie any longer by any non-elete triples after eletion. Sem re 0 : Again, the baseline for a reuce-preserving semantics woul be to apply the naïve semantics, followe by (re-)reucing the triple store. Sem re 1 : This reuce-preserving semantics extens Sem re 0 by aitionally eleting the causes of instantiations of P. The efinitions of semantics 0 an Sem re 0 are straightforwar. Definition 7 (Baseline materialize- an reuce-preserving upate semantics). Let G an u(p, P i, P w ) be as in Def. 6 above. Then, analogously to Def. 6, we efine 0 as G Semmat 0 u(p,p = materialize(g i,p w) u(p,p i,p w)) an Sem re 0 as G Semre 0 u(p,p = reuce(g i,p w) u(p,p i,p w)) Let us procee with a quick reality-check on these two baseline semantics by means of our running example. Example 5. By referring back to the upate from Example 4: as easily seen, neither 0 (execute on the materialize triple store of Example 3), nor Sem re 0 (execute on the reuce triple store of Example 1) woul have any effect. As this behavior is quite arguable, which is why we will procee with iscussing how the other intentions coul be implemente or, resp., what implications such alternative upate semantics woul have. Alternative Materialize-Preserving Semantics. Let us first look into materializepreserving semantics in more etail. As it turns out, 1 can be achieve fairly straightforwarly, builing upon similar rewriting ieas as query rewriting. However, as we will argue, there might be reasons why one wants to aopt the other semantics. As we have seen, in the setting of RDFS we can use Alg. 1 rewrite to expan a CQ q to a UCQ that consiers all its causes. A slight variation can of course be use to

compute the set of all causes, that is, in the most naïve fashion by just flattening the set of sets returne by Alg. 1 to a simple set; we enote this flattening operation on a set of sets S as flatten(s). Likewise, we can easily efine a turne aroun rewriting that computes all the effects of a pattern by moifying Alg. 1 such that it simply consiers Table 2 with the first an thir column swappe (an _ just matching any variable or constant). 8 Let us call the resulting algorithm rewrite eff. Likewise, we coul have efine rewrite eff algorithm as a moification of materialize(g) applie to BGPs instea of to the graph itself. 9 For the sake of completeness, in the same sense we can also analogously to reuce(g) efine an algorithm reuce(p, T ) which takes a pattern as input an reuces it wrt. a TBox T. Using these consierations, we can thus efine both rewritings that consier all causes, as well as rewritings that consier all effects: Definition 8 (Cause/Effect rewriting). Given a BGP insert or elete template P for an upate operation over the triple store G = T A, we efine the all-causes-rewriting of P as P caus = flatten(rewrite(p, T )); likewise, we efine the all-effects-rewriting of P as P eff = flatten(rewrite eff (P, T )). This leas (almost) straightforwarly to a rewriting-base efinition of 1 : Definition 9. Let u(p, P i, P w ) be an upate operation, then where P fvars G Semmat 1 u(p,p i,p w) = G u(p caus,p eff,{rewrite(p i w)}{p fvars }) = {?x a rfs:resource. for each?x V ar(p caus P ) V ar(p )}. The only tricky part in this efinition is the rewriting of the WHERE clause, where rewrite(p w ) is joine 10 with a new pattern P fvars that bins the free variables (i.e., the new variables enote by _ in Tab. 2, which were introuce by Alg. 1) in the rewritten DELETE clause, P caus. Here?x a rfs:resource. stans as a shortcut for the UCQ {{?x?x p?x o} UNION {?x s?x?x o} UNION {?x s?x p?x}} which bins any term occurring in the triple store. Example 6. Getting back to the materialize version of the triple store from Example 3, the upate from Example 4 woul, accoring to 1 be rewritten to DELETE {?X a :Chil.?X :hasfather?x1.?x :hasmother?x2.?x :hasparent?x3. } INSERT {?Y a :Mother.?Y a :Parent. } WHERE { {?X :hasmother?y. } {?x1 a rfs:resource.?x2 a rfs:resource.?x3 a rfs:resource.} } 8 We note that this coul be viewe equivalently as simply applying the inference rules from Prop. 1 exhaustively to q. 9 Please note that it is not our intention to provie optimize algorithms here, but just to convey the feasibility of this rewriting. 10 A sequence of {} -elimite patterns in SPARQL correspons to a join, where such joins can again be neste with UNIONs, with the obvious semantics, for etails cf. [9].

with the resulting triple store containing the following triples. :jane a :Mother, :Parent. :jack a :Father, :Parent. It is easy to argue that 1 is materialize-preserving. However, this semantics might still result in potentially non-intuitive behaviors. For instance, in this semantics the following subsequent calls of INSERTs an DELETEs might leave traces as shown by the following example. Example 7. Assuming G = O fam from Example 1 with an empty ABox. Uner 1 semantics the following sequence of upates woul leave as a trace the resulting triples as in Example 6, which woul not be the case uner the naïve semantics. DELETE{} INSERT {:joe :hasmother :jane;:hasfather :jack} WHERE{}; DELETE {:joe :hasmother :jane;:hasfather :jack} INSERT{} WHERE{}; 2 tries to aress the issue of such traces, but can no longer be formulate by such a relatively straightforwar rewriting. For the present, preliminary paper we leave out a etaile efinition/implementation capturing the intention of 2 ; an obvious starting point woul be the Delete an Reerive algorithm [7], but whether 2 can be implemente by rewriting to SPARQL upate operations following the naïve semantics is open. We emphasize though, that a semantics that achieves the intention of 2 woul still potentially run into arguable cases, since it might run into removing explicitly ae assertions, whenever remove assertions cause these, as shown by the following example. Example 8. Assuming a materialize-preserving upate semantics implementing the intention of 2, the behaviour of the following upate sequence is left open: DELETE {} INSERT {:x a :Parent.} WHERE {}; DELETE {} INSERT {:x a :Father.} WHERE {}; DELETE {:x a :Father.} INSERT {} WHERE {}; Note that the secon an thir upate operation in this example show that even insertion an immeiate subsequent eletion of a single triple is not iempotent for 2. In a strict reaing of 2 s intention, :x a :Parent. woul count as a angling effect, since it is an effect of the triple in the secon insertion with no other causes in the triple store, an thus shoul be remove upon the thir upate operation. Nonetheless, implementations of (materialize) triple stores may make a istinction between implicit an explicitly inserte triples (e.g. by storing explicit an implicit triples in separate graph); however, we consier the istinction between implicit triples an explicitly inserte ones non-trivial in the context of SPARQL 1.1 Upate: for instance, is a triple inserte base upon implicit binings in the WHERE clause of an INSERT statement to be consiere explicitly inserte or not? The authors of the present paper ten towars avoiing such istinction, but we have more iscussion of such rather philosophical aspects of possible SPARQL upate semantics on our agena; for now, let us rather turn our attention to the potential alternatives for reuce-preserving semantics. Alternative Reuce-Preserving Semantics. Again, similar to 2, for both the baseline semantics Sem re 0 an Sem re 1 we leave it open whether it can be implemente by rewriting to SPARQL upate operations following the naïve semantics, i.e., without the nee to apply reuce(g) over the whole triple store after each upate; a strategy to avoi calling reuce(g) woul roughly inclue the following steps:

elete the instantiations P plus all the effects of instantiations of P i, which will be implie anyways upon the new insertion, thus preserving reuce; insert instantiations of P i only if they are not implie, that is, neither alreay implie by the current state of G or all their causes in G were to be elete. We leave further investigation of whether these steps can be cast into one or several upate requests irectly by rewriting techniques to future work. Rather, we show that we can capture the intention of Sem re 1 by a relatively straightforwar extension of the baseline semantics. Definition 10 (Sem re 1 ). Let u(p, P i, P w ) be an upate operation, then where P caus G Semre 1 u(p,p i,p w) = reuce(g u(p caus an P fvars are as before.,p i,{rewrite(p w)}{p fvars }) ) Example 9. Getting back to the reuce version of the triple store from Example 1, the upate from Example 4 woul, accoring to Sem re 1 be rewritten to DELETE {?X a :Chil.?X :hasfather?x1.?x :hasmother?x2.?x :hasparent?x3. } INSERT {?Y a :Mother. } WHERE { {?X :hasmother?y. } {?x1 a rfs:resource.?x2 a rfs:resource.?x3 a rfs:resource.} } with the resulting triple store after (re-)reuction containing the following triple. :jane a :Mother. Note that in a reuce store there is no nee to elete effects of P, which make the consierations that lea us to 2 irrelevant for a reuce-preserving semantics, as shown in following example. Example 10. Uner Sem re 1, as oppose to 1, the upate sequence of Example 7 woul leave no traces. However, note that the eletion of :joe :hasparent :jack in Example 9 might be viewe as non-intuitive, plus the upate sequence of Example 8 woul likewise result in an empty ABox, thus neither guaranteeing iempotence of single triple insertion followe by immeiate eletion. We finally observe that the rewriting for Sem re 1 is almost ientical to 1, but reuce-preservation epens on a separate post-processing step not reaily available in off-the-shelf triple stores, whereas 1 coul be irectly execute by rewriting on any triple store, preserving materialization. 4 Further Relate Work an Possible Future Directions There has alreay been work on upates over TBox-es in the context of tractable ontologies such as RDFS [8] an DL-Lite [4]. Even though such approaches give eterministic answers in general while computing upates, they are either limite to

DELETEs or INSERTs, but not both at the same time nor in combination with templates fille by WHERE clauses, as in SPARQL 1.1; that is, these approaches are not base on BGP matching but rather on a set of ABox assertions to be upate known a priori. Pairing both DELETE an INSERT, as in our case, poses new challenges which we trie to fill the gap by introucing ifferent rewriting semantics an taking into account both materialize an reuce stores. In the future, we plan to exten our work in the context of DL-Lite where we coul reuse off-the-shelf, thoroughly stuie rewriting techniques, an at the same time benefiting from a more expressive query language. Expaning beyon the simple language at the intersection of RDFS an DL-Lite towars more features of DL-Lite or coverage of less restricte RDF graphs an BGPs woul impose new challenges: for instance, consistency checking an consistency-preserving upates (such as treate in [4]) o not yet play a role in the setting of RDFS; we are looking forwar to investigate extensions in these irections. Besies, we are planning to implement all the propose semantics an to test them against existing triple stores. As for further relate works, in the context of reuce stores, let us also refer to [15], where the cost of reunancy elimination uner various (rule-base) entailment regimes incluing RDFS is iscusse in etail. In the area of atabase theory, there has been a lot of work on upating logical atabases: Winslett [17] istinguishes between moel-base an formula-base upates; our approach clearly falls in the latter category, more concretely, it coul be viewe as sets of propositional knowlege base upates [10] generate by SPARQL instantiating DELETE/INSERT templates. Moreover, in the omain of upates over views, the Delete an Reerive algorithm [7] is closely relate to our iscussion about angling effects (particularly, to our propose semantics 2 ) where the tuples to be elete from (recursive) materialize views are etermine if only there are no tuples in relational stores that map to the corresponing tuples in the view, i.e. there is no alternative erivation for the tuples in the view; as mentione above, it is on our agena to investigate whether such behavior can be achieve in terms of upate-rewriting techniques rather than full re-erivations. Let us further note that in the more applie area of atabases, there are obvious parallels between some of our consierations an CASCADE DELETEs in SQL (that is, eletions uner foreign key constraints), in the sense that we trigger aitional eletions of causes/effects in some of the propose upate semantics iscusse herein. Finally, it is worth mentioning that similar work has been one also in classical AI, e.g., in [1], where the main iea is to choose the maximal subset of propositions from a set that o not imply a certain proposition (which is going to be elete), hereby coinciing with the elete rewriting of our 1 semantics. 5 Conclusions We have iscusse the semantics of SPARQL 1.1 Upate in the context of RDFS. To the best of our knowlege, this is the first work to iscuss in epth how to combine SPARQL 1.1 Entailment Regimes with the new SPARQL 1.1 Upate language. While we acknowlege that our results are at a preliminary stage an we have been operating on a very restricte language in this paper, we coul emonstrate that even in such a restricte setting (only capturing minimal RDFS entailments, only allowing ABox upates, restricting BGPs) the efinition of a SPARQL 1.1 Upate semantics uner

entailments is a non-trivial task. While we propose several possible semantics, neither of those might seem intuitive for all possible use cases. So, while a one-size-fits-all upate semantics might not exist, we believe that this is a timely topic that eserves increase attention. Particularly, in the light of the increase importance that RDF an SPARQL are experiencing also in ynamic omains where ata is continuously upate (ealing with ynamics in Linke Data, querying sensor ata or stream reasoning) further research in this area is neee. Acknowlegments This work has been fune by the Vienna Science an Technology Fun (WWTF, project ICT12-015), an by the Vienna PhD School of Informatics. References 1. Alchourron, C.E., Garenfors, P., Makinson, D.: On the logic of theory change: Contraction functions an their associate revision functions. Theoria 48, 14 37 (1982) 2. Bishop, B., Kiryakov, A., Ognyanoff, D., Peikov, I., Tashev, Z., Velkov, R.: OWLIM: A family of scalable semantic repositories. Semantic Web 2(1), 33 42 (2011) 3. Calvanese, D., De Giacomo, G., Lembo, D., Lenzerini, M., Rosati, R.: Tractable reasoning an efficient query answering in escription logics: The DL-Lite family. Journal of Automate Reasoning 39(3), 385 429 (2007) 4. Calvanese, D., Kharlamov, E., Nutt, W., Zheleznyakov, D.: Evolution of DL-Lite knowlege bases. In: ISWC. pp. 112 128 (2010) 5. Gearon, P., Passant, A., Polleres, A.: SPARQL 1.1 Upate (Mar 2013), W3C Recommenation 6. Glimm, B., Ogbuji, C., Hawke, S., Herman, I., Parsia, B., Polleres, A., Seaborne, A.: SPARQL 1.1 Entailment Regimes (Mar 2013), W3C Recommenation 7. Gupta, A., Mumick, I.S., Subrahmanian, V.S.: Maintaining views incrementally. In: ACM SIGMOD Int l Conf. on Management of Data. pp. 157 166. ACM (1993) 8. Gutierrez, C., Hurtao, C., Vaisman, A.: Upating RDFS: from theory to practice. In: 8th Extene Semantic Web Conf. (ESWC 2011) (2011) 9. Harris, S., Seaborne, A.: SPARQL 1.1 Query Language (Mar 2013), W3C Recommenation 10. Katsuno, H., Menelzon, A.O.: A unifie view of propositional knowlege base upates. In: IJCAI. pp. 1413 1419 (1989) 11. Kontchakov, R., Roriguez-Muro, M., Zakharyaschev, M.: Ontology-base ata access with atabases: A short course. In: Reasoning Web 2013, LNCS, vol. 8067, pp. 194 229. Springer (2013) 12. Mallea, A., Arenas, M., Hogan, A., Polleres, A.: On Blank Noes. In: Proceeings of the 10th International Semantic Web Conference (ISWC 2011). LNCS, vol. 7031. Springer (Oct 2011) 13. Motik, B.: On the Properties of Metamoeling in OWL. Journal of Logic an Computation 17(4), 617 637 (2007) 14. Muñoz, S., Pérez, J., Gutiérrez, C.: Minimal euctive systems for RDF. In: ESWC. pp. 53 67 (2007) 15. Pichler, R., Polleres, A., Skritek, S., Woltran, S.: Complexity of reunancy etection on RDF graphs in the presence of rules, constraints, an queries. Semantic Web Interoperability, Usability, Applicability 4(4) (2013) 16. Polleres, A., Hogan, A., Delbru, R., Umbrich, J.: RDFS & OWL reasoning for linke ata. In: Reasoning Web 2013, LNCS, vol. 8067, pp. 91 149. Springer (Jul 2013) 17. Winslett, M.: Upating Logical Databases. Cambrige University Press (2005)