Web Semantics (Dec 2025)

Proving correctness of the query containment solver SpeCS using SPARQL set semantics

  • Mirko Spasić,
  • Milena Vujošević Janičić

DOI
https://doi.org/10.1016/j.websem.2025.100870
Journal volume & issue
Vol. 87
p. 100870

Abstract

Read online

Solving the sparql query containment problem is of fundamental importance for the verification and optimization of sparql queries. With the increasing popularity of the Semantic Web and its applications, sparql query containment solvers face significant challenges: covering a wide range of language constructs, achieving high efficiency, and guaranteeing correctness. While language coverage and efficiency can be reliably evaluated by testing with relevant benchmarks, we need formal proof of correctness to ensure the trustworthiness of a tool.In this paper, we prove the correctness of SpeCS a highly efficient state-of-the-art query containment solver that supports reasoning about queries containing all commonly used sparql language constructs. We outline set semantics that cover the most common subset of the sparql language and give precise definitions of all fundamental sparql concepts. We briefly discuss the procedure used by SpeCS for reducing the query containment problem into a formal logical framework. We prove that this procedure is both sound and complete for conjunctive queries as well as for some important classes of non-conjunctive queries (queries containing the union operator, the optional operator, and subqueries). We consider soundness and completeness in both containment and subsumption forms. We also discuss the advantages of solver development driven by correctness proofs.

Keywords