| OCR Text |
Show CHAPTER 6 INTEGRATION OF FUNCTIONAL PROGRAMMING AND LOGIC PROGRAMMING In this chapter we describe a computational model, called Funlog, which integrates functional programming and logic programming. Functional programming and logic programming have attracted many researchers in recent years, both approaches being prime candidates as basic programming paradigms in concurrent computer architectures. Although each of these paradigms has its advantages, each also has its shortcomings when compared to the other. The basic formalization of functional programming languages, as compared to logic programming languages (e.g., Prolog) lacks knowledge-based inferencing abilities to cope with computations involving search. In addition, there are several well-known problems for which functional solutions are either very complex or somewhat inscrutable [6]. In contrast, the solutions to several of these problems expressed in Prolog are relatively elegant. This is mainly because Prolog can save intermediate computational results for subsequent use by sibling computations (cf. [119]). Current Pro log systems, however, lack (1) the concept of "evaluation" of "function invocations," leading to the logic base sometimes being not transparent, and (2) a means to describe terminating computations on conceptually infinite data structures. The "clean" control of program execution is another challenging problem in the Prolog context one which is significantly alleviated when using a functional style. The relationship of logic and functional programming languages was studied in detail in [96]. |