Constraint-logic object-oriented programming, for example using Muli, facilitates the integrated development of business software that occasionally involves finding solutions to constraint-logic problems. The availability of object-oriented features calls for the option to use objects as logic variables as well, as opposed to being limited to primitive type logic variables. The present work contributes a concept for reference type logic variables in constraint-logic object-oriented programming that takes arbitrary class hierarchies of programs written in object-oriented languages into account. The concept discusses interactions between constraint-logic object-oriented programs and reference type logic variables, particularly invocations on and access to logic variables, type operations, and equality. Furthermore, it proposes approaches as to how these interactions can be handled by a corresponding execution environment.
Several approaches intend to integrate elements from object-oriented programming into declarative languages, mostly based on Prolog. For example, tuProlog provides a Prolog engine implemented in Java, offering access to Java features from Prolog @cite_10 . However, referring to Java types is done rather artificially by means of string literals which cannot be checked by a compiler, and free objects and accessing their fields are not considered. As a non-Prolog-based example, Oz is a constraint language that offers OO features, but does not seem to support constraints involving logic objects @cite_8 . Despite their integration, the mentioned programming languages follow a declarative style, which might not be as accessible for developers who are used to imperative languages.
@cite_10 @cite_8
1996005700 2120656140
tuProlog is a Java-based Prolog engine explicitly designed to be minimal, dynamically configurable, and support full and clean Prolog Java integration. In this paper, we discuss the tuProlog approach to Prolog Java multi-paradigm integration. After tuProlog motivations and requirements, we present some examples of bidirectional Prolog Java integration and discuss the model and architecture of the tuProlog system. Then, we focus on the specific issue of the access to Java resources from tuProlog, discuss the essentials of its implementation, and compare it extensively with many other relevant related approaches and systems. Oz is a multiparadigm language that supports logic programming as one of its major paradigms. A multiparadigm language is designed to support different programming paradigms (logic, functional, constraint, object-oriented, sequential, concurrent, etc.) with equal ease. This paper has two goals: to give a tutorial of logic programming in Oz; and to show how logic programming fits naturally into the wider context of multiparadigm programming. Our experience shows that there are two classes of problems, which we call algorithmic and search problems, for which logic programming can help formulate practical solutions. Algorithmic problems have known efficient algorithms. Search problems do not have known efficient algorithms but can be solved with search. The Oz support for logic programming targets these two problem classes specifically, using the concepts needed for each. This is in contrast to the Prolog approach, which targets both classes with one set of concepts, which results in less than optimal support for each class. We give examples that can be run interactively on the Mozart system, which implements Oz. To explain the essential difference between algorithmic and search programs, we define the Oz execution model. This model subsumes both concurrent logic programming (committed-choice-style) and search-based logic programming (Prolog-style). Furthermore, as consequences of its multiparadigm nature, the model supports new abilities such as first-class top levels, deep guards, active objects, and sophisticated control of the search process. Instead of Horn clause syntax, Oz has a simple, fully compositional, higher-order syntax that accommodates the abilities of the language. We give a brief history of Oz that traces the development of its main ideas and we summarize the lessons learned from this work. Finally, we give many entry points into the Oz literature.