Abstract:
This paper presents a novel SHACL-based framework for validating the Time Ontology (https://www.w3.org/TR/owl-time). The Time Ontology, currently a W3C Candidate Recommendation, is widely recognized as the “de facto” standard for representing temporal data in the Semantic Web. However, its current OWL axiomatization cannot enforce several validation constraints on temporal knowledge that can be expressed using the Time Ontology vocabulary. These constraints are instead captured by the SHACL formalization proposed in this paper. Nevertheless, we show that SHACL shapes alone are insufficient to validate even relatively simple knowledge graphs that can be encoded using this vocabulary. This limitation arises because validation must be performed on the inferred knowledge graph, which SHACL shapes alone cannot derive internally. To address this, our framework first computes the inferred knowledge graph using SHACL-SPARQL rules and then validates it through SHACL shapes. In the second part of the paper, we argue that our findings extend beyond the Time Ontology and have broader implications for SHACL and knowledge graph reasoning. We therefore view our work as a call to action for the Semantic Web community to systematically investigate the interplay between validation and inference. Specifically, there is a need to study the representational requirements of different use cases to identify the minimal set of SHACL shapes and inference rules necessary for data validation in each context. These research efforts could ultimately lead to the definition of distinct SHACL dialects, analogous to how OWL Lite, OWL DL, and other profiles were defined for OWL. The SHACL shapes and SHACL-SPARQL rules that define the proposed framework are freely available in the GitHub repository https://github.com/liviorobaldo/TimeOntologyInSHACL, together with Java programs and detailed instructions for execution.