Abstract
ULKB Logic is an open-source framework written in Python for reasoning over knowledge graphs. It provides an interactive theorem prover-like environment equipped with a higher-order language similar to the one used by HOL Light. The main goal of ULKB Logic is to ease the construction of applications that combine state-of-the-art computational logic tools with the knowledge available in knowledge graphs, such as Wikidata. To this end, the framework provides APIs for fetching statements from SPARQL endpoints and operating over the constructed theories using automated theorem provers and SMT solvers (such as the E prover and Z3). In this paper, we describe the design and implementation of ULKB Logic, its interfaces for querying knowledge graphs and calling external provers, and plans for further development.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
- 2.
Wikidata is a sister project of Wikipedia and one of the largest publicly available knowledge graphs. WordNet is a comprehensive semantic lexicon for the English language.
- 3.
Type is actually part of ULKB Logic’s standard prelude, which also includes and .
- 4.
- 5.
The type of is actually
. ULKB Logic follows the standard practice of assuming “
” associates to the right and omits redundant parentheses accordingly. Similarly, application is assumed to associate to the left, i.e.,
means
.
- 6.
Predicate is part of the RDF Schema vocabulary (https://www.w3.org/TR/rdf12-schema/); it is used to provide a human-readable name for a resource.
References
Andrews, P.B.: An Introduction to Mathematical Logic and Type Theory: To Truth Through Proof, 2nd edn. Kluwer, Dordrecht (2002). https://doi.org/10.1007/978-94-015-9934-4
Angles, R., Gutierrez, C.: The expressive power of SPARQL. In: Sheth, A., et al. (eds.) ISWC 2008. LNCS, vol. 5318, pp. 114–129. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-88564-1_8
Austin, E.C.: HaskHOL: a Haskell hosted domain specific language for higher-order logic theorem proving. Master’s thesis, Electrical Engineering and Computer Science Faculty, University of Kansas (2011)
Aydemir, B., Charguéraud, A., Pierce, B.C., Pollack, R., Weirich, S.: Engineering formal metatheory. In: Proceedings of 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. POPL ’08, pp. 3–15. ACM, New York (2008). https://doi.org/10.1145/1328438.1328443
Baader, F., Calvanese, D., McGuinness, D.L., Nardi, D., Patel-Schneider, P.F. (eds.): The Description Logic Handbook: Theory, Implementation and Applications, 2nd edn. Cambridge University Press, Cambridge (2007)
Bansal, K., Loos, S., Rabe, M., Szegedy, C., Wilcox, S.: HOList: an environment for machine learning of higher-order theorem proving. In: Proceedings of 36th International Conference on Machine Learning, Long Beach, California, USA. PMLR (2019)
Church, A.: A formulation of the simple theory of types. J. Symb. Logic 5(2), 56–68 (1940). https://doi.org/10.2307/2266170
Dapoigny, R., Barlatier, P.: Modeling ontological structures with type classes in Coq. In: Pfeiffer, H.D., Ignatov, D.I., Poelmans, J., Gadiraju, N. (eds.) ICCS-ConceptStruct 2013. LNCS (LNAI), vol. 7735, pp. 135–152. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-35786-2_11
Gordon, M.J.C., Melham, T.F. (eds.): Introduction to HOL: A Theorem Proving Environment for Higher Order Logic. Cambridge University Press, Cambridge (1993)
Gordon, M.J.C., Milner, A.J., Wadsworth, C.P.: Edinburgh LCF: A Mechanised Logic of Computation. Springer, Berlin (1979). https://doi.org/10.1007/3-540-09724-4
Hales, T., et al.: A formal proof of the Kepler conjecture. Forum Math. Pi 5, 1–29 (2017). https://doi.org/10.1017/fmp.2017.1
Harrison, J.: HOL Light: an overview. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 60–66. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-03359-9_4
Harrison, J.: HOL Light tutorial (2017). https://www.cl.cam.ac.uk/~jrh13/hol-light/tutorial.pdf
Horrocks, I., Patel-Schneider, P.F., Boley, H., Tabet, S., Grosof, B., Dean, M.: SWRL: a semantic web rule language combining OWL and RuleML. W3C member submission, W3C, May 2004. https://www.w3.org/Submission/SWRL/
Lai, Z., Ng, A.B., Wong, L.Z., See, S., Lin, S.: Dependently typed knowledge graphs. Technical report. arXiv:2003.03785, arXiv.org (2020)
Lambek, J., Scott, P.J.: Introduction to Higher Order Categorical Logic. Cambridge University Press, Cambridge (1986)
McBride, C., McKinna, J.: Functional pearl: I am not a number-I am a free variable. In: Proceedings of 2004 ACM SIGPLAN Workshop on Haskell. Haskell ’04, pp. 1–9. ACM, New York (2004). https://doi.org/10.1145/1017472.1017477
Miller, G.A.: WordNet: a lexical database for English. Commun. ACM 38(11), 39–41 (1995). https://doi.org/10.1145/219717.219748
de Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78800-3_24
Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL: A Proof Assistant for Higher-Order Logic. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45949-9
Polleres, A., Wallner, J.P.: On the relation between SPARQL 1.1 and answer set programming. J. Appl. Non-Classical Logics 23(1–2), 159–212 (2013). https://doi.org/10.1080/11663081.2013.798992
Pérez, J., Arenas, M., Gutierrez, C.: Semantics and complexity of SPARQL. ACM Trans. Database Syst. 34(3), 16:1–16:45 (2009). https://doi.org/10.1145/1567274.1567278
Riazanov, A., Voronkov, A.: The design and implementation of VAMPIRE. AI Commun. 15(2–3), 91–110 (2002)
Schuler, K.K.: VerbNet: a broad-coverage, comprehensive verb lexicon. Ph.D. thesis, University of Pennsylvania, Philadelphia, PA, USA (2005)
Schulz, S., Cruanes, S., Vukmirović, P.: Faster, higher, stronger: E 2.3. In: Fontaine, P. (ed.) CADE 2019. LNCS (LNAI), vol. 11716, pp. 495–507. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-29436-6_29
Speer, R., Chin, J., Havasi, C.: ConceptNet 5.5: an open multilingual graph of general knowledge. In: Proceedings of 31st AAAI Conference on Artificial Intelligence (AAAI-17), San Francisco, California, USA, 4–9 February 2017, pp. 4444–4451. AAAI (2017)
Sutcliffe, G.: The TPTP problem library and associated infrastructure. J. Automat. Reason. 59(4), 483–502 (2017). https://doi.org/10.1007/s10817-017-9407-7
Tang, Y., Sun, J., Dong, J.S., Mahony, B.: Reasoning about semantic web in Isabelle/HOL. In: Proceedings of 11th Asia-Pacific Software Engineering Conference, pp. 46–53 (2004). https://doi.org/10.1109/APSEC.2004.82
The Coq Development Team: The Coq Reference Manual: Release 8.14.0, October 2021
Vrandečić, D., Krötzsch, M.: Wikidata: a free collaborative knowledgebase. Commun. ACM 57(10), 78–85 (2014). https://doi.org/10.1145/2629489
W3C-OWL-WG-2012: OWL 2 web ontology language document overview (second edition). W3C recommendation, W3C, December 2012. http://www.w3.org/TR/2012/REC-owl2-overview-20121211/
W3C SPARQL Working Group: SPARQL 1.1 overview. W3C recommendation, W3C (2013). http://www.w3.org/TR/2013/REC-sparql11-overview-20130321/
Zhan, B.: HolPy: interactive theorem proving in Python. Technical report. arXiv:1905.05970, arXiv.org (2020)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Lima, G., Rademaker, A., Uceda-Sosa, R. (2024). ULKB Logic: A HOL-Based Framework for Reasoning over Knowledge Graphs. In: Barbosa, H., Zohar, Y. (eds) Formal Methods: Foundations and Applications. SBMF 2023. Lecture Notes in Computer Science, vol 14414. Springer, Cham. https://doi.org/10.1007/978-3-031-49342-3_4
Download citation
DOI: https://doi.org/10.1007/978-3-031-49342-3_4
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-49341-6
Online ISBN: 978-3-031-49342-3
eBook Packages: Computer ScienceComputer Science (R0)