## On the tighter integration of functional and logic programming (2007)

Citations: | 17 - 2 self |

### BibTeX

@TECHREPORT{Braßel07onthe,

author = {Bernd Braßel and Frank Huch},

title = {On the tighter integration of functional and logic programming},

institution = {},

year = {2007}

}

### OpenURL

### Abstract

Abstract. The integration of functional and logic programming is a well developed field of research. We discuss that the integration could be improved significantly in two separate aspects: sharing computations across non-deterministic branching and the declarative encapsulation of logic search. We then present a formal approach which shows how these improvements can be realized and prove the soundness of our approach. 1

### Citations

290 | On completeness of narrowing strategies
- Echahed
- 1988
(Show Context)
Citation Context ... we name only three works we consider the main theoretic fundament: A denotational semantics was developed in [9] and extended in many subsequent publications. A formal base on narrowing was given in =-=[3]-=- and an operational semantics was introduced in [1]. There are, however, reasons to believe that the integration of both paradigms could be tighter, demonstrated by two examples in the functional logi... |

181 | A Natural Semantics for Lazy Evaluation
- Launchbury
- 1993
(Show Context)
Citation Context ...tors and functions. The normalization of arbitrary Flat Curry programs is defined in [1]. This normalization is the key idea to express sharing, the main concept of laziness in the functional setting =-=[13]-=- and call-time choice in the functional logic setting. The syntax is presented in Figure 1. Free variables are introduced as circular let bindings of the form let x=x in e. To keep programs containing... |

96 |
An approach to declarative programming based on a rewriting logic
- González-Moreno, Hortalá-González, et al.
- 1999
(Show Context)
Citation Context ...se of logic programming. By now the theory is well developed and among the many approaches we name only three works we consider the main theoretic fundament: A denotational semantics was developed in =-=[9]-=- and extended in many subsequent publications. A formal base on narrowing was given in [3] and an operational semantics was introduced in [1]. There are, however, reasons to believe that the integrati... |

56 |
PAKCS: The Portland Aachen Kiel Curry System. Available at http: //www.informatik.uni-kiel.de/~pakcs
- Hanus, Antoy, et al.
- 2010
(Show Context)
Citation Context ...string [e1, . . . , e100] takes time 100·t. Then one would expect the total time to compute parse pal [e1,...,e100] is 100 · t + tparse ≈ 100 · t. But measurements for the Curry implementation PAKCS (=-=[10]-=-) show that, e.g., for t = 0.131s it takes more than 5000 · t to generate a solution for a palindrome [e1, . . . , e100] and 9910 · t to perform the whole search for all solutions. We obtain similar r... |

54 | Operational Semantics for Declarative Multi-Paradigm Languages
- Albert, Hanus, et al.
(Show Context)
Citation Context ...retic fundament: A denotational semantics was developed in [9] and extended in many subsequent publications. A formal base on narrowing was given in [3] and an operational semantics was introduced in =-=[1]-=-. There are, however, reasons to believe that the integration of both paradigms could be tighter, demonstrated by two examples in the functional logic language Curry: Example 1 (Sharing across Non-Det... |

35 | Overlapping Rules and Logic Variables in Functional Logic Programs
- Antoy, Hanus
- 2006
(Show Context)
Citation Context ...te function and constructor application in curried form. 3 Simplifications of the Semantics Before we extend the semantics, we apply some further simplifications. 3.1 Elimination of Free Variables In =-=[4]-=-, Antoy and Hanus presented the surprising result that under certain circumstances one can replace free variables by generator functions. Unfortunately, they prove their result only for a term-rewriti... |

20 | F.: Encapsulating non-determinism in functional logic computations
- Braßel, Hanus, et al.
- 2004
(Show Context)
Citation Context ...t fst r =:= "" is solved first then PAKCS yields no solution and if the second constraint is preferred, the computation is successful. We will not explain how this behavior comes to pass and refer to =-=[5]-=- for a detailed discussion. Here, it is only important that this problem also stems from the connection of laziness with logic search and is caused by the sharing of r in both constraints. In an alter... |

16 |
Implementing encapsulated search for a lazy functional logic language
- Lux
- 1999
(Show Context)
Citation Context ...oblem also stems from the connection of laziness with logic search and is caused by the sharing of r in both constraints. In an alternative approach as implemented in the Münster Curry Compiler (MCC) =-=[14]-=- the result does not depend on the order in which the two constraints are evaluated. The evaluation of (prime (pal "abba")) fails in any case, again cf. [5] for details. Although the approach of [14] ... |

15 |
An efficient abstract machine for Curry
- Lux, Kuchen
- 1999
(Show Context)
Citation Context ... [e1, . . . , e100] and 9910 · t to perform the whole search for all solutions. We obtain similar results for other implementations of lazy functional logic languages, like the Münster Curry Compiler =-=[15]-=-. The reason is that these systems do not provide sharing across non-determinism. For all non-deterministic branches in the parser the elements of the remaining list are computed again and again. Only... |

13 | Prolog’s control constructs in a functional setting - Axioms and implementation
- Hinze
- 1992
(Show Context)
Citation Context ...fer to it as ↓. 4 Extending the Semantics 4.1 Constructors representing Non-Determinism There have been several attempts to define libraries for logical features for lazy functional programming, e.g. =-=[12]-=-. All these approaches encode the nondeterministic search as a kind of lazily constructed data structure, e.g. a list (embedded in some backtracking monad). The context demands elements from this list... |

10 |
Translating curry to haskell
- Braßel, Huch
- 2005
(Show Context)
Citation Context ...ing. Since the implementation of bubbling is not yet finished, it remains difficult to judge which approach performs better in practice. The amount of sharing, however, is the same. Our previous work =-=[6]-=- exhaustively discussed all aspects of encapsulation, but did not solve it as elegantly as the work presented here. Furthermore, sharing across non-determinism was not covered. However, it formulates ... |

6 | On the correctness of bubbling
- Antoy, Brown, et al.
- 2006
(Show Context)
Citation Context ...s an I/O-Operation. 5 Related work There has been only one other approach prior to this work to formalize sharing deterministic computations across non-deterministic branches which is called bubbling =-=[2]-=-. Bubbling is defined as a graph rewriting technique and the calltime choice semantics is realized by manipulating the graph globally. We, in contrast, do only the local manipulation of lifting or-nod... |

1 |
Elimination of extra variables from functional logic programs
- Dios, López-Fraguas
- 2006
(Show Context)
Citation Context ...nces one can replace free variables by generator functions. Unfortunately, they prove their result only for a term-rewriting based semantics not considering sharing. A similar result was presented in =-=[8]-=- in the context of the Constructorbased ReWriting Logic (CRWL), a different semantic framework for functional logic languages. Unfortunately, this result cannot be transfered to our framework so easil... |