{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,9,9]],"date-time":"2025-09-09T22:18:38Z","timestamp":1757456318915,"version":"3.37.3"},"reference-count":72,"publisher":"Cambridge University Press (CUP)","issue":"5-6","license":[{"start":{"date-parts":[[2018,7,18]],"date-time":"2018-07-18T00:00:00Z","timestamp":1531872000000},"content-version":"unspecified","delay-in-days":0,"URL":"https:\/\/www.cambridge.org\/core\/terms"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Theory and Practice of Logic Programming"],"published-print":{"date-parts":[[2018,9]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p>New generations of distributed systems are opening novel perspectives for logic programming (LP): On the one hand, service-oriented architectures represent nowadays the standard approach for distributed systems engineering; on the other hand, pervasive systems mandate for situated intelligence. In this paper, we introduce the notion of<jats:italic>Logic Programming as a Service<\/jats:italic>(LPaaS) as a means to address the needs of pervasive intelligent systems through logic engines exploited as a distributed service. First, we define the abstract architectural model by re-interpreting classical LP notions in the new context; then we elaborate on the nature of LP interpreted as a service by describing the basic LPaaS interface. Finally, we show how LPaaS works in practice by discussing its implementation in terms of distributed tuProlog engines, accounting for basic issues such as interoperability and configurability.<\/jats:p>","DOI":"10.1017\/s1471068418000364","type":"journal-article","created":{"date-parts":[[2018,7,18]],"date-time":"2018-07-18T18:13:12Z","timestamp":1531937592000},"page":"846-873","source":"Crossref","is-referenced-by-count":10,"title":["Logic programming as a service"],"prefix":"10.1017","volume":"18","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-3794-2942","authenticated-orcid":false,"given":"ROBERTA","family":"CALEGARI","sequence":"first","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"ENRICO","family":"DENTI","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"STEFANO","family":"MARIANI","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"ANDREA","family":"OMICINI","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"56","published-online":{"date-parts":[[2018,7,18]]},"reference":[{"key":"S1471068418000364_ref4","first-page":"162","volume-title":"International Joint Conference on Theory and Practice of Software Development (TAPSOFT '89)","author":"Brogi","year":"1989"},{"key":"S1471068418000364_ref56","unstructured":"Payara. 2017. Home Page. URL: http:\/\/www.payara.fish. Accessed 10 May 2018."},{"key":"S1471068418000364_ref29","doi-asserted-by":"publisher","DOI":"10.1109\/TSC.2010.3"},{"key":"S1471068418000364_ref18","doi-asserted-by":"crossref","unstructured":"Denti E. , Omicini A. and Ricci A. 2001. tuProlog: A light-weight Prolog for Internet applications and infrastructures. In Proc. of 3rd International Symposium Practical Aspects of Declarative Languages (PADL 2001), Las Vegas, NV, USA, 11\u201312 Mar. 2001, I. V. Ramakrishnan , Ed. Lecture Notes in Computer Science, vol. 1990. Springer, Berlin, Heidelberg, 184\u2013198.","DOI":"10.1007\/3-540-45241-9_13"},{"key":"S1471068418000364_ref25","doi-asserted-by":"publisher","DOI":"10.1145\/514183.514185"},{"key":"S1471068418000364_ref12","doi-asserted-by":"publisher","DOI":"10.1109\/TNET.2017.2705239"},{"key":"S1471068418000364_ref28","doi-asserted-by":"publisher","DOI":"10.1145\/2363.2433"},{"key":"S1471068418000364_ref60","doi-asserted-by":"publisher","DOI":"10.1007\/s00779-003-0251-x"},{"key":"S1471068418000364_ref8","unstructured":"Calegari R. , Denti E. , Mariani S. and Omicini A. 2017. Logic programming as a service (LPaaS): Intelligence for the IoT. In Proc. of IEEE 14th International Conference on Networking, Sensing and Control (ICNSC 2017), G. Fortino , M. Zhou , Z. Lukszo , A. V. Vasilakos , F. Basile , C. Palau , A. Liotta , M. P. Fanti , A. Guerrieri and A. Vinci , Eds. IEEE, Los Alamitos, CA, USA, 72\u201377."},{"key":"S1471068418000364_ref50","doi-asserted-by":"crossref","first-page":"135","DOI":"10.3233\/AIS-120194","article-title":"Ontologies for interaction: Enabling serendipitous interoperability in smart environments","volume":"5","author":"Niezen","year":"2013","journal-title":"Journal of Ambient Intelligence and Smart Environments"},{"key":"S1471068418000364_ref13","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-4684-3384-5_11"},{"key":"S1471068418000364_ref49","doi-asserted-by":"publisher","DOI":"10.2298\/CSIS130209002N"},{"key":"S1471068418000364_ref15","doi-asserted-by":"crossref","unstructured":"Clark K. L. and Gregory S. 1981. A relational language for parallel programming. In 1981 Conference on Functional Programming Languages and Computer Architecture (FPCA '81). ACM, New York, NY, USA, 171\u2013178.","DOI":"10.1145\/800223.806776"},{"key":"S1471068418000364_ref6","doi-asserted-by":"publisher","DOI":"10.1016\/0743-1066(94)90032-9"},{"key":"S1471068418000364_ref46","first-page":"329","volume-title":"Implementations of Prolog","author":"Monteiro","year":"1984"},{"key":"S1471068418000364_ref34","unstructured":"J2EE. 2017. Home Page. URL: http:\/\/www.oracle.com\/technetwork\/java\/javaee\/. Accessed 10 May 2018."},{"key":"S1471068418000364_ref24","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-4842-1275-2"},{"key":"S1471068418000364_ref27","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-4684-3384-5"},{"key":"S1471068418000364_ref31","doi-asserted-by":"publisher","DOI":"10.1016\/j.pmcj.2013.10.010"},{"key":"S1471068418000364_ref1","doi-asserted-by":"crossref","unstructured":"Alkhabbas F. , Spalazzese R. and Davidsson P. 2017. Architecting emergent configurations in the internet of things. In Proc. of IEEE International Conference on Software Architecture (ICSA). IEEE, Los Alamitos, CA, USA, 221\u2013224.","DOI":"10.1109\/ICSA.2017.37"},{"key":"S1471068418000364_ref42","doi-asserted-by":"publisher","DOI":"10.1016\/j.engappai.2014.10.006"},{"key":"S1471068418000364_ref45","doi-asserted-by":"crossref","unstructured":"Michelson B. M. 2006. Event-driven architecture overview: Event-driven SOA is just part of the EDA story. Report, Patricia Seybold Group. Feb.","DOI":"10.1571\/bda2-2-06cc"},{"key":"S1471068418000364_ref17","doi-asserted-by":"publisher","DOI":"10.1145\/1721654.1721667"},{"key":"S1471068418000364_ref20","doi-asserted-by":"publisher","DOI":"10.1007\/s007790170019"},{"key":"S1471068418000364_ref2","doi-asserted-by":"publisher","DOI":"10.1016\/j.pmcj.2009.06.002"},{"key":"S1471068418000364_ref47","unstructured":"MQTT. 2017. Home Page. URL: http:\/\/mqtt.org. Accessed 10 May 2018."},{"key":"S1471068418000364_ref10","doi-asserted-by":"crossref","unstructured":"Cannata A. , Karnouskos S. and Taisch M. 2010. Evaluating the potential of a service oriented infrastructure for the factory of the future. In Proc. of 8th IEEE International Conference on Industrial Informatics (INDIN 2010). IEEE, Los Alamitos, CA, USA, 592\u2013597.","DOI":"10.1109\/INDIN.2010.5549675"},{"key":"S1471068418000364_ref54","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-14309-0_14"},{"key":"S1471068418000364_ref7","doi-asserted-by":"publisher","DOI":"10.3233\/FI-2018-1695"},{"key":"S1471068418000364_ref40","doi-asserted-by":"publisher","DOI":"10.1017\/S0269888905000263"},{"key":"S1471068418000364_ref30","doi-asserted-by":"crossref","unstructured":"Guinard D. , Trifa V. and Wilde E. 2010b. A resource oriented architecture for the web of things. In Proc. Internet of Things (IOT). IEEE, Los Alamitos, CA, USA, 1\u20138.","DOI":"10.1109\/IOT.2010.5678452"},{"key":"S1471068418000364_ref32","doi-asserted-by":"publisher","DOI":"10.1109\/MC.2015.152"},{"key":"S1471068418000364_ref16","unstructured":"Cunha J. C. , Ferreira M. C. and Pereira L. M. 1989. Programming in Delta Prolog. In Proc. of the 6th International Conference on Logic Programming (ICLP 1989), Lisbon, Portugal, 19\u201323 June 1989, G. Levi and M. Martelli , Eds. MIT Press, Cambridge, MA, USA, 487\u2013504."},{"key":"S1471068418000364_ref44","doi-asserted-by":"publisher","DOI":"10.1504\/IJGUC.2017.085917"},{"key":"S1471068418000364_ref59","doi-asserted-by":"publisher","DOI":"10.1109\/MPRV.2004.1316821"},{"key":"S1471068418000364_ref43","first-page":"137","volume-title":"1985\u20131995: Ten years of Logic Programming in Italy","author":"Martelli","year":"1995"},{"key":"S1471068418000364_ref62","unstructured":"Ricci A. , Viroli M. , Omicini A. , Mariani S. , Croatti A. and Pianini D. 2017. Spatial Tuples: Augmenting physical reality with tuple spaces. In Intelligent Distributed Computing X. Proc. of the 10th International Symposium on Intelligent Distributed Computing \u2013 IDC 2016, Paris, France, October 10\u201312 2016, C. Badica , A. El Fallah Seghrouchni , A. Beynier , D. Camacho , C. Herpson , K. Hindriks and P. Novais , Eds. Studies in Computational Intelligence, vol. 678. Springer, Berlin, Heidelberg, 121\u2013130."},{"key":"S1471068418000364_ref11","doi-asserted-by":"publisher","DOI":"10.1017\/S0269888904000025"},{"key":"S1471068418000364_ref19","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-61411-8"},{"key":"S1471068418000364_ref33","doi-asserted-by":"crossref","unstructured":"Hu B. , Wang Z. and Dong Q. 2012. A modeling and reasoning approach using description logic for context-aware pervasive computing. In Proc. of Emerging Research in Artificial Intelligence and Computational Intelligence: International Conference, AICI 2012, Chengdu, China, October 26\u201328, 2012, J. Lei , F. L. Wang , H. Deng and D. Miao , Eds. Communications in Computer and Information Science, vol. 315. Springer, Berlin, Heidelberg, 155\u2013165.","DOI":"10.1007\/978-3-642-34240-0_21"},{"key":"S1471068418000364_ref37","unstructured":"jose.4.j. 2017. Home Page. URL: http:\/\/bitbucket.org\/b_c\/jose4j\/. Accessed 10 May 2018."},{"key":"S1471068418000364_ref21","unstructured":"EJB. Home Page. URL: http:\/\/www.oracle.com\/technetwork\/java\/javaee\/ejb\/. Accessed 10 May 2018."},{"volume-title":"Service-Oriented Architecture: Concepts, Technology, and Design","year":"2005","author":"Erl","key":"S1471068418000364_ref22"},{"key":"S1471068418000364_ref23","doi-asserted-by":"crossref","unstructured":"Etter R. , Costa P. D. , and Broens T. 2006. A rule-based approach towards context-aware user notification services. In Proc. of 2006 ACS\/IEEE International Conference on Pervasive Services (ICPS 2006). IEEE, Lyon, France, 281\u2013284.","DOI":"10.1109\/PERSER.2006.1652242"},{"key":"S1471068418000364_ref48","unstructured":"Naish L. 1988. Parallelizing NU-Prolog. In Proc. of the 5th International Conference and Symposium on Logic Programming, Seattle, Washington, 15\u201319 Aug. 1988, R. A. Kowalski and K. A. Bowen , Eds. MIT Press, Cambridge, MA, USA, 1546\u20131564."},{"key":"S1471068418000364_ref55","first-page":"5","article-title":"Distributed intelligence: Overview of the field and its application in multi-robot systems","volume":"2","author":"Parker","year":"2008","journal-title":"Journal of Physical Agents"},{"key":"S1471068418000364_ref61","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-4684-3384-5_3"},{"key":"S1471068418000364_ref14","doi-asserted-by":"crossref","unstructured":"Clark K. L. 1987. PARLOG: The language and its applications. In Proc. of PARLE Parallel Architectures and Languages Europe. Volume II: Parallel Languages. Eindhoven, The Netherlands, 15\u201319 June 1987, J. W. de Bakker , A. J. Nijman , and P. C. Treleaven , Eds. Lecture Notes in Computer Science, vol. 259. Springer, Berlin, Heidelberg, 30\u201353.","DOI":"10.1007\/3-540-17945-3_2"},{"key":"S1471068418000364_ref53","doi-asserted-by":"publisher","DOI":"10.1023\/A:1010060322135"},{"volume-title":"Microservices AntiPatterns and Pitfalls","year":"2016","author":"Richards","key":"S1471068418000364_ref63"},{"key":"S1471068418000364_ref41","unstructured":"LPaaS. 2018. Home page. URL: http:\/\/lpaas.apice.unibo.it. Accessed 10 May 2018."},{"volume-title":"Clever Algorithms: Nature-Inspired Programming Recipes","year":"2011","author":"Brownlee","key":"S1471068418000364_ref5"},{"key":"S1471068418000364_ref64","doi-asserted-by":"publisher","DOI":"10.1145\/321250.321253"},{"key":"S1471068418000364_ref9","unstructured":"Calegari R. , Denti E. , Mariani S. and Omicini A. 2018. Logic programming as a service in multi-agent systems for the Internet of Things. International Journal of Grid and Utility Computing (in press). URL: http:\/\/www.inderscience.com\/info\/ingeneral\/forthcoming.php?jcode=ijgu"},{"key":"S1471068418000364_ref58","doi-asserted-by":"publisher","DOI":"10.1109\/ACCESS.2017.2679338"},{"key":"S1471068418000364_ref51","first-page":"38","article-title":"The blackboard model of problem solving and the evolution of blackboard architectures","volume":"7","author":"Nii","year":"1986","journal-title":"The AI Magazine"},{"key":"S1471068418000364_ref35","unstructured":"Java Persistence API. 2017. Home Page. URL: http:\/\/docs.oracle.com\/javaee\/6\/tutorial\/doc\/bnbpz.html. Accessed 10 May 2018."},{"key":"S1471068418000364_ref38","unstructured":"JSON. 2017. Home Page. URL: http:\/\/www.json.org. Accessed 10 May 2018."},{"key":"S1471068418000364_ref39","doi-asserted-by":"crossref","unstructured":"Karnouskos S. , Colombo A. W. , Bangemann T. , Manninen K. , Camp R. , Tilly M. , Stluka P. , Jammes F. , Delsing J. and Eliasson J. 2012. A SOA-based architecture for empowering future collaborative cloud-based industrial automation. In Proc. of 38th Annual Conference on IEEE Industrial Electronics Society (IECON 2012). IEEE, Los Alamitos, CA, USA, 5766\u20135772.","DOI":"10.1109\/IECON.2012.6389042"},{"key":"S1471068418000364_ref57","first-page":"193","volume-title":"Managing Web Service Quality: Measuring Outcomes and Effectiveness","author":"Pontelli","year":"2008"},{"key":"S1471068418000364_ref3","doi-asserted-by":"publisher","DOI":"10.1145\/114005.102807"},{"key":"S1471068418000364_ref26","doi-asserted-by":"crossref","unstructured":"Finin T. , Joshi A. , Kagal L. , Ratsimore O. , Korolev V. and Chen H. 2001. Information agents for mobile and embedded devices. In Proc. of 5th InternationalWorkshop Cooperative Information Agents V (CIA 2001), Modena, Italy, 6\u20138 May 2001, M. Klusch and F. Zambonelli , Eds. Springer, Berlin, Heidelberg, 264\u2013286.","DOI":"10.1007\/3-540-44799-7_30"},{"key":"S1471068418000364_ref69","doi-asserted-by":"crossref","unstructured":"Ueda K. 1986. Guarded Horn clauses. In Proc. of the 4th Conference on Logic Programming '85, Tokyo, Japan, 1\u20133 July 1985, E. Wada , Ed. Lecture Notes in Computer Science, vol. 221. Springer, Berlin, Heidelberg, 168\u2013179.","DOI":"10.1007\/3-540-16479-0_17"},{"key":"S1471068418000364_ref52","doi-asserted-by":"crossref","unstructured":"Oliya M. and Pung H. K. 2011. Towards incremental reasoning for context aware systems. In Proc. of Advances in Computing and Communications: 1st International Conference, ACC 2011, Kochi, India, July 22-24, 2011, Part I, A. Abraham , J. Lloret Mauri , J. F. Buford , J. Suzuki and S. M. Thampi , Eds. Communications in Computer and Information Science, vol. 190. Springer, Berlin, Heidelberg, 232\u2013241.","DOI":"10.1007\/978-3-642-22709-7_24"},{"key":"S1471068418000364_ref72","doi-asserted-by":"publisher","DOI":"10.1016\/j.pmcj.2014.12.002"},{"key":"S1471068418000364_ref65","doi-asserted-by":"crossref","unstructured":"Salber D. , Dey A. K. and Abowd G. D. 1999. The context toolkit: Aiding the development of context-enabled applications. In Proc. of SIGCHI Conference on Human Factors in Computing Systems (CHI '99). ACM, New York, NY, USA, 434\u2013441.","DOI":"10.1145\/302979.303126"},{"key":"S1471068418000364_ref66","unstructured":"Schulte R. W. and Natis Y. V. 2003. Event-driven architecture complements SOA. Research note, Gartner. 8 July."},{"key":"S1471068418000364_ref68","doi-asserted-by":"publisher","DOI":"10.1007\/s11023-016-9416-z"},{"volume-title":"Concurrent Prolog \u2013 Vol. 1: Collected Papers","year":"1987","author":"Shapiro","key":"S1471068418000364_ref67"},{"key":"S1471068418000364_ref70","doi-asserted-by":"crossref","unstructured":"Wang H. , Mehta R. , Supakkul S. and Chung L. 2011. Rule-based context-aware adaptation using a goal-oriented ontology. In Proc. of 2011 International Workshop on Situation Activity & Goal Awareness (SAGAware '11). ACM, New York, NY, USA, 67\u201376.","DOI":"10.1145\/2030045.2030061"},{"key":"S1471068418000364_ref71","unstructured":"Wolfram D. A. , Maher M. J. and Lassez J.-L. 1984. A unified treatment of resolution strategies for logic programs. In Proc. of 2nd International Conference on Logic Programming (ICLP 1984), S.-\u00c5. T\u00e4rnlund , Ed. Association for Logic Programming, Uppsala, Sweden, 263\u2013276."},{"key":"S1471068418000364_ref36","unstructured":"Jersey. 2017. Home Page. URL: http:\/\/jersey.java.net. Accessed 10 May 2018."}],"container-title":["Theory and Practice of Logic Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.cambridge.org\/core\/services\/aop-cambridge-core\/content\/view\/S1471068418000364","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2020,11,6]],"date-time":"2020-11-06T04:37:46Z","timestamp":1604637466000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S1471068418000364\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2018,7,18]]},"references-count":72,"journal-issue":{"issue":"5-6","published-print":{"date-parts":[[2018,9]]}},"alternative-id":["S1471068418000364"],"URL":"https:\/\/doi.org\/10.1017\/s1471068418000364","relation":{},"ISSN":["1471-0684","1475-3081"],"issn-type":[{"type":"print","value":"1471-0684"},{"type":"electronic","value":"1475-3081"}],"subject":[],"published":{"date-parts":[[2018,7,18]]}}}