Logic Java: Combining Object-Oriented and Logic Programming

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.

[1]  Peter H. Salus Functional and logic programming languages , 1998 .

[2]  Akikazu Takeuchi,et al.  Object oriented programming in Concurrent Prolog , 1983, New Generation Computing.

[3]  James Low Proceedings of the 1977 symposium on Artificial intelligence and programming languages , 1977 .

[4]  Krzysztof R. Apt,et al.  From logic programming to Prolog , 1996, Prentice Hall International series in computer science.

[5]  Kris Gybels,et al.  Seamless integration of rule-based knowledge and object-oriented functionality with linguistic symbiosis , 2004, SAC '04.

[6]  Philip Wadler,et al.  Java generics and collections , 2006 .

[7]  GibbonsJeremy,et al.  The essence of the iterator pattern , 2009 .

[8]  Paulo Moura From Plain Prolog to Logtalk Objects: Effective Code Encapsulation and Reuse , 2009, ICLP.

[9]  Bruno C. d. S. Oliveira,et al.  The essence of the Iterator pattern , 2006, J. Funct. Program..

[10]  William F. Opdyke,et al.  Refactoring object-oriented frameworks , 1992 .

[11]  Herbert Kuchen,et al.  Muggl: The Muenster generator of glass-box test cases , 2011 .

[12]  Trevor P Martin,et al.  Fril++ - Object-based extensions to Fril , 1998 .

[13]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[14]  Richard R. Muntz,et al.  An object-oriented logic programming environment for modeling , 1989 .

[15]  Kim Mens,et al.  Supporting software development through declaratively codified programming patterns , 2002, Expert Syst. Appl..

[16]  M. Hanus,et al.  Curry: A Truly Functional Logic Language , 1995 .

[17]  Jean-Marc Eber The Financial Crisis, a Lack of Contract Specification Tools: What Can Finance Learn from Programming Language Design? , 2009, ESOP.

[18]  Joe L. Armstrong The development of Erlang , 1997, ICFP '97.

[19]  Ehud Shapiro,et al.  The family of concurrent logic programming languages , 1989, CSUR.

[20]  Van Snyder Review of "Fortran 95/2003 Explained, by Michael Metcalf, John Reid, and Malcolm Cohen" OUP, Oxford and New York, 2004. , 2004, FORF.

[21]  Angelo Morzenti,et al.  An Object-Oriented Logic Language for Modular System Specification , 1991, ECOOP.

[22]  Randall Scott A Guide To Artificial Intelligence With Visual Prolog , 2010 .

[23]  Patricia Adams,et al.  Programming Languages: Principles and Practice , 1993 .

[24]  Ulf T. Wiger 20 years of industrial functional programming , 2004, ICFP '04.

[25]  Ken Arnold,et al.  The Java Programming Language , 1996 .

[26]  Hassan Aït-Kaci,et al.  Warren's Abstract Machine: A Tutorial Reconstruction , 1991 .

[27]  Péter Szeredi,et al.  Solving Optimisation Problems in the Aurora Or-parallel Prolog System , 1991, ICLP Workshop on Parallel Execution of Logic Programs.

[28]  Francis G. McCabe,et al.  Logic and objects , 1992, Prentice Hall International Series in Computer Science.

[29]  Didier Rémy,et al.  Using, Understanding, and Unraveling the OCaml Language. From Practice to Theory and Vice Versa , 2000, APPSEM.

[30]  Jean G. Vaucher,et al.  ObjVProlog-D: a reflexive object-oriented logic language for distributed computing , 1991, OOPS Messenger.

[31]  Herbert Kuchen,et al.  Automated Test Case Generation Based on Coverage Analysis , 2009, 2009 Third IEEE International Symposium on Theoretical Aspects of Software Engineering.

[32]  Jan Henry Nyström Productivity gains with Erlang , 2007, CUFP '07.

[33]  W. Hankley Feature analysis of Turbo Prolog , 1987, SIGP.

[34]  Herbert Kuchen Implementing an Object Oriented Design in Curry , 2000, WFLP.

[35]  David H. D. Warren,et al.  Prolog - the language and its implementation compared with Lisp , 1977, Artificial Intelligence and Programming Languages.

[36]  Guy L. Steele,et al.  Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley)) , 2005 .

[37]  Trevor P Martin,et al.  On the implementation of Fril++ for object-oriented logic programming with uncertainty and fuzziness , 2002 .

[38]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[39]  Mirko Viroli,et al.  A Prolog-oriented extension of Java programming based on generics and annotations , 2007, PPPJ.

[40]  Michael Metcalf,et al.  Fortran 95/2003 Explained , 1996 .

[41]  Seif Haridi,et al.  The Aurora or-parallel Prolog system , 1990, New Generation Computing.

[42]  Mirko Viroli,et al.  Integrating Java and Prolog through generic methods and type inference , 2008, SAC '08.

[43]  Krzysztof R. Apt,et al.  Logic Programming , 1990, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[44]  Peter Van Roy,et al.  Logic programming in the context of multiparadigm programming: the Oz experience , 2002, Theory and Practice of Logic Programming.

[45]  Rafael del Vado Vírseda,et al.  Constraint functional logic programming over finite domains , 2006, Theory and Practice of Logic Programming.

[46]  Chris Moss Prolog++ - the power of object-oriented and logic programming , 1994, International series in logic programming.

[47]  Herbert Kuchen,et al.  Constraint Solving for Generating Glass-Box Test Cases , 2004 .