Table of Contents
Fetching ...

Shape Expressions with Inheritance

Iovka Boneva, Jose Emilio Labra Gayo, Eric Prud'hommeaux, Katherine Thornton, Andra Waagmeester

TL;DR

This work addresses the need for reusable, modular schemas in Shape Expressions (ShEx) by introducing Shape Expressions with Inheritance, enabling child shapes to extend and restrict parent shapes, including multiple inheritance and abstract shapes. It provides a formal syntax and semantics that extend ShEx 2.1, introducing a new satisfaction relation for extended shapes, an extension hierarchy, well-defined schemas, and a maximal correct typing that supports a stable validation algorithm. The authors prove termination properties, show how to compute the maximal typing via stratified refinement, and show that validation remains NP-complete, maintaining the same algorithmic complexity as ShEx 2.1. These results enhance reusability and modularity for large RDF ecosystems and align with ongoing standardization efforts, with companion implementations and demonstrations available.

Abstract

We formally introduce an inheritance mechanism for the Shape Expressions language (ShEx). It is inspired by inheritance in object-oriented programming languages, and provides similar advantages such as reuse, modularity, and more flexible data modelling. Using an example, we explain the main features of the inheritance mechanism. We present its syntax and formal semantics. The semantics is an extension of the semantics of ShEx 2.1. It also directly yields a validation algorithm as an extension of the previous ShEx validation algorithms, while maintaining the same algorithmic complexity.

Shape Expressions with Inheritance

TL;DR

This work addresses the need for reusable, modular schemas in Shape Expressions (ShEx) by introducing Shape Expressions with Inheritance, enabling child shapes to extend and restrict parent shapes, including multiple inheritance and abstract shapes. It provides a formal syntax and semantics that extend ShEx 2.1, introducing a new satisfaction relation for extended shapes, an extension hierarchy, well-defined schemas, and a maximal correct typing that supports a stable validation algorithm. The authors prove termination properties, show how to compute the maximal typing via stratified refinement, and show that validation remains NP-complete, maintaining the same algorithmic complexity as ShEx 2.1. These results enhance reusability and modularity for large RDF ecosystems and align with ongoing standardization efforts, with companion implementations and demonstrations available.

Abstract

We formally introduce an inheritance mechanism for the Shape Expressions language (ShEx). It is inspired by inheritance in object-oriented programming languages, and provides similar advantages such as reuse, modularity, and more flexible data modelling. Using an example, we explain the main features of the inheritance mechanism. We present its syntax and formal semantics. The semantics is an extension of the semantics of ShEx 2.1. It also directly yields a validation algorithm as an extension of the previous ShEx validation algorithms, while maintaining the same algorithmic complexity.

Paper Structure

This paper contains 23 sections, 4 theorems, 8 equations, 3 figures, 3 tables.

Key Result

lemma 1

The evaluation of $\mathbf{G}, n, \tau \models_\mathbf{S} \mathbf{def}(z)$ always terminates, for every schema $\mathbf{S} = (\mathbf{Y}, \mathbf{X}, \mathbf{def}, \mathbf{A})$, graph $\mathbf{G}$, node $n$ of $\mathbf{G}$, typing $\tau$ of $\mathbf{G}$ by $\mathbf{S}$, and label $z \in \mathbf{Y} \

Figures (3)

  • Figure 1: A ShEx schema with inheritance.
  • Figure 2: Example graph with nodes f1, f2, a1, a2, a3 and strings and float literals.
  • Figure 3: Extension hierarchy graph for the example.

Theorems & Definitions (12)

  • definition 1: shape expressions
  • definition 2: ShEx schema
  • definition 3: extension hierarchy
  • definition 4: correct typing
  • definition 5: dependency graph
  • definition 6: well-defined schema, stratified negation
  • lemma 1
  • definition 7: stratification
  • definition 8: maximal typing
  • proposition 1
  • ...and 2 more