LogicObjects: Enabling Logic Programming in Java through Linguistic Symbiosis

  • Sergio Castro
  • Kim Mens
  • Paulo Moura
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7752)

Abstract

While object-oriented programming languages are good at modelling real-world concepts and benefit from rich libraries and developer tools, logic programming languages are well suited for declaratively solving computational problems that require knowledge reasoning. Non-trivial declarative applications could take advantage of the modelling features of object-oriented programming and of the rich software ecosystems surrounding them. Linguistic symbiosis is a common approach to enable complementary use of languages of different paradigms. However, the problem of concepts leaking from one paradigm to another often hinders the applicability of such approaches. This issue has mainly been reported for object-oriented languages participating in a symbiotic relation with a logic language. To address this issue, we present LogicObjects, a linguistic symbiosis framework for transparently and (semi-) automatically enabling logic programming in Java, that aims to solve most of the problems of paradigm leaking reported in other works.

Keywords

Linguistic Symbiosis Object-Oriented Programming Logic Programming Multi-Paradigm Programming 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    D’Hondt, M., Gybels, K., Jonckers, V.: Seamless Integration of Rule-Based Knowledge and Object-Oriented Functionality with Linguistic Symbiosis. In: Proceedings of the 2004 Symposium on Applied Computing (SAC), pp. 1328–1335. ACM (2004)Google Scholar
  2. 2.
    Russel, S., Norvig, P.: Artificial Intelligence, A Modern Approach. Prentice Hall (1995)Google Scholar
  3. 3.
    Ichisugi, Y., Matsuoka, S., Yonezawa, A.: RbCl: A Reflective Object-Oriented Concurrent Language without a Run-time Kernel. In: International Workshop on New Models for Software Architecture (IMSA): Reflection And Meta-Level Architecture, pp. 24–35 (1992)Google Scholar
  4. 4.
    Gybels, K.: SOUL and Smalltalk - Just Married: Evolution of the Interaction Between a Logic and an Object-Oriented Language Towards Symbiosis. In: Proceedings of the Workshop on Declarative Programming in the Context of Object-Oriented Languages (2003)Google Scholar
  5. 5.
    Castro, S., Mens, K., Moura, P.: LogicObjects: A Linguistic Symbiosis Approach to Bring the Declarative Power of Prolog to Java. In: Proceedings of the Workshop on Reflection, AOP and Meta-Data for Software Evolution, RAM-SE (June 2012)Google Scholar
  6. 6.
    Singleton, P.: JPL: A Java Interface to Prolog (September 2012), http://www.swi-prolog.org/packages/jpl/java_api/index.html
  7. 7.
    Flach, P.: Simply Logical: Intelligent Reasoning by Example. John Wiley & Sons, Inc., New York (1994)MATHGoogle Scholar
  8. 8.
    Moura, P.: Logtalk - Design of an Object-Oriented Logic Programming Language. PhD thesis, Department of Computer Science, University of Beira Interior, Portugal (September 2003)Google Scholar
  9. 9.
    Moura, P.: Programming Patterns for Logtalk Parametric Objects. In: Abreu, S., Seipel, D. (eds.) INAP 2009. LNCS (LNAI), vol. 6547, pp. 52–69. Springer, Heidelberg (2011)Google Scholar
  10. 10.
    Wuyts, R., Ducasse, S.: Symbiotic Reflection between an Object-Oriented and a Logic Programming Language. In: International Workshop on MultiParadigm Programming with Object-Oriented Languages (2001)Google Scholar
  11. 11.
    Brichau, J., De Roover, C., Mens, K.: Open Unification for Program Query Languages. In: Proceedings of the XXVI International Conference of the Chilean Computer Science Society, SCCC 2007 (2007)Google Scholar
  12. 12.
    Wuyts, R.: Declarative Reasoning about the Structure of Object-Oriented Systems. In: Proceedings of the TOOLS USA 1998 Conference, pp. 112–124. IEEE Computer Society Press (1998)Google Scholar
  13. 13.
    De Volder, K.: JQuery: A generic code browser with a declarative configuration language. In: Van Hentenryck, P. (ed.) PADL 2006. LNCS, vol. 3819, pp. 88–102. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  14. 14.
    Semmle Ltd.: SemmleCode (2010), http://semmle.com/
  15. 15.
    Boulanger, D., Geske, U.: Using Logic Programming in Java Environment (Extended Abstract). Technical Report 10, Knowledge-Based Systems Group, Vienna University of Technology, Austria (1998)Google Scholar
  16. 16.
    Friedrich Bolz, C.: Pyrolog: A Prolog interpreter written in Python using the PyPy translator toolchain, https://bitbucket.org/cfbolz/pyrolog/
  17. 17.
    Paul Tarau, P.: Styla: a lightweight Scala-based Prolog interpreter based on a pure object oriented term hierarchy, http://code.google.com/p/styla/
  18. 18.
    Friedman-Hill, E.: Jess in Action: Java Rule-based Systems. Manning, Greenwich (2003)Google Scholar
  19. 19.
    Cimadamore, M., Viroli, M.: Integrating Java and Prolog Through Generic Methods and Type Inference. In: Proceedings of the 2008 ACM Symposium on Applied Computing (SAC), pp. 198–205. ACM (2008)Google Scholar
  20. 20.
    Majchrzak, T.A., Kuchen, H.: Logic java: combining object-oriented and logic programming. In: Kuchen, H. (ed.) WFLP 2011. LNCS, vol. 6816, pp. 122–137. Springer, Heidelberg (2011)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Sergio Castro
    • 1
  • Kim Mens
    • 1
  • Paulo Moura
    • 2
  1. 1.ICTEAM InstituteUniversité catholique de LouvainBelgium
  2. 2.Center for Research in Advanced Computing SystemsINESC–TECPortugal

Personalised recommendations