Results 1 - 10
of
27
A unified computation model for functional and logic programming
- IN PROC. OF THE 24TH ACM SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES (PARIS
, 1997
"... We propose a new computation model which combines the operational principles of functional languages (reduction), logic languages (non-deterministic search for solutions), and integrated functional logic languages (residuation and narrowing). This computation model combines efficient evaluation prin ..."
Abstract
-
Cited by 134 (67 self)
- Add to MetaCart
We propose a new computation model which combines the operational principles of functional languages (reduction), logic languages (non-deterministic search for solutions), and integrated functional logic languages (residuation and narrowing). This computation model combines efficient evaluation principles of functional languages with the problem-solving capabilities of logic programming. Since the model allows the delay of function calls which are not sufficiently instantiated, it also supports a concurrent style of programming. We provide soundness and completeness results and show that known evaluation principles of functional logic languages are particular instances of this model. Thus, our model is a suitable basis for future declarative programming languages.
A Declarative Debugging Scheme
, 1997
"... We present a very simple but flexible declarative debugging scheme. A declarative debugger can be defined in Prolog with a single clause, and relies on the definition of just two additional predicates. With suitable definitions of these predicates, the debugger can diagnose several classes of bugs i ..."
Abstract
-
Cited by 56 (4 self)
- Add to MetaCart
We present a very simple but flexible declarative debugging scheme. A declarative debugger can be defined in Prolog with a single clause, and relies on the definition of just two additional predicates. With suitable definitions of these predicates, the debugger can diagnose several classes of bugs in many languages. We give examples of diagnoses of wrong answers in functional, relational, and object-oriented languages as well as missing answers in relational languages and calls that are not well defined in functional languages. By using declarative semantics of programs, the debugger is able to hide complex execution mechanisms such as unification, backtracking, coroutining, parallelism, higher-order functions, lazy evaluation, message passing, and inheritance.
Compiling Multi-Paradigm Declarative Programs into Prolog
- In Proc. International Workshop on Frontiers of Combining Systems (FroCoS’2000
, 2000
"... This paper describes a high-level implementation of the concurrent constraint functional logic language Curry. The implementation, directed by the lazy pattern matching strategy of Curry, is obtained by transforming Curry programs into Prolog programs. Contrary to previous transformations of functio ..."
Abstract
-
Cited by 49 (33 self)
- Add to MetaCart
This paper describes a high-level implementation of the concurrent constraint functional logic language Curry. The implementation, directed by the lazy pattern matching strategy of Curry, is obtained by transforming Curry programs into Prolog programs. Contrary to previous transformations of functional logic programs into Prolog, our implementation includes new mechanisms for both efficiently performing concurrent evaluation steps and sharing common subterms. The practical results show that our implementation is superior to previously proposed similar implementations of functional logic languages in Prolog and is competitive w.r.t. lower-level implementations of Curry in other target languages. An noteworthy advantage of our implementation is the ability to immediately employ in Curry existing constraint solvers for logic programming. In this way, we obtain with a relatively modest effort the implementation of a declarative language combining lazy evaluation, concurrency a...
Curry: A Truly Functional Logic Language
, 1995
"... Functional and logic programming are the most important declarative programming paradigms, and interest in combining them has grown over the last decade. However, integrated functional logic languages are currently not widely used. This is due to the fact that the operational principles are not w ..."
Abstract
-
Cited by 44 (5 self)
- Add to MetaCart
Functional and logic programming are the most important declarative programming paradigms, and interest in combining them has grown over the last decade. However, integrated functional logic languages are currently not widely used. This is due to the fact that the operational principles are not well understood and many different evaluation strategies have been proposed which resulted in many different functional logic languages. To overcome this situation, we propose the functional logic language Curry which can deal as a standard language in this area. It includes important ideas of existing functional logic languages and recent developments, and combines the most important features of functional and logic languages. Thus, Curry can be the basis to combine the currently separated research efforts of the functional and logic programming communities and to boost declarative programming in general. Moreover, since functions provide for more efficient evaluation strategies and ...
The Integration of Functions into Logic Programming: A Survey
, 1994
"... Functional and logic programming are the most important declarative programming paradigms, and interest in combining them has grown over the last decade. Early research concentrated on the definition and improvement of execution principles for such integrated languages, while more recently efficient ..."
Abstract
-
Cited by 34 (0 self)
- Add to MetaCart
Functional and logic programming are the most important declarative programming paradigms, and interest in combining them has grown over the last decade. Early research concentrated on the definition and improvement of execution principles for such integrated languages, while more recently efficient implementations of these execution principles have been developed so that these languages became relevant for practical applications. In this paper we survey the development of the operational semantics as well as
Functional Logic Design Patterns
- In Proc. of the 6th International Symposium on Functional and Logic Programming (FLOPS 2002
, 2002
"... Abstract. We introduce a handful of software design patterns for functional logic languages. Following usual approaches, for each pattern we propose a name and we describe its intent, applicability, structure, consequences, etc. Our patterns deal with data type construction, identifier declarations, ..."
Abstract
-
Cited by 29 (15 self)
- Add to MetaCart
Abstract. We introduce a handful of software design patterns for functional logic languages. Following usual approaches, for each pattern we propose a name and we describe its intent, applicability, structure, consequences, etc. Our patterns deal with data type construction, identifier declarations, mappings, search, nondeterminism and other fundamental aspects of the design and implementation of programs. We present some problems and we show fragments of programs that solve these problems using our patterns. The programming language of our examples is Curry. The complete programs are available on-line. 1
Directional Types and the Annotation Method
, 1997
"... This paper shows that the annotation proof method, proposed by Deransart for proving declarative properties of logic programs, is also applicable for proving correctness of directional types. In particular, the sufficient correctness criterion of well-typedness by Bronsard et al, turns out to be a s ..."
Abstract
-
Cited by 27 (3 self)
- Add to MetaCart
This paper shows that the annotation proof method, proposed by Deransart for proving declarative properties of logic programs, is also applicable for proving correctness of directional types. In particular, the sufficient correctness criterion of well-typedness by Bronsard et al, turns out to be a specialization of the annotation method. The comparison shows a general mechanism for construction of similar specializations, which is applied to derive yet another concept of well-typedness. The usefulness of the new correctness criterion is shown on examples of Prolog programs, where the traditional notion of well-typedness is not applicable. We further show that the new well-typing condition can be applied to different execution models. This is illustrated by an example of an execution model where unification is controlled by directional types, and where our new well-typing condition is applied to show the absence of deadlock. / 1. INTRODUCTION
Towards a Portable Lazy Functional Declarative Debugger
, 1995
"... Declarative (or algorithmic) debugging is a promising technique for debugging lazy functional programs. This paper addresses two important reasons why it is not more widespread: the difficulty of writing a declarative debugger for a lazy functional language in the language itself and the efficiency ..."
Abstract
-
Cited by 23 (1 self)
- Add to MetaCart
Declarative (or algorithmic) debugging is a promising technique for debugging lazy functional programs. This paper addresses two important reasons why it is not more widespread: the difficulty of writing a declarative debugger for a lazy functional language in the language itself and the efficiency of the debugger. Using the source language to implement the debugger is desirable for portability and we discuss the reasons why this is very difficult to do. We propose a system in which nearly all the code is in the source language but there is one function which must be written at lower level. We also show how this function can be the key to significantly improving the efficiency of declarative debuggers for such languages. Keywords: algorithmic debugging, referential transparency, i/o, monads, types, trace, transformation 1 Introduction Traditional debugging methods such as diagnostic writes, tracing, break points et cetera are very difficult to apply to modern lazy functional progra...
A Syntactic Approach to Combining Functional Notation, Lazy Evaluation and Higher-Order in LP Systems
- In The 8th International Symposium on Functional and Logic Programming (FLOPS’06
, 2006
"... Abstract. Nondeterminism and partially instantiated data structures give logic programming expressive power beyond that of functional programming. However, functional programming often provides convenient syntactic features, such as having a designated implicit output argument, which allow function ..."
Abstract
-
Cited by 18 (10 self)
- Add to MetaCart
Abstract. Nondeterminism and partially instantiated data structures give logic programming expressive power beyond that of functional programming. However, functional programming often provides convenient syntactic features, such as having a designated implicit output argument, which allow function call nesting and sometimes results in more compact code. Functional programming also sometimes allows a more direct encoding of lazy evaluation, with its ability to deal with infinite data structures. We present a syntactic functional extension, used in the Ciao system, which can be implemented in ISO-standard Prolog systems and covers function application, predefined evaluable functors, functional definitions, quoting, and lazy evaluation. The extension is also composable with higher-order features and can be combined with other extensions to ISO-Prolog such as constraints. We also highlight the features of the Ciao system which help implementation and present some data on the overhead of using lazy evaluation with respect to eager evaluation.
Declarative Debugging of Lazy Functional Programs
- Australian Computer Science Communications
, 1992
"... This paper is organized as follows. First a simple declarative debugger for diagnosing incorrect answers in pure Prolog programs is presented. The debugger is somewhat more abstract than other published debuggers and is written in a subset of NU-Prolog which has well defined declarative semantics. N ..."
Abstract
-
Cited by 15 (3 self)
- Add to MetaCart
This paper is organized as follows. First a simple declarative debugger for diagnosing incorrect answers in pure Prolog programs is presented. The debugger is somewhat more abstract than other published debuggers and is written in a subset of NU-Prolog which has well defined declarative semantics. Next a simple functional programming language with (initially) non-lazy evaluation is described. We show how such a language can be debugged in an equivalent way to Prolog. Lazy evaluation is then introduced and we show how the debugger can be generalised to handle this. A refinement which reduces the complexity of questions to the user is also presented. The functional programming language we use is implemented by transformation into Prolog. Though our discussion is based on this language and implementation, we hope it will be obvious how the ideas can be adapted. A summary of the debugging algorithm in abstract terms is given after the description of our implementation. Finally, we consider related work and possible extensions then conclude. 2 Declarative debugging of logic programs

