Logic Java: combining object-oriented and logic programming

  • Authors:
  • Tim A. Majchrzak;Herbert Kuchen

  • Affiliations:
  • Department of Information Systems, University of Münster, Münster, Germany;Department of Information Systems, University of Münster, Münster, Germany

  • Venue:
  • WFLP'11 Proceedings of the 20th international conference on Functional and constraint logic programming
  • Year:
  • 2011

Quantified Score

Hi-index 0.04

Visualization

Abstract

We have developed the programming language Logic Java which smoothly integrates the object-oriented language Java and logic programming concepts such as logic variables, constraint solving, and backtracking. It combines the advantages of object-orientation such as easy maintainability and adaptability due to inheritance and encapsulation of structure and behavior with the advantages of logic languages such as suitability for search problems. Java annotations and a symbolic Java virtual machine are used to handle the logic programming concepts. In contrast to previous approaches to integrate object-oriented and logic programming, we preserve the syntax of Java. Our language is not split into two distinguishable parts but as closely integrated as possible. Besides the design and implementation of Logic Java, providing a suitable interface between conventional and logic computations is the main contribution of this paper. A killer application, which can hardly be implemented more elegantly in any other language, is the tool Muggl which systematically generates glass-box test cases for Java programs. Applications requiring a substantial amount of search are also well suited.