Logic programming is a flexible programming paradigm due to the use of predicates without afixed data flow. To extend logic languages with the compact notation of functional programming,there are various proposals to map evaluable functions into predicates in order to stay in the logicprogramming framework. Since amalgamated functional logic languages offer flexible as well asefficient evaluation strategies, we propose an opposite approach in this paper. By mapping logicprograms into functional logic programs with a transformation based on inferring functionaldependencies, we develop a fully automatic transformation which keeps the flexibility of logicprogramming but can improve computations by reducing infinite search spaces to finite ones.
展开▼