Abstract
Any attempt at a tight integration between semantic technologies and object oriented programming will invariably stumble over the gap between the two underlying object models. We illustrate how this semantic gap manifests from the point of view of data retrieval with SPARQL. We present a novel mechanism to load data from RDF knowledge graphs into object-oriented languages that gives static guarantees about the data access and modularly integrates the mapping between the program and the RDF view with the class definition in the program. This allows us to preserve the separation of concerns between the class system of RDF (geared towards domain modeling and data), and that of the program (geared towards typing and code reuse). Loading of RDF can be performed lazily, when required by the program, based on query-futures – subqueries that are only evaluated if and when the data is accessed. We formulate a Liskov principle for the mapping queries to characterize when they respect the subclass relation. Moreover, we provide tool support to detect when the user-provided mapping would cause the loading mechanisms to result in data structures that manifest the semantic gap.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
We assume that we can reorder the cycle so that the potential backwards edge is always as index 1. We remind that the anchor variable is always the first answer variable of a link query, so the concatenation is indeed well-defined.
- 2.
We refrain from introducing (a) expressions for resolved futures and (b) lazy loading of the result list. Both is standard and orthogonal to lazy loading within one result.
References
Copeland, G.P., Maier, D.: Making smalltalk a database system. In: Yormark, B. (ed.) SIGMOD, pp. 316–325. ACM Press (1984)
Eisenberg, V., Kanza, Y.: Ruby on semantic web. In: ICDE, pp. 1324–1327. IEEE Computer Society (2011)
Baset, S., Stoffel, K.: Object-oriented modeling with ontologies around: a survey of existing approaches. Int. J. Softw. Eng. Knowl. Eng. 28(11–12), 1775–1794 (2018)
Kamburjan, E., Kostylev, E.V.: Type checking semantically lifted programs via query containment under entailment regimes. In: Description Logics, volume 2954 of CEUR Workshop Proceedings. CEUR-WS.org (2021)
Liskov, B., Wing, J.M.: A behavioral notion of subtyping. ACM Trans. Program. Lang. Syst. 16(6), 1811–1841 (1994)
Halstead Jr., R.H.: MULTILISP: A language for concurrent symbolic computation. ACM Trans. Program. Lang. Syst. 7(4), 501–538 (1985)
Baker, H.G., Hewitt, C.: The incremental garbage collection of processes. In: Low, J. (ed.) Proceedings of the 1977 Symposium on Artificial Intelligence and Programming Languages, USA, 15–17 August 1977, pp. 55–59. ACM (1977)
Plotkin, G.: A structural approach to operational semantics. J. Log. Algebr. Program. 60–61 (2004)
Kamburjan, E., Klungre, V.N., Giese, M.: Never mind the semantic gap: modular, lazy and safe loading of RDF data (technical report). Research report 502, Department of Informatics, University of Oslo, March 2022
Kamburjan, E., Klungre, V.N., Schlatte, R., Johnsen, E.B., Giese, M.: Programming and debugging with semantically lifted states. In: Verborgh, R., et al. (eds.) ESWC 2021. LNCS, vol. 12731, pp. 126–142. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-77385-4_8
de Boer, F.S., et al.: A survey of active object languages. ACM Comput. Surv. 50(5), 76:1–76:39 (2017)
Azadbakht, K., de Boer, F.S., Bezirgiannis, N., de Vink, E.P.: A formal actor-based model for streaming the future. Sci. Comput. Program. 186, 102341 (2020)
Hovland, D., Kontchakov, R., Skjæveland, M.G., Waaler, A., Zakharyaschev, M.: Ontology-based data access to Slegge. In: d’Amato, C., et al. (eds.) ISWC 2017. LNCS, vol. 10588, pp. 120–129. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-68204-4_12
Apache Foundation. Apache Jena. https://jena.apache.org/
Eclipse Foundation. Eclipse RDF4J. https://rdf4j.org/
Ireland, C.J.: Object-relational impedance mismatch: a framework based approach. Ph.D. thesis, Open University, Milton Keynes, UK (2011)
Meijer, E., Beckman, B., Bierman, G.M.: LINQ: reconciling object, relations and XML in the .net framework. In: SIGMOD, p. 706. ACM (2006)
Matthew, A.: LINQtoRDF (2006). https://code.google.com/archive/p/linqtordf/
Goldman, N.M.: Ontology-oriented programming: static typing for the inconsistent programmer. In: Fensel, D., Sycara, K., Mylopoulos, J. (eds.) ISWC 2003. LNCS, vol. 2870, pp. 850–865. Springer, Heidelberg (2003). https://doi.org/10.1007/978-3-540-39718-2_54
Clark, K.L., McCabe, F.G.: Ontology oriented programming in go! Appl. Intell. 24(3), 189–204 (2006)
Leinberger, M., Scheglmann, S., Lämmel, R., Staab, S., Thimm, M., Viegas, E.: Semantic web application development with LITEQ. In: Mika, P., et al. (eds.) ISWC 2014. LNCS, vol. 8797, pp. 212–227. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-11915-1_14
Kalyanpur, A., Pastor, D.J., Battle, S., Padget, J.A.: Automatic mapping of OWL ontologies into Java. In: SEKE, pp. 98–103 (2004)
Parreiras, F.S., Saathoff, C., Walter, T., Franz, T., Staab, S.: APIs à gogo: automatic generation of ontology APIs. In: ICSC, pp. 342–348. IEEE Computer Society (2009)
Oren, E., Heitmann, B., Decker, S.: ActiveRDF: embedding semantic web data into object-oriented languages. J. Web Semant. 6(3), 191–202 (2008)
Seifer, P., Leinberger, M., Lämmel, R., Staab, S.: Semantic query integration with reason. Art Sci. Eng. Program. 3(3), 13 (2019)
Leinberger, M.: Type-safe programming for the semantic web. Ph.D. thesis, University of Koblenz and Landau, Germany (2021)
Acknowledgments
This work was supported by the RCN via PeTWIN (294600). The authors thank Dirk Walther for motivating this work and the anonymous reviewers for the constructive feedback.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Kamburjan, E., Klungre, V.N., Giese, M. (2022). Never Mind the Semantic Gap: Modular, Lazy and Safe Loading of RDF Data. In: Groth, P., et al. The Semantic Web. ESWC 2022. Lecture Notes in Computer Science, vol 13261. Springer, Cham. https://doi.org/10.1007/978-3-031-06981-9_12
Download citation
DOI: https://doi.org/10.1007/978-3-031-06981-9_12
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-06980-2
Online ISBN: 978-3-031-06981-9
eBook Packages: Computer ScienceComputer Science (R0)