๐ค AI Summary
ShEx lacks inheritance mechanisms, limiting reusability, modularity, and flexibility of RDF data models. This paper introduces, for the first time, object-oriented inheritance semantics into ShExโformally extending its syntax and model-theoretic semantics based on ShEx 2.1 while preserving the asymptotic time complexity of shape validation. Methodologically, we define a sound and complete inheritance semantics grounded in formal type theory; design a backward-compatible, efficient validation algorithm supporting polymorphic constraints and shape reuse; and implement an open-source ShEx validator with full inheritance support. Empirical evaluation demonstrates that our approach significantly improves conciseness and maintainability of shape definitions, enabling more expressive and scalable structural constraints for knowledge graphs and RDF data modeling.
๐ 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.