Skip to main content
Log in

Fostering the Use of Declarative Formalisms for Real-World Applications: The EmbASP Framework

  • Research Paper
  • Published:
New Generation Computing Aims and scope Submit manuscript

Abstract

Thanks to a number of efficient implementations, the use of logic formalisms for problem-solving has been increased in several real-world domains. This is the case, for instance, of action languages, such as planning domain definition language (PDDL), or answer set programming (ASP), which is a well-established declarative problem-solving paradigm that became widely used in AI and recognized as a powerful tool for knowledge representation and reasoning (KRR). As the application scenarios widened, the need for proper development tools and interoperability mechanisms for easing interaction and integration between declarative logic-based systems and external systems clearly emerged. In this work, we present a framework for integrating the KRR capabilities of, possibly more than one, declarative formalisms into generic applications developed by means of different programming paradigms. We show the use of the framework by illustrating proper specializations for two formalisms, namely ASP and PDDL, along with specializations for some relevant systems over different platforms, including the mobile setting.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

Notes

  1. Android applications can be written only in Java (with some parts in C/C++), and, recently, also in Kotlin.

  2. https://unity3d.com/unity.

  3. Unity is currently the leader of the global game development engine market, holding the 45% share, nearly three times the size of its nearest competitor.

  4. http://www.cs.toronto.edu/~sheila/2542/s14/A1/introtopddl2.pdf.

  5. https://www.oracle.com/java.

  6. http://developer.android.com.

  7. https://docs.oracle.com/javase/tutorial/java/annotations/.

  8. https://developer.android.com/tools/sdk/ndk.

  9. http://docs.oracle.com/javase/8/docs/technotes/guides/jni.

  10. http://developer.android.com/guide/topics/resources.

  11. We remark here that the Cell class could be reused from within any other application that makes use of cell objects represented by row, column and value, as, for instance, an application for playing the game of Checkers, or Chess.

  12. https://developer.android.com/reference/android/app/Activity.html.

  13. https://www.mat.unical.it/calimeri/projects/loide.

  14. https://msdn.microsoft.com/en-us/library/mt653979.

  15. https://msdn.microsoft.com/en-us/library/mt656691.

  16. It is worth noting that this does not imply “extra” work with the Python version, as the two Annotations must be declared an implemented also in the Java version.

References

  1. Adrian, W.T., Alviano, M., Calimeri, F., Cuteri, B., Dodaro, C., Faber, W., Fuscà, D., Leone, N., Manna, M., Perri, S., Ricca, F., Veltri, P., Zangari, J.: The ASP system DLV: advancements and applications. KI-Künstliche Intelligenz (2018). https://doi.org/10.1007/s13218-018-0533-0

  2. Alviano, M., Calimeri, F., Dodaro, C., Fuscà, D., Leone, N., Perri, S., Ricca, F., Veltri, P., Zangari, J.: The ASP system DLV2. In: Balduccini, M., Janhunen, T. (eds.) Logic programming and nonmonotonic reasoning—14th International Conference, LPNMR 2017, Espoo, Finland, July 3–6, 2017, Proceedings, lecture notes in computer science, vol. 10377, pp. 215–221. Springer, Berlin (2017). https://doi.org/10.1007/s13218-018-0533-0

    Google Scholar 

  3. Alviano, M., Dodaro, C., Leone, N., Ricca, F.: Advances in WASP. In: Calimeri, F., Ianni, G., Truszczynski, M. (eds.) Logic programming and nonmonotonic reasoning—13th International Conference, LPNMR 2015, Lexington, KY, USA, September 27–30, 2015. Proceedings, LNCS, vol. 9345, pp. 40–54. Springer, Berlin (2015). https://doi.org/10.1007/978-3-319-61660-5_19

    Google Scholar 

  4. Baral, C.: Knowledge representation, reasoning and declarative problem solving. Cambridge University Press, Cambridge (2003)

    Book  MATH  Google Scholar 

  5. Brewka, G., Eiter, T., Truszczynski, M.: Answer set programming at a glance. Commun. ACM 54(12), 92–103 (2011)

    Article  Google Scholar 

  6. Buccafurri, F., Leone, N., Rullo, P.: Strong and weak constraints in disjunctive datalog. In: Dix, J., Furbach, U., Nerode, A. (eds.) Proceedings of the 4th international conference on logic programming and non-monotonic reasoning (LPNMR’97), Lecture Notes in AI (LNAI), vol. 1265, pp. 2–17. Springer, Dagstuhl, Germany (1997)

  7. Calimeri, F., Faber, W., Gebser, M., Ianni, G., Kaminski, R., Krennwallner, T., Leone, N., Ricca, F., Schaub, T.: Asp-core-2: input language format (2012)

  8. Calimeri, F., Fuscà, D., Germano, S., Perri, S., Zangari, J.: Embedding ASP in mobile systems: discussion and preliminary implementations. In: Proceedings of the eighth workshop on answer set programming and other computing paradigms (ASPOCP 2015), workshop of the 31st International Conference on Logic Programming (ICLP 2015) (2015)

  9. Calimeri, F., Fuscà, D., Perri, S., Zangari, J.: I-DLV: the new intelligent grounder of DLV. Intelligenza Artificiale 11(1), 5–20 (2017). https://doi.org/10.3233/IA-170104

    Article  Google Scholar 

  10. Calimeri, F., Gebser, M., Maratea, M., Ricca, F.: Design and results of the fifth answer set programming competition. Artif. Intell. 231, 151–181 (2016). https://doi.org/10.1016/j.artint.2015.09.008

    Article  MathSciNet  MATH  Google Scholar 

  11. Calimeri, F., Germano, S., Ianni, G., Pacenza, F., Perri, S., Zangari, J.: Integrating rule-based AI tools into mainstream game development. In: Benzmüller, C., Ricca, F., Parent, X., Roman, D. (eds.) Rules and Reasoning—Second International Joint Conference, RuleML+RR 2018, Luxembourg, September 18–21, 2018, Proceedings, lecture notes in computer science, vol. 11092, pp. 310–317. Springer, Berlin (2018). https://doi.org/10.1007/978-3-319-99906-7_23

    Chapter  Google Scholar 

  12. De Pooter, S., Wittocx, J., Denecker, M.: A prototype of a knowledge-based programming environment. In: Applications of declarative programming and knowledge management, Springer, pp. 279–286 (2013)

  13. Edelkamp, S., Hoffmann, J.: Pddl2. 2: The language for the classical part of the 4th international planning competition. 4th International Planning Competition (IPC04), at ICAPS04 (2004)

  14. Eiter, T., Faber, W., Leone, N., Pfeifer, G.: Declarative problem-solving using the dlv system. In: Logic-based artificial intelligence, Springer, pp. 79–103 (2000)

  15. Eiter, T., Ianni, G., Krennwallner, T.: answer set programming: a primer. Reasoning web. Semantic technologies for information systems, 5th international summer school—tutorial lectures, pp. 40–110. Brixen-Bressanone, Italy (2009)

  16. Eiter, T., Redl, C., Schüller, P.: Problem solving using the HEX family. In: Beierle, C., Brewka, G., Thimm, M. (eds.) Computational models of rationality, essays dedicated to Gabriele Kern–Isberner on the occasion of her 60th birthday, pp. 150–174. College Publications (2016)

  17. The EmbASP framework. https://www.mat.unical.it/calimeri/projects/embasp (2015)

  18. Erdem, E., Gelfond, M., Leone, N.: Applications of answer set programming. AI Mag. 37(3), 53–68 (2016)

    Article  Google Scholar 

  19. Faber, W., Leone, N., Pfeifer, G.: Recursive aggregates in disjunctive logic programs: semantics and complexity. In: Alferes, J.J., Leite, J. (eds.) Proceedings of the 9th European conference on artificial intelligence (JELIA 2004), Lecture Notes in AI (LNAI), vol. 3229, vol. 3229, pp. 200–212. Springer, Berlin (2004)

    Google Scholar 

  20. Febbraro, O., Leone, N., Grasso, G., Ricca, F.: JASP: A framework for integrating answer set programming with java. In: Brewka, G., Eiter, T., McIlraith, S.A. (eds.) Principles of knowledge representation and reasoning: proceedings of the thirteenth international conference, KR 2012, Rome, Italy, June 10–14, 2012. AAAI Press (2012). http://www.aaai.org/ocs/index.php/KR/KR12/paper/view/4520

  21. Fikes, R.E., Nilsson, N.J.: Strips: a new approach to the application of theorem proving to problem solving. Artif. Intell. 2(3–4), 189–208 (1971)

    Article  MATH  Google Scholar 

  22. Fox, M., Long, D.: Pddl2. 1: an extension to PDDL for expressing temporal planning domains. J. Artif. Intell. Res. (JAIR) 20, 61–124 (2003)

    Article  MATH  Google Scholar 

  23. Frhwirth, T.: Constraint handling rules, 1st edn. Cambridge University Press, New York (2009)

    Book  Google Scholar 

  24. Fuscà, D., Germano, S., Zangari, J., Anastasio, M., Calimeri, F., Perri, S.: A framework for easing the development of applications embedding answer set programming. In: Proceedings of the 18th international symposium on principles and practice of declarative programming, Edinburgh, UK, pp. 38–49 (2016)

  25. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design patterns: elements of reusable object-oriented software. Addison-Wesley, Boston (1994)

    MATH  Google Scholar 

  26. Gebser, M., Kaminski, R., Kaufmann, B., Ostrowski, M., Schaub, T., Schneider, M.: Potassco: the potsdam answer set solving collection. AI Commun. 24(2), 107–124 (2011)

    MathSciNet  MATH  Google Scholar 

  27. Gebser, M., Kaminski, R., Kaufmann, B., Schaub, T.: Clingo = ASP + control: preliminary report. CoRR abs/1405.3694. http://arxiv.org/abs/1405.3694 (2014)

  28. Gebser, M., Maratea, M., Ricca, F.: What’s hot in the answer set programming competition. In: Schuurmans, D., Wellman, M.P. (eds.) Proceedings of the Thirtieth AAAI conference on artificial intelligence, February 12–17, Phoenix, Arizona, USA., pp. 4327–4329. AAAI Press (2016). http://www.aaai.org/ocs/index.php/AAAI/AAAI16/paper/view/12233

  29. Gelfond, M., Lifschitz, V.: Classical negation in logic programs and disjunctive databases. New Gener. Comput. 9, 365–385 (1991)

    Article  MATH  Google Scholar 

  30. Gerevini, A., Haslum, P., Long, D., Saetti, A., Dimopoulos, Y.: Deterministic planning in the fifth international planning competition: PDDL3 and experimental evaluation of the planners. Artif. Intell. 173(5–6), 619–668 (2009). https://doi.org/10.1016/j.artint.2008.10.012

    Article  MathSciNet  MATH  Google Scholar 

  31. Germano, S., Calimeri, F., Palermiti, E.: Loide: A web-based IDE for logic programming preliminary report. In: Calimeri, F., Hamlen, K.W., Leone, N. (eds.) Practical aspects of declarative languages—20th international symposium, PADL 2018, Los Angeles, CA, USA, January 8–9, Proceedings, lecture notes in computer science, vol. 10702, pp. 152–160. Springer (2018). https://doi.org/10.1007/978-3-319-73305-0_10

  32. Ghallab, M., Howe, A., Knoblock, C., McDermott, D., Ram, A., Veloso, M., Weld, D., Wilkins, D.: PDDL—the planning domain definition language. Tech. rep., Yale Center for Computational Vision and Control, New Haven, CT, USA (1998). http://www.cs.yale.edu/pub/mcdermott/software/pddl.tar.gz

  33. Gupta, N., Nau, D.S.: On the complexity of blocks-world planning. Artif. Intell. 56(2–3), 223–254 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  34. Kovacs, D.L.: Bnf definition of pddl 3.1. Unpublished manuscript from the IPC-2011 website (2011)

  35. Kowalski, R.A.: The early years of logic programming. Commun. ACM 31(1), 38–43 (1988). https://doi.org/10.1145/35043.35046

    Article  Google Scholar 

  36. Leone, N., Pfeifer, G., Faber, W., Eiter, T., Gottlob, G., Perri, S., Scarcello, F.: The DLV system for knowledge representation and reasoning. ACM Trans. Comput. Logic 7(3), 499–562 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  37. Lifschitz, V.: Answer set planning. In: Schreye, D.D. (ed.) Proceedings of the 16th international conference on logic programming (ICLP’99), pp. 23–37. The MIT Press, Las Cruces (1999)

    Google Scholar 

  38. Lloyd, J.W.: Foundations of logic programming, 2nd edn. Springer, Secaucus (1993)

    MATH  Google Scholar 

  39. Long, D., Fox, M.: The 3rd international planning competition: results and analysis. J. Artif. Intell. Res. (JAIR) 20, 1–59 (2003)

    Article  MATH  Google Scholar 

  40. Marek, V.W., Truszczyński, M.: Stable models and an alternative logic programming paradigm. In: Apt, K.R., Marek, V.W., Truszczyński, M., Warren, D.S. (eds.) The logic programming paradigm—a 25-year perspective, pp. 375–398. Springer, Berlin (1999)

    Chapter  Google Scholar 

  41. Niemelä, I.: Logic programming with stable model semantics as constraint programming paradigm. Ann. Math. Artif. Intell. 25(3–4), 241–273 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  42. Nieuwenhuis, R., Oliveras, A., Tinelli, C.: Solving sat and sat modulo theories: from an abstract Davis–Putnam–Logemann–Loveland procedure to dpll(t). J. ACM 53(6), 937–977 (2006). https://doi.org/10.1145/1217856.1217859

    Article  MathSciNet  MATH  Google Scholar 

  43. Potassco, the potsdam answer set solving collection. https://potassco.org/ (2017)

  44. Przymusinski, T.C.: Stable semantics for disjunctive programs. New Gener. Comput. 9, 401–424 (1991)

    Article  MATH  Google Scholar 

  45. Radziszowski, S.P.: Small ramsey numbers. Electr. J. Combinatorics, 1 (1994). Revision 9: July 15, 2002

  46. Rath, J., Redl, C.: Integrating answer set programming with object-oriented languages. In: International symposium on practical aspects of declarative languages, pp. 50–67. Springer (2017)

  47. Ricca, F.: The DLV Java Wrapper. In: de Vos, M., Provetti, A. (eds.) Proceedings ASP03—answer set programming: advances in theory and implementation, pp. 305–316. Messina, Italy. http://CEUR-WS.org/Vol-78/ (2003)

  48. Samulowitz, H., Memisevic, R.: Learning to solve QBF. In: Proceedings of the twenty-second AAAI conference on artificial intelligence, July 22–26, 2007, Vancouver, British Columbia, Canada, pp. 255–260. AAAI Press (2007). http://www.aaai.org/Library/AAAI/2007/aaai07-039.php

  49. Schüller, P., Weinzierl, A.: Answer set application programming: a case study on tetris. In: Vos, M.D., Eiter, T., Lierler, Y., Toni, F. (eds.) Proceedings of the technical communications of the 31st international conference on logic programming (ICLP 2015), Cork, Ireland, August 31–September 4, 2015., CEUR Workshop Proceedings, vol. 1433. CEUR-WS.org (2015). http://ceur-ws.org/Vol-1433/tc_17.pdf. Accessed July 2018

  50. Solver.Planning.Domains. http://solver.planning.domains/ (2017). Accessed July 2018

  51. Srivastava, B., Bigus, J.P., Schlosnagle, D.A.: Bringing planning to autonomic applications with ABLE. In: 1st international conference on autonomic computing (ICAC) 2004, 17–19 May, New York, NY, USA, pp. 154–161 (2004). https://doi.org/10.1109/ICAC.2004.23

  52. Thimm, M.: Tweety: A comprehensive collection of java libraries for logical aspects of artificial intelligence and knowledge representation. In: Baral, C., Giacomo, G.D., Eiter, T. (eds.) Principles of knowledge representation and reasoning: proceedings of the fourteenth international conference, KR 2014, Vienna, Austria, July 20–24. AAAI Press. http://www.aaai.org/ocs/index.php/KR/KR14/paper/view/7811 (2014)

  53. Van Emden, M.H., Kowalski, R.A.: The semantics of predicate logic as a programming language. J. ACM 23(4), 733–742 (1976). https://doi.org/10.1145/321978.321991

    Article  MathSciNet  MATH  Google Scholar 

  54. Warmer, J.B., Kleppe, A.G.: The object constraint language: precise modeling with Uml (Addison-Wesley Object Technology Series). Addison-Wesley Professional. http://www.worldcat.org/isbn/0201379406 (1998). Accessed July 2018

  55. Younes, H.L., Littman, M.L.: Ppddl1. 0: an extension to pddl for expressing planning domains with probabilistic effects. Techn. Rep. CMU-CS-04-162 (2004)

Download references

Acknowledgements

Francesco Calimeri has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skodowska-Curie grant agreement No. 690974 for the project “MIREL: MIning and REasoning with Legal texts”.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Francesco Calimeri.

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Calimeri, F., Fuscà, D., Germano, S. et al. Fostering the Use of Declarative Formalisms for Real-World Applications: The EmbASP Framework. New Gener. Comput. 37, 29–65 (2019). https://doi.org/10.1007/s00354-018-0046-2

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00354-018-0046-2

Keywords

Navigation