Skip to main content

JaKtA: BDI Agent-Oriented Programming in Pure Kotlin

  • Conference paper
  • First Online:
Multi-Agent Systems (EUMAS 2023)

Abstract

Multi-paradigm languages are becoming more and more popular, as they allow developers to choose the most suitable paradigm for each task. Most commonly, we observe the combination of object-oriented (OOP) and functional programming (FP), however, in principle, other paradigms could be hybridised. In this paper, we present JaKtA, an internal DSL adding support for the definition of belief-desire-intention (BDI) agents in Kotlin. We believe is a first step to investigate the blending of Agent-Oriented Programming (AOP) with other popular paradigms and we discuss the opportunity and value of doing so with an internal DSLs. Finally, through JaKtA, we show how this can already lead to compactly and expressively create BDI agents that smoothly interoperate with the host language, its libraries and tooling.

This work has been partially supported by the Chist-Era IV project “Expectation”, and by the Italian Ministry for Universities and Research (G.A. CHIST-ERA-19-XAI-005).

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

    https://www.martinfowler.com/bliki/DslBoundary.html.

  2. 2.

    https://developer.android.com/kotlin/first.

  3. 3.

    https://github.com/breandan/kotlingrad.

  4. 4.

    https://github.com/Kotlin/kotlindl.

  5. 5.

    https://github.com/Kotlin/dataframe.

  6. 6.

    https://github.com/jakta-bdi/jakta.

  7. 7.

    https://search.maven.org/artifact/it.unibo.jakta/jakta-dsl.

  8. 8.

    https://github.com/jakta-bdi/jakta-examples.

  9. 9.

    https://kotlinlang.org/docs/kotlin-ide.html.

  10. 10.

    code available at: https://github.com/jakta-bdi/jakta-android-example.

References

  1. Andrei, S., Masalagiu, C.: About the collatz conjecture. Acta Inform. 35(2), 167–179 (1998). https://doi.org/10.1007/s002360050117

    Article  MathSciNet  MATH  Google Scholar 

  2. Martina, B., Ciatto, G., Pianini, D.: Semantic Release Bot: jakta-bdi/jakta: v0.3.0 (2023). https://doi.org/10.5281/zenodo.7900584

  3. Bordini, R.H., Hübner, J.F., Wooldridge, M.J.: Programming Multi-agent Systems in AgentSpeak using Jason. Wiley, Hoboken (2007). http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470029005.html

  4. Bratman, M., et al.: Intention, Plans, and Practical Reason, vol. 10. Harvard University Press Cambridge, MA (1987)

    Google Scholar 

  5. Calegari, R., Ciatto, G., Mascardi, V., Omicini, A.: Logic-based technologies for multi-agent systems: a systematic literature review. Auton. Agents Multi-Agent Syst. 35(1), 1:1–1:67 (2021). https://doi.org/10.1007/s10458-020-09478-3

  6. Ciatto, G., Calegari, R., Omicini, A.: 2P- Kt: a logic-based ecosystem for symbolic AI. SoftwareX 16, 100817:1–100817:7 (2021). https://doi.org/10.1016/j.softx.2021.100817

  7. 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 (2020). http://ceur-ws.org/Vol-2706/paper14.pdf, 21st Workshop “From Objects to Agents” (WOA 2020), Bologna, Italy, 14–16 September 2020. Proceedings

  8. Cohen, P.R., Levesque, H.J.: Intention is choice with commitment. Artif. Intell. 42(2–3), 213–261 (1990). https://doi.org/10.1016/0004-3702(90)90055-5

    Article  MathSciNet  MATH  Google Scholar 

  9. Collier, R.W., Russell, S., Lillis, D.: Reflecting on agent programming with AgentSpeak(L). In: Chen, Q., Torroni, P., Villata, S., Hsu, J., Omicini, A. (eds.) PRIMA 2015. LNCS (LNAI), vol. 9387, pp. 351–366. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-25524-8_22

    Chapter  Google Scholar 

  10. D’Urso, F., Longo, C.F., Santoro, C.: Programming intelligent IoT systems with a python-based declarative tool. CEUR Workshop Proceedings, vol. 2502, pp. 68–81. CEUR-WS.org (2019). https://ceur-ws.org/Vol-2502/paper5.pdf

  11. Finin, T., Fritzson, R., McKay, D., McEntire, R.: KQML as an agent communication language. In: Proceedings of the Third International Conference on Information and Knowledge Management, pp. 456–463. CIKM 1994, Association for Computing Machinery, New York, NY, USA (1994). https://doi.org/10.1145/191246.191322

  12. Georgeff, M.P., Lansky, A.L.: Reactive reasoning and planning. In: AAAI. vol. 87, pp. 677–682 (1987)

    Google Scholar 

  13. Hindriks, K.V.: Programming rational agents in GOAL. In: El Fallah Seghrouchni, A., Dix, J., Dastani, M., Bordini, R.H. (eds.) Multi-Agent Programming, pp. 119–157. Springer, Boston, MA (2009). https://doi.org/10.1007/978-0-387-89299-3_4

    Chapter  MATH  Google Scholar 

  14. Johann, P., Polonsky, A.: Higher-kinded data types: syntax and semantics. In: 34th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2019, Vancouver, BC, Canada, 24–27 June 2019, pp. 1–13. IEEE (2019). https://doi.org/10.1109/LICS.2019.8785657

  15. Körner, P., et al.: Fifty years of prolog and beyond. Theory Pract. Log. Program. 22(6), 776–858 (2022). https://doi.org/10.1017/S1471068422000102

    Article  MathSciNet  Google Scholar 

  16. Leroy, X., Doligez, D., Frisch, A., Garrigue, J., Rémy, D., Vouillon, J.: The OCaml system: Documentation and user’s manual. INRIA 3, 42

    Google Scholar 

  17. Mazinanian, D., Ketkar, A., Tsantalis, N., Dig, D.: Understanding the use of lambda expressions in Java. Proc. ACM Program. Lang. 1(OOPSLA), 85:1–85:31 (2017). https://doi.org/10.1145/3133909

  18. Nozik, A.: Kotlin language for science and Kmath library. In: AIP Conference Proceedings, vol. 2163(1), 040004 (2019). https://doi.org/10.1063/1.5130103

  19. Omicini, A., Ricci, A., Viroli, M.: Artifacts in the a &a meta-model for multi-agent systems. Auton. Agents Multi Agent Syst. 17(3), 432–456 (2008). https://doi.org/10.1007/s10458-008-9053-x

    Article  Google Scholar 

  20. Palanca, J., Rincon, J.A., Carrascosa, C., Julián, V., Terrasa, A.: A flexible agent architecture in SPADE. In: Dignum, F., Mathieu, P., Corchado, J.M., De La Prieta, F. (eds.) Advances in Practical Applications of Agents, Multi-Agent Systems, and Complex Systems Simulation. The PAAMS Collection, PAAMS 2022. Lecture Notes in Computer Science, vol. 13616, pp. 320–331. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-18192-4_26

  21. Pokahr, A., Braubach, L., Lamersdorf, W.: Jadex: a BDI reasoning engine. In: Bordini, R.H., Dastani, M., Dix, J., El Fallah Seghrouchni, A. (eds.) Multi-Agent Programming. MSASSO, vol. 15, pp. 149–174. Springer, Boston, MA (2005). https://doi.org/10.1007/0-387-26350-0_6

    Chapter  Google Scholar 

  22. Rao, A.S., Georgeff, M.P.: Modeling rational agents within a BDI-architecture. In: Allen, J.F., Fikes, R., Sandewall, E. (eds.) Proceedings of the 2nd International Conference on Principles of Knowledge Representation and Reasoning (KR 1991). Cambridge, MA, USA, 22–25 April 1991, pp. 473–484. Morgan Kaufmann (1991)

    Google Scholar 

  23. Ricci, A., Piunti, M., Viroli, M.: Environment programming in multi-agent systems - an artifact-based perspective. Auton. Agent. Multi-Agent Syst. 23(2), 158–192 (2011). https://doi.org/10.1007/s10458-010-9140-7

    Article  Google Scholar 

  24. Riti, P.: Practical Scala DSLs: Real-World Applications Using Domain Specific Languages. Apress, Berkeley, CA (2018). https://doi.org/10.1007/978-1-4842-3036-7

  25. Stroustrup, B.: The C++ Programming Language, 3rd edn. Addison-Wesley, Boston (1997)

    MATH  Google Scholar 

  26. Winikoff, M.: JACK™ intelligent agents: an industrial strength platform. In: Bordini, R.H., Dastani, M., Dix, J., El Fallah Seghrouchni, A. (eds.) Multi-Agent Programming. MSASSO, vol. 15, pp. 175–193. Springer, Boston, MA (2005). https://doi.org/10.1007/0-387-26350-0_7

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Martina Baiardi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Baiardi, M., Burattini, S., Ciatto, G., Pianini, D. (2023). JaKtA: BDI Agent-Oriented Programming in Pure Kotlin. In: Malvone, V., Murano, A. (eds) Multi-Agent Systems. EUMAS 2023. Lecture Notes in Computer Science(), vol 14282. Springer, Cham. https://doi.org/10.1007/978-3-031-43264-4_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-43264-4_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-43263-7

  • Online ISBN: 978-3-031-43264-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics