Skip to main content

Practical Rule-Based Qualitative Temporal Reasoning for the Semantic Web

  • Conference paper
  • First Online:
Rules and Reasoning (RuleML+RR 2021)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 12851))

Included in the following conference series:

Abstract

We present an approach for practical rule-based temporal reasoning over RDF/OWL using Allen’s Interval Algebra (IA). Reasoning in Allen’s IA is only tractable for certain subalgebras and is done through path-consistency, a constraint propagation algorithm whose rule-based implementation requires \(O(n^2)\) rules for a subalgebra with n relations. Our approach uses custom built-ins to implement path-consistency using a constant number of rules (just 6) and in a way that is subalgebra-agnostic. In the paper, we present the approach, its implementation in Apache Jena, and an experimental evaluation against traditional rule-based implementations. The evaluation shows a considerable speed-up when backward-chaining is used. A further contribution of the paper is the problem set used in the evaluations.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    When dates and durations do occur they can be used to infer further qualitative relations: If A occurred in 2020 and B in 2021, then A occurred before B.

  2. 2.

    The direct translation of the Horn-clause formulation of path-consistency to SWRL was proposed by Batsakis et al. in [4, 5]. To make the translation practical they adopted a subalgebra with just 29 relations.

  3. 3.

    https://github.com/ibm-hyperknowledge/IAPL.

  4. 4.

    Inconsistent graphs are those that contain contradictory statements, such as “\(x\mathbin {\{ b \}}y\) and \(y\mathbin {\{ b \}}x\)” (x and y cannot be both, at the same time, “before” each other).

  5. 5.

    Strictly speaking this is the algorithm for 3-consistency, a notion which is equivalent to the more general notion of path-consistency. It has become standard practice to conflate the two notions [20].

  6. 6.

    Before deciding to extend Jena with custom built-ins, we tried to use its math and string manipulation built-ins to implement these operations. But that was really cumbersome, especially due to the lack of built-ins for integer division and modulus.

  7. 7.

    https://github.com/sbatsakis/TemporalRepresentations/blob/master/intervals/qualitative-Allen.owl (commit 3656fa5 on Jun 13, 2015).

  8. 8.

    Our qualitative reasoning framework, called QReason, is a generic framework written in Python which adopts an architecture similar to that of GQR [12]. The user specifies a calculus by giving its basic relations and the framework derives the general relations and the calculus properties. Currently, QReason implements two problem generation algorithms. The first, adapted from [25], is a brute-force algorithm. Starting with an empty graph, we add one random edge at a time and check whether the graph is consistent at each step. If the graph becomes inconsistent, we backtrack the last edge choice and try again. The second algorithm, adapted from [20], consists in first generating a random initial solution (set of intervals) and then adding redundant edges until the required parameters of the \(\mathcal {H}\)-model are met. We used both algorithms to generate the problem set of this paper.

  9. 9.

    https://github.com/ibm-hyperknowledge/IAPL.

  10. 10.

    https://github.com/apache/jena/tree/jena3.

  11. 11.

    https://github.com/Galigator/openllet.

  12. 12.

    In [4], the authors also report being able to reason over 500 intervals under 150s using HermiT, but the exact type of reasoning they consider is not clear and their problem set, which was derived from a dataset of dates of marriages, seems to be easier than the one we are using here.

References

  1. Achich, N., Ghorbel, F., Hamdi, F., Métais, E., Gargouri, F.: Approach to reasoning about uncertain temporal data in OWL 2. Procedia Comput. Sci. 176 (2020)

    Google Scholar 

  2. Allen, J.F.: Maintaining knowledge about temporal intervals. Commun. ACM 26(11) (1983)

    Google Scholar 

  3. Anagnostopoulos, E., Batsakis, S., Petrakis, E.G.M.: CHRONOS: a reasoning engine for qualitative temporal information in OWL. Procedia Comput. Sci. 22 (2013)

    Google Scholar 

  4. Batsakis, S., Petrakis, E., Tachmazidis, I., Antoniou, G.: Temporal representation and reasoning in OWL 2. Semant. Web 8(6) (2016)

    Google Scholar 

  5. Batsakis, S., Tachmazidis, I., Antoniou, G.: Representing time and space for the semantic web. Int. J. Artif. Intell. Tools 26(3) (2017)

    Google Scholar 

  6. van Beek, P.: Reasoning about qualitative temporal information. Artif. Intell. 58 (1992)

    Google Scholar 

  7. Beek, P.V., Cohen, R.: Exact and approximate reasoning about temporal relations. Comput. Intell. 6(3) (1990)

    Google Scholar 

  8. Cox, S.J.D., Little, C.: Time ontology in OWL. Candidate Recommendation, W3C, March 2020

    Google Scholar 

  9. Drakengren, T., Jonsson, P.: Towards a complete classification of tractability in Allen’s algebra. In: Proceedings of the 15th IJCAI (1997)

    Google Scholar 

  10. Dylla, F., et al.: A survey of qualitative spatial and temporal calculi: algebraic and computational properties. ACM Comput. Surv. 50(1) (2017)

    Google Scholar 

  11. Forgy, C.L.: Rete: a fast algorithm for the many pattern/many object pattern match problem. Artif. Intell. 19, 17–37 (1982)

    Article  Google Scholar 

  12. Gantner, Z., Westphal, M., Wölfl, S.: GQR: a fast reasoner for binary qualitative constraint calculi. In: Proceedings of the AAAI WS on Spatial and Temporal Reasoning (2008)

    Google Scholar 

  13. Glimm, B., Horrocks, I., Motik, B., Stoilos, G., Wang, Z.: HermiT: an OWL 2 reasoner. J. Automat. Reason. 53(3) (2014)

    Google Scholar 

  14. Golumbic, M.C., Shamir, R.: Complexity and algorithms for reasoning about time: a graph-theoretic approach. J. ACM 40(5), 1108–1133 (1993)

    Article  MathSciNet  Google Scholar 

  15. Holzmann, C.: Rule-based reasoning about qualitative spatiotemporal relations. In: Proceedings of 5th International Workshop on Middleware for Pervasive and Ad-Hoc Computing: Held at the ACM/IFIP/USENIX 8th International Middleware Conference. ACM (2007)

    Google Scholar 

  16. Horridge, M., Bechhofer, S.: The OWL API: a Java API for working with OWL 2 ontologies. In: Proceedings of the 6th International Conference OWL: Experiences and Directions. CEUR-WS.org (2009)

    Google Scholar 

  17. 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

    Google Scholar 

  18. Krokhin, A., Jeavons, P., Jonsson, P.: Reasoning about temporal relations: the tractable subalgebras of Allen’s interval algebra. J. ACM 50(5), September 2003

    Google Scholar 

  19. Ladkin, P.B., Maddux, R.D.: On binary constraint networks. Technical report. KES.U.88.8, Kestrel Institute (1988)

    Google Scholar 

  20. Ladkin, P.B., Reinefeld, A.: Effective solution of qualitative interval constraint problems. Artif. Intell. 57(1) (1992)

    Google Scholar 

  21. Ligozat, G.: Qualitative Spatial and Temporal Reasoning. Wiley, Hoboken (2012)

    MATH  Google Scholar 

  22. Llorens, H., Chambers, N., UzZaman, N., Mostafazadeh, N., Allen, J., Pustejovsky, J.: SemEval-2015 task 5: QA TempEval: evaluating temporal information understanding with question answering. In: Proceedings of the 9th International Workshop on Semantic Evaluation. ACL, June 2015

    Google Scholar 

  23. Mantle, M., Batsakis, S., Antoniou, G.: Large scale distributed spatio-temporal reasoning using real-world knowledge graphs. Knowledge-Based Syst. 163 (2019)

    Google Scholar 

  24. Milea, V., Frasincar, F., Kaymak, U.: tOWL: a temporal web ontology language. IEEE Trans. Syst. Man Cybern. 42(1) (2012)

    Google Scholar 

  25. Nebel, B.: Solving hard qualitative temporal reasoning problems: evaluating the efficiency of using the ORD-Horn class. Constraints 1 (1997)

    Google Scholar 

  26. Nebel, B., Bürckert, H.J.: Reasoning about temporal relations: a maximal tractable subclass of Allen’s interval algebra. J. ACM 42(1) (1995)

    Google Scholar 

  27. Sirin, E., Parsia, B., Grau, B.C., Kalyanpur, A., Katz, Y.: Pellet: a practical OWL-DL reasoner. J. Web Semant. 5(2) (2007)

    Google Scholar 

  28. Stravoskoufos, K., Petrakis, E.G.M., Mainas, N., Batsakis, S., Samoladas, V.: SOWL QL: Querying spatio-temporal ontologies in OWL. J. Data Semant. 5 (2016)

    Google Scholar 

  29. Terziyan, V., Kaikova, O.: Ontology for temporal reasoning based on extended Allen’s interval algebra. Int. J. Metadata Semant. Ontol. (2016)

    Google Scholar 

  30. The Apache Software Foundation: Apache Jena (2021). https://jena.apache.org/. Accessed 03 Nov 2021

  31. Villain, M., Kautz, H.: Constraint propagation algorithms for temporal reasoning. In: Proceedings of the AAAI Conference on Artificial Intelligence (AAAI 1986). AAAI Press (1986)

    Google Scholar 

Download references

Acknowledgments

This work was partially supported by the DARPA KAIROS program.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Guilherme Lima .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Lima, G., Machado, M., Uceda-Sosa, R., Moreno, M. (2021). Practical Rule-Based Qualitative Temporal Reasoning for the Semantic Web. In: Moschoyiannis, S., Peñaloza, R., Vanthienen, J., Soylu, A., Roman, D. (eds) Rules and Reasoning. RuleML+RR 2021. Lecture Notes in Computer Science(), vol 12851. Springer, Cham. https://doi.org/10.1007/978-3-030-91167-6_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-91167-6_13

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-91166-9

  • Online ISBN: 978-3-030-91167-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics