Logic Programming in Non-Conventional Environments
Total Page:16
File Type:pdf, Size:1020Kb
Logic Programming in non-conventional environments Stefano Germano Nov 2014 – Oct 2017 Version: 2.0 Department of Mathematics and Computer Science Doctoral Degree in Mathematics and Computer Science XXX Cycle – S.S.D. INF/01 Doctoral Thesis Logic Programming in non-conventional environments Stefano Germano Coordinator Prof. Nicola Leone Supervisor Prof. Giovambattista Ianni Nov 2014 – Oct 2017 This work is licensed under a Creative Commons ‘Attribution 4.0 International’ licence. Stefano Germano Logic Programming in non-conventional environments Doctoral Thesis, Nov 2014 – Oct 2017 Coordinator of the Doctoral Programme: Prof. Nicola Leone Supervisor: Prof. Giovambattista Ianni University of Calabria Doctoral Degree in Mathematics and Computer Science Department of Mathematics and Computer Science Via Pietro Bucci – I-87036 Arcavacata di Rende, CS – Italy Abstract Logic Programming became a very useful paradigm in many different areas and thus several languages (and solvers) have been created to support various kinds of reasoning tasks. However, in the last decades, thanks also to results in the Com- putational Complexity area, the weaknesses and the limits of this formalism have been revealed. Therefore, we decided to study solutions that would allow the use of the Logic Programming paradigm in contexts, such as Stream Reasoning, Big Data or Games’ AI, that have very specific constraints that make the practical use of logic- based formalisms not so straightforward. Logic Programming is best used for problems where a properly defined search space can be identified and has to be explored in full. For this reason, almost all the approaches that have been tried so far, have focused on problems where the amount of input data is not huge and is stored in a few well-defined sources, which are often completely available at the beginning of the computation. Some interesting ideas and approaches in the mentioned fields have been already introduced, however, they are in a preliminary stage and often are tailored to a specific problem, and do not allow the users to perform “complex” reasoning on the data. In order to make the utilisation of this paradigm computationally feasible and reliable in contexts where the reasoning methods have to handle a huge amount of data that “expires” soon, i.e., become soon useless, and quickly react to them, new solutions have to be introduced. In this Thesis, we illustrate how Logic Programming can play a role in such challen- ging scenarios. We both describe the general approaches taken, and how these solu- tions have been used in several application contexts, some of which were milestones of large-scale international projects. We found that combining different reasoning methods and technologies is one of the crucial methodologies to adopt in order to effectively tackle and solve these challenges. Moreover, we identify the methodo- logical gaps that are not yet closed, and prevent the large adoption of logic-based programming techniques. v Sommario La Programmazione Logica è diventata un paradigma molto utile in diverse aree e sono perciò stati creati diversi linguaggi (e risolutori) per supportare vari tipi di operazioni di ragionamento. Tuttavia negli ultimi decenni, grazie anche ai risultati ottenuti nell’area della Complessità computazionale, si sono evidenziate le debolez- ze e i limiti di questo formalismo. Abbiamo quindi deciso di studiare soluzioni che permettessero l’uso del paradigma della Programmazione Logica in contesti come Stream Reasoning, Big Data o Intelligenza Artificiale nei (Video-)Giochi; contesti che hanno vincoli molto specifici che rendono l’uso pratico di formalismi basati sulla logica non particolarmente semplice. La Programmazione Logica è utilizzata soprattutto per i problemi in cui è possibile identificare uno spazio di ricerca ben definito e che deve essere esplorato a fondo. Per questo motivo, quasi tutti gli approcci finora sperimentati si sono concentrati su problemi in cui la quantità di dati di input non è enorme e viene memorizzata in poche fonti ben definite che sono spesso completamente disponibili all’inizio del calcolo. Sono già state introdotte alcune idee e approcci interessanti nei settori citati, ma sono in fase preliminare e spesso sono su misura per un problema specifico, e non consentono di svolgere ragionamenti “complessi” sui dati. Per rendere l’utilizzo di questo paradigma computazionale praticabile e affidabile in contesti in cui i metodi di ragionamento devono gestire un’enorme quantità di dati che “scadono” presto, cioè diventano presto inutilizzabili, e reagiscono rapidamente ad essi, è necessario introdurre nuove soluzioni. In questa tesi illustriamo come la Programmazione Logica possa giocare un ruolo im- portante in scenari così impegnativi. Descriviamo sia gli approcci generali adottati sia il modo in cui queste soluzioni sono state utilizzate in diversi contesti applicativi, alcuni dei quali sono stati fondamentali per grandi progetti internazionali. Abbia- mo constatato che la combinazione di diversi metodi e tecnologie di ragionamento è una delle metodologie cruciali da adottare per affrontare e risolvere efficacemente queste sfide. Inoltre segnaliamo quali sono le carenze metodologiche attualmente non colmate che impediscono l’adozione su vasta scala di tecniche di programma- zione basate sulla logica. vi Dedicata alla mia famiglia Meiner Familie gewidmet Dedicada a mi familia I gcomóradh mo mhuintir Dédiée à ma famille Dedicated to my family “The world is full of obvious things which nobody by any chance ever observes.” – Arthur Conan Doyle, The Hound of the Baskervilles Acknowledgements During the journey ended up in this Thesis I have actually met many people, in sev- eral places, and I must admit that I learned something from each of them. Besides, they were important for me not only from a professional point of view but also from a personal one. However, I realised they are too many to thank them one by one for what they have done for me. Therefore, I would simply say thanks to all of you, you made this journey very interesting and enjoyable. Nonetheless, I would especially like to thank “my team” (as my mum usually calls them) who have assisted, supported and endorsed me; without them none of what I achieved in the last years would have been possible. Furthermore, I thankfully acknowledge the collaboration with other students and researchers in various universities, which motivated and allowed me to produce this contribution, among which the Department of Mathematics and Computer Science (DeMaCS)1 at the Università della Calabria (UNICAL)2, the Knowledge-Based Systems Group (KBS)3 of the Faculty of Informatics4 at the Technische Universität Wien (TU Wien)5, the Unit for Reasoning and Querying (URQ)6 of the INSIGHT Centre for Data Analytics7 at the National University of Ireland (NUI) Galway8, the Database group9 of the Department of Computer Science10 at the University of Oxford11. It is important to notice that part of the work described in this Thesis has already been acknowledged by the scientific community in international Journals and Con- ferences. In particular: 1https://www.mat.unical.it 2http://unical.it 3http://www.kr.tuwien.ac.at 4http://www.informatik.tuwien.ac.at 5https://www.tuwien.ac.at 6https://nuig.insight-centre.org/urq 7https://www.insight-centre.org 8http://www.nuigalway.ie 9http://www.cs.ox.ac.uk/isg/db 10http://www.cs.ox.ac.uk 11http://www.ox.ac.uk xi > D. Fuscà, S. Germano, J. Zangari, F. Calimeri and S. Perri. ‘Answer Set Programming and Declarative Problem Solving in Game AIs’. In: [45]. 2013, pp. 81–88. URL: http: //ceur-ws.org/Vol-1107/paper9.pdf. > F. Calimeri, M. Fink, S. Germano, G. Ianni, C. Redl and A. Wimmer. ‘AngryHEX: an Artificial Player for Angry Birds Based on Declarative Knowledge Bases’. In: [45]. 2013, pp. 29–35. URL: http://ceur-ws.org/Vol-1107/paper10.pdf. > S. Germano, T. Pham and A. Mileo. ‘Web Stream Reasoning in Practice: On the Expressiv- ity vs. Scalability Tradeoff’. In: Proceedings of RR 2015, pp. 105–112. DOI: 10.1007/978- 3-319-22002-4_9. > A. Mileo, S. Germano, T.-L. Pham, D. Puiu, D. Kuemper and M. I. Ali. User-Centric Decision Support in Dynamic Environments. CityPulse - Real-Time IoT Stream Pro- cessing and Large-scale Data Analytics for Smart City Applications. Report - Project Delivery. Version V1.0-Final. NUIG, SIE, UASO, 31st Aug. 2015. URL: http : / / cordis . europa . eu / docs / projects / cnect / 5 / 609035 / 080 / deliverables / 001 - 609035CITYPULSED52renditionDownload.pdf (visited on 25th Sept. 2017). > F. Calimeri, D. Fuscà, S. Germano, S. Perri and J. Zangari. ‘Embedding ASP in mobile systems: discussion and preliminary implementations’. In: Proceedings of ASPOCP 2015, workshop of ICLP. > F. Calimeri, M. Fink, S. Germano, A. Humenberger, G. Ianni, C. Redl, D. Stepanova, A. Tucci and A. Wimmer. ‘Angry-HEX: An Artificial Player for Angry Birds Based on Declarative Knowledge Bases’. In: TCIAIG 8.2 (2016), pp. 128–139. DOI: 10.1109/ TCIAIG.2015.2509600. > F. Calimeri, D. Fuscà, S. Germano, S. Perri and J. Zangari. ‘Boosting the Development of ASP-Based Applications in Mobile and General Scenarios’. In: Proceedings of AI*IA 2016, pp. 223–236. DOI: 10.1007/978-3-319-49130-1_17. > D. Fuscà, S. Germano, J. Zangari, M. Anastasio, F. Calimeri and S. Perri. ‘A framework for easing the development of applications embedding answer set programming’. In: Proceedings of PPDP 2016, pp. 38–49. DOI: 10.1145/2967973.2968594. > T. Pham, S. Germano, A. Mileo, D. Kümper and M. I. Ali. ‘Automatic configuration of smart city applications for user-centric decision support’. In: Proceedings of ICIN 2017, pp. 360–365. DOI: 10.1109/ICIN.2017.7899441. > S. Germano, F. Calimeri and E. Palermiti. ‘LoIDE: a web-based IDE for Logic Pro- gramming - Preliminary Technical Report’. In: CoRR abs/1709.05341 (2017). arXiv: 1709.05341. xii > F. Calimeri, D. Fuscà, S. Germano, S. Perri and J. Zangari. ‘A framework for easing the development of applications embedding answer set programming’.