Skip to main content

Lazy Stream Manipulation in Prolog via Backtracking: The Case of 2P-Kt

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 12678))

Abstract

The ability to lazily manipulate long or infinite streams of data is an essential feature in the era of data-driven artificial intelligence. Yet, logic programming technologies currently fall short when it comes to handling long or infinite streams of data. In this paper, we discuss how Prolog can be reinterpreted as a stream processing tool, and re-designed around an abstract state-machine capable of lazily manipulating streams of data via backtracking.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   99.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

Learn about institutional subscriptions

References

  1. Anicic, D., Fodor, P., Rudolph, S., Stühmer, R., Stojanovic, N., Studer, R.: A rule-based language for complex event processing and reasoning. In: Hitzler, P., Lukasiewicz, T. (eds.) RR 2010. LNCS, vol. 6333, pp. 42–57. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-15918-3_5

    Chapter  Google Scholar 

  2. Anicic, D., Rudolph, S., Fodor, P., Stojanovic, N.: Real-time complex event recognition and reasoning-a logic programming approach. Appl. Artifi. Intell. 26(1–2), 6–57 (2012). https://doi.org/10.1080/08839514.2012.636616

    Article  Google Scholar 

  3. Beck, H., Dao-Tran, M., Eiter, T.: LARS: a logic-based framework for analytic reasoning over streams. Artif. Intell. 261, 16–70 (2018). https://doi.org/10.1016/j.artint.2018.04.003

    Article  MathSciNet  MATH  Google Scholar 

  4. Beck, H., Eiter, T., Folie, C.: Ticker: a system for incremental ASP-based stream reasoning. Theory Pract. Logic Program. 17(5–6), 744–763 (2017). https://doi.org/10.1017/S1471068417000370

    Article  MathSciNet  MATH  Google Scholar 

  5. Calegari, R., Ciatto, G., Mariani, S., Denti, E., Omicini, A.: LPaaS as micro-intelligence: Enhancing IoT with symbolic reasoning. Big Data Cogn. Comput. 2(3), 23 (2018). https://doi.org/10.3390/bdcc2030023

    Article  Google Scholar 

  6. Calegari, R., Ciatto, G., Omicini, A.: On the integration of symbolic and sub-symbolic techniques for XAI: a survey. Intell. Artifi. 14(1), 7–32 (2020). https://doi.org/10.3233/IA-190036

    Article  Google Scholar 

  7. Ciatto, G.: 2P-Kt. https://github.com/tuProlog/2p-kt

  8. Ciatto, G.: Travelling salesman problem (TSP) in 2P-Kt. https://github.com/tuProlog/ortools-tsp-example

  9. Ciatto, G., Calegari, R., Siboni, E., Denti, E., Omicini, A.: 2P-Kt: logic programming with objects & functions in Kotlin. In: Calegari, R., Ciatto, G., Denti, E., Omicini, A., Sartor, G. (eds.) WOA 2020–21th Workshop “From Objects to Agents". CEUR Workshop Proceedings, vol. 2706, pp. 219–236. Sun SITE Central Europe, RWTH Aachen University, Aachen, Germany, October 2020. http://ceur-ws.org/Vol-2706/paper14.pdf

  10. Colmerauer, A., Roussel, P.: The birth of prolog. In: Lee, J.A.N., Sammet, J.E. (eds.) History of Programming Languages Conference (HOPL-II). pp. 37–52. ACM, April 1993. https://doi.org/10.1145/154766.155362

  11. Eiter, T., Ianni, G., Schindlauer, R., Tompits, H.: A uniform integration of higher-order reasoning and external evaluations in answer-set programming. In: Kaelbling, L.P., Saffiotti, A. (eds.) IJCAI-05, Proceedings of the Nineteenth International Joint Conference on Artificial Intelligence, Edinburgh, Scotland, UK, 30 July–5 August 2005, pp. 90–96. Professional Book Center (2005). http://ijcai.org/Proceedings/05/Papers/1353.pdf

  12. Perron, L., Furnon, V.: OR-tools. https://developers.google.com/optimization/

  13. Piancastelli, G., Benini, A., Omicini, A., Ricci, A.: The architecture and design of a malleable object-oriented Prolog engine. In: Wainwright, R.L., Haddad, H.M., Menezes, R., Viroli, M. (eds.) 23rd ACM Symposium on Applied Computing (SAC 2008), Fortaleza, Ceará, Brazil, 16–20 March 2008, vol. 1, pp. 191–197. ACM (2008). https://doi.org/10.1145/1363686.1363739

  14. Redl, C.: The DLVHEX system for knowledge representation: recent advances (system description). Theory Pract. Logic Program. 16(5–6), 866–883 (2016). https://doi.org/10.1017/S1471068416000211

    Article  MathSciNet  MATH  Google Scholar 

  15. Tarau, P., Wielemaker, J., Schrijvers, T.: Lazy stream programming in Prolog. Electron. Proc. Theory Comput. Sci. 306, 224–237 (2019). https://doi.org/10.4204/eptcs.306.26

    Article  MathSciNet  Google Scholar 

Download references

Acknowledgment

Andrea Omicini has been supported by the H2020 Project “AI4EU” (G.A. 825619). R. Calegari has been supported by the H2020 ERC Project “ompuLaw” (G.A. 833647).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Giovanni Ciatto .

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

Ciatto, G., Calegari, R., Omicini, A. (2021). Lazy Stream Manipulation in Prolog via Backtracking: The Case of 2P-Kt. In: Faber, W., Friedrich, G., Gebser, M., Morak, M. (eds) Logics in Artificial Intelligence. JELIA 2021. Lecture Notes in Computer Science(), vol 12678. Springer, Cham. https://doi.org/10.1007/978-3-030-75775-5_27

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-75775-5_27

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-75774-8

  • Online ISBN: 978-3-030-75775-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics