Logic Java: Combining Object-Oriented and Logic Programming

Majchrzak Tim A., Kuchen Herbert


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.

Keywords
Java; logic programming; integration of programming paradigms; constraint solving



Publication type
Research article in proceedings (conference)

Peer reviewed
Yes

Publication status
Published

Year
2011

Conference
International Workshop on Functional and (Constraint) Logic Programming

Venue
Odense, Denmark

Journal
Lecture notes in computer science

Book title
Functional and Constraint Logic Programming - 20th International Workshop

Editor
Kuchen Herbert

Start page
122

End page
137

Volume
6816

Title of series
Lecture Notes in Computer Science

Publisher
Springer

Place
Heidelberg

Language
English

ISSN
0302-9743

ISBN
978-3-642-22530-7

DOI

Full text