2P-Kt: logic programming with objects & functions in Kotlin

   page       BibTeX_logo.png   
Roberta Calegari, Giovanni Ciatto, Enrico Denti, Andrea Omicini, Giovanni Sartor (eds.)
WOA 2020 – 21th Workshop “From Objects to Agents”, pages 219–236
CEUR Workshop Proceedings (AIxIA Series) 2706
Sun SITE Central Europe, RWTH Aachen University, Aachen, Germany
October 2020

Mainstream programming languages nowadays tends to be more and more multi-paradigm ones, by integrating diverse programming paradigms—e.g., object-oriented programming (OOP) and functional programming (FP). Logic-programming (LP) is a successful paradigm that has contributed to many relevant results in the areas of symbolic AI and multi-agent systems, among the others. Whereas Prolog, the most successful LP language, is typically integrated with mainstream languages via foreign language interfaces, in this paper we propose an alternative approach based on the notion of domain-specific language (DSL), which makes LP available to OOP programmers straightforwardly within their OO language of choice. In particular, we present a Kotlin DSL for Prolog, showing how the Kotlin multi-paradigm (OOP + FP) language can be enriched with LP in a straightforward and effective way. Since it is based on the interoperable 2P-Kt project, our technique also enables the creation of similar DSL on top of other high-level languages such as Scala or JavaScript—thus paving the way towards a more general adoption of LP in general-purpose programming environments.

keywordsobject-oriented programming, multi-paradigm languages, domain-specific languages, Kotlin
reference talk
page_white_powerpoint2P-Kt: logic programming with objects & functions in Kotlin (WOA 2020, 16/09/2020) — Giovanni Ciatto (Andrea Omicini, Enrico Denti, Enrico Siboni, Giovanni Ciatto, Roberta Calegari)
origin event
journal or series
book CEUR Workshop Proceedings (CEUR-WS.org)
container publication
page_white_acrobatWOA 2020 – 21st Workshop “From Objects to Agents” (edited volume, 2020) — Roberta Calegari, Giovanni Ciatto, Enrico Denti, Andrea Omicini, Giovanni Sartor
funding project
wrenchAI4EU — A European AI On Demand Platform and Ecosystem (01/01/2019–31/12/2021)
wrenchCompuLaw — Computable Law (01/11/2019–31/10/2025)
works as
reference publication for talk
page_white_powerpoint2P-Kt: logic programming with objects & functions in Kotlin (WOA 2020, 16/09/2020) — Giovanni Ciatto (Andrea Omicini, Enrico Denti, Enrico Siboni, Giovanni Ciatto, Roberta Calegari)