The Essence of Functional Programming on Semantic Data

  • Martin LeinbergerEmail author
  • Ralf Lämmel
  • Steffen Staab
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10201)


Semantic data fuels many different applications, but is still lacking proper integration into programming languages. Untyped access is error-prone. Mapping approaches cannot fully capture the conceptualization of semantic data. In this paper, we present \(\lambda _{DL}\), a typed \(\lambda \)-calculus with constructs for operating on semantic data. This is achieved by the integration of description logics into the \(\lambda \)-calculus for both typing and data access or querying. The language is centered around several key design principles, in particular: (1) the usage of semantic conceptualizations as types, (2) subtype inference for these types, and (3) type-checked query access to the data by both ensuring the satisfiability of queries as well as typing query results precisely. The paper motivates the use of a designated type system for semantic data and it provides the theoretic foundation for the integration of description logics as well as the core formal definition of \(\lambda _{DL}\) including a proof of type safety.


Knowledge System Description Logic Query Result Semantic Data Typing Rule 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Abadi, M., Cardelli, L., Pierce, B.C., Rémy, D.: Dynamic typing in polymorphic languages. J. Funct. Program. 5(1), 111–130 (1995)CrossRefzbMATHGoogle Scholar
  2. 2.
    Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst. 23(3), 396–450 (2001)CrossRefGoogle Scholar
  3. 3.
    Alagić, S., Bernstein, P.A.: Mapping XSD to OO schemas. In: Norrie, M.C., Grossniklaus, M. (eds.) ICOODB 2009. LNCS, vol. 5936, pp. 149–166. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-14681-7_9 CrossRefGoogle Scholar
  4. 4.
    Beneventano, D., Bergamaschi, S., Sartori, C.: Description logics for semantic query optimization in object-oriented database systems. Trans. Database Syst. 28(1), 1–50 (2003)CrossRefGoogle Scholar
  5. 5.
    Benzaken, V., Castagna, G., Frisch, A.: Cduce: an XML-centric general-purpose language. SIGPLAN Not. 38(9), 51–63 (2003)CrossRefzbMATHGoogle Scholar
  6. 6.
    Berardi, D., Calvanese, D., De Giacomo, G.: Reasoning on UML class diagrams. Artif. Intell. 168(1–2), 70–118 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Bierman, G., Wren, A.: First-class relationships in an object-oriented language. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 262–286. Springer, Heidelberg (2005). doi: 10.1007/11531142_12 CrossRefGoogle Scholar
  8. 8.
    Bierman, G., Meijer, E., Schulte, W.: The essence of data access in C\(\omega \). In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 287–311. Springer, Heidelberg (2005). doi: 10.1007/11531142_13 CrossRefGoogle Scholar
  9. 9.
    Bourhis, P., Krötzsch, M., Rudolph, S.: Reasonable highly expressive query languages. In: Proceedings of International Joint Conference on Artificial Intelligence, pp. 2826–2832. AAAI Press (2015)Google Scholar
  10. 10.
    Calvanese, D., De Giacomo, G., Lembo, D., Lenzerini, M., Poggi, A., Rosati, R.: Ontology-based database access. In: Proceedings of Advanced Database Systems, pp. 324–331 (2007)Google Scholar
  11. 11.
    Carroll, J.J., Dickinson, I., Dollin, C., Reynolds, D., Seaborne, A., Wilkinson, K.: Jena: implementing the semantic web recommendations. In: Proceedings of WWW - Alternate Track Papers and Posters, pp. 74–83. ACM (2004)Google Scholar
  12. 12.
    Chen, J., Bharagavan, K., Yang, J., Strub, P.-Y., Nikhil Swamy, C.F.: Secure distributed programming with value-dependent types. Technical report, March 2011Google Scholar
  13. 13.
    Ciobanu, G., Horne, R., Sassone, V.: Descriptive types for linked data resources. In: Voronkov, A., Virbitskaite, I. (eds.) PSI 2014. LNCS, vol. 8974, pp. 1–25. Springer, Heidelberg (2015). doi: 10.1007/978-3-662-46823-4_1 Google Scholar
  14. 14.
    Crary, K., Weirich, S., Morrisett, J.G.: Intensional polymorphism in type-erasure semantics. J. Funct. Program. 12(6), 567–600 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Ciobanu, G., Horne, R., Sassone, V.: Minimal type inference for linked data consumers. J. Log. Algebr. Meth. Program. 84(4), 485–504 (2015)MathSciNetCrossRefzbMATHGoogle Scholar
  16. 16.
    Gaggl, S.A., Rudolph, S., Schweizer, L.: Fixed-domain reasoning for description logics. In: ECAI 2016. Frontiers in Artificial Intelligence and Applications, vol. 285, pp. 819–827. IOS Press (2016)Google Scholar
  17. 17.
    Groppe, S., Neumann, J., Linnemann, V.: SWOBE - embedding the semantic web languages RDF, SPARQL and SPARUL into Java for guaranteeing type safety, for checking the satisfiability of queries and for the determination of query result types. In: Proceedings of Symposium on Applied Computing, pp. 1239–1246. ACM (2009)Google Scholar
  18. 18.
    Hanus, M.: The integration of functions into logic programming: from theory to practice. J. Log. Program. 19 & 20, 583–628 (1994)Google Scholar
  19. 19.
    Hinze, R., Jeuring, J., Löh, A.: Typed contracts for functional programming. In: Hagiya, M., Wadler, P. (eds.) FLOPS 2006. LNCS, vol. 3945, pp. 208–225. Springer, Heidelberg (2006). doi: 10.1007/11737414_15 CrossRefGoogle Scholar
  20. 20.
    Horridge, M., Bechhofer, S.: The OWL API: a Java API for OWL ontologies. Semant. Web 2(1), 11–21 (2011)Google Scholar
  21. 21.
    Hosoya, H., Pierce, B.C.: Xduce: a statically typed XML processing language. ACM Trans. Internet Technol. 3(2), 117–148 (2003)CrossRefGoogle Scholar
  22. 22.
    Kalyanpur, A., Pastor, D.J., Battle, S., Padget, J.A.: Automatic mapping of OWL ontologies into Java. In: Proceedings of International Conference on Software Engineering and Knowledge Engineering, pp. 98–103 (2004)Google Scholar
  23. 23.
    Kremen, P., Kouba, Z.: Ontology-driven information system design. IEEE Trans. Syst. Man Cybern. Part C 42(3), 334–344 (2012)CrossRefGoogle Scholar
  24. 24.
    Lämmel, R., Peyton Jones, S.L.: Scrap your boilerplate: a practical design pattern for generic programming. In: Proceedings of TLDI 2003, pp. 26–37. ACM (2003)Google Scholar
  25. 25.
    Lämmel, R., Meijer, E.: Mappings make data processing go ’round. In: Lämmel, R., Saraiva, J., Visser, J. (eds.) GTTSE 2005. LNCS, vol. 4143, pp. 169–218. Springer, Heidelberg (2006). doi: 10.1007/11877028_6 CrossRefGoogle Scholar
  26. 26.
    Lämmel, R., Meijer, E.: Revealing the X/O impedance mismatch. In: Backhouse, R., Gibbons, J., Hinze, R., Jeuring, J. (eds.) SSDGP 2006. LNCS, vol. 4719, pp. 285–367. Springer, Heidelberg (2007). doi: 10.1007/978-3-540-76786-2_6 CrossRefGoogle Scholar
  27. 27.
    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). doi: 10.1007/978-3-319-11915-1_14 Google Scholar
  28. 28.
    Motik, B., Sattler, U., Studer, R.: Query answering for OWL-DL with rules. J. Web Sem. 3(1), 41–60 (2005)CrossRefGoogle Scholar
  29. 29.
    Ohori, A., Buneman, P., Breazu-Tannen, V.: Database programming in machiavelli—a polymorphic language with static type inference. In: Proceedings of International Conference on Management of Data, (SIGMOD 1989), SIGMOD 1989, pp. 46–57. ACM (1989)Google Scholar
  30. 30.
    O’Neil, E.J.: Object/relational mapping 2008: hibernate and the entity data model (EDM). In Proceedings of International Conference on Management of Data, pp. 1351–1356. ACM (2008)Google Scholar
  31. 31.
    Oren, E., Heitmann, B., Decker, S.: Activerdf: embedding semantic web data into object-oriented languages. Web Semant. 6(3), 191–202 (2008)CrossRefGoogle Scholar
  32. 32.
    Paar, A., Vrandečić, D.: Zhi# – OWL aware compilation. In: Antoniou, G., Grobelnik, M., Simperl, E., Parsia, B., Plexousakis, D., Leenheer, P., Pan, J. (eds.) ESWC 2011. LNCS, vol. 6644, pp. 315–329. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-21064-8_22 CrossRefGoogle Scholar
  33. 33.
    Parreiras, F.S., Saathoff, C., Walter, T., Franz, T., Staab, S.: A gogo: automatic generation of ontology APIs. In: ICSC 2009. IEEE (2009)Google Scholar
  34. 34.
    Pierce, B.C.: Types and Programming Languages. The MIT Press, Cambridge (2002)zbMATHGoogle Scholar
  35. 35.
    Qi, G., Liu, W., Bell, D.A.: Knowledge base revision in description logics. In: Fisher, M., Hoek, W., Konev, B., Lisitsa, A. (eds.) JELIA 2006. LNCS (LNAI), vol. 4160, pp. 386–398. Springer, Heidelberg (2006). doi: 10.1007/11853886_32 CrossRefGoogle Scholar
  36. 36.
    Reynolds, J.C.: Types, abstraction and parametric polymorphism. In: IFIP Congress, pp. 513–523 (1983)Google Scholar
  37. 37.
    Syme, D., Battocchi, K., Takeda, K., Malayeri, D., Petricek, T.: Themes in information-rich functional programming for internet-scale data sources. In: Proceedings of the DDFP, pp. 1–4. ACM (2013)Google Scholar
  38. 38.
    Vrandecic, D., Krötzsch, M.: Wikidata: a free collaborative knowledgebase. Commun. ACM 57(10), 78–85 (2014)CrossRefGoogle Scholar
  39. 39.
    Wallace, M., Runciman, C.: Haskell and XML: Generic combinators or type-based translation? In: Proceedings of the International Conference on Functional Programming, pp. 148–159. ACM (1999)Google Scholar
  40. 40.
    Wassermann, G., Gould, C., Su, Z., Devanbu, P.T.: Static checking of dynamically generated queries in database applications. ACM Trans. Softw. Eng. Methodol. 16(4), 14 (2007)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag GmbH Germany 2017

Authors and Affiliations

  • Martin Leinberger
    • 1
    Email author
  • Ralf Lämmel
    • 2
  • Steffen Staab
    • 1
    • 3
  1. 1.Institute for Web Science and TechnologiesUniversity of Koblenz-LandauKoblenzGermany
  2. 2.The Software Languages TeamUniversity of Koblenz-LandauKoblenzGermany
  3. 3.Web and Internet Science Research GroupUniversity of SouthamptonSouthamptonEngland

Personalised recommendations