This paper abstracts the contents of a PhD dissertation entitled "Partial Evaluation of Lazy functionallogic Programs" which has been defended at the Technical University of Valencia, promoted by Prof. Mari...
详细信息
This paper abstracts the contents of a PhD dissertation entitled "Partial Evaluation of Lazy functionallogic Programs" which has been defended at the Technical University of Valencia, promoted by Prof. Maria Alpuente. Partial evaluation is an automatic program transformation technique that aims the specialization of programs, with regard to parts of their input, while preserving program semantics. Partial evaluation has been first applied to functionallogic languages in [6] where it is shown that the correctness of the transformation is dependent of the narrowing strategy used by the specialization algorithm. This thesis studies how to solve the problems arisen when lazy narrowing (a valuable strategy for functional logic programming) is used as the basic operational mechanism during the partial evaluation process. Also, we develop some methods that improve the efficiency of the specialization.
This paper abstracts the contents of a PhD dissertation entitled 'Transformation Rules and Strategies for functional-logic Programs' which has been recently defended. These techniques are based on fold/unfold ...
详细信息
This paper abstracts the contents of a PhD dissertation entitled 'Transformation Rules and Strategies for functional-logic Programs' which has been recently defended. These techniques are based on fold/unfold transformations and they can be used to optimize integrated (functional-logic) programs for a wide class of applications. Experimental results shows that typical examples in the field of Artificial Intelligence are successfully enhanced by our transformation system SYNTH. The thesis presents the first approach of these methods for declarative languages that integrate the best features from functional and logicprogramming.
Languages that integrate functional and logicprogramming styles with a complete operational semantics are based on narrowing. In order to avoid useless computations, lazy narrowing strategies have been proposed in th...
详细信息
Languages that integrate functional and logicprogramming styles with a complete operational semantics are based on narrowing. In order to avoid useless computations, lazy narrowing strategies have been proposed in the past. This paper presents an improvement of lazy narrowing by incorporating deterministic simplification steps into lazy narrowing derivations. These simplification steps reduce the search space so that in some cases infinite search spaces are reduced to finite ones. We consider two classes of programs where this strategy can be applied. Firstly, we show soundness and completeness of our strategy for functionallogic programs based on ground confluent and terminating rewrite systems. Then, we show similar results for constructor-based weakly orthogonal (not necessarily terminating) rewrite systems. Finally, we demonstrate the improved operational behavior by means of several examples. Since most functionallogic languages are based on programs belonging to one of these classes, our result is a significant step to improve the operational semantics of existing functionallogic languages. (C) 1997 Elsevier Science Ltd. All rights reserved.
This paper presents PFLP, a library for probabilistic programming in the functional logic programming language Curry. It demonstrates how the concepts of a functional logic programming language support the implementat...
详细信息
This paper presents PFLP, a library for probabilistic programming in the functional logic programming language Curry. It demonstrates how the concepts of a functional logic programming language support the implementation of a library for probabilistic programming. In fact, the paradigms of functionallogic and probabilistic programming are closely connected. That is, language characteristics from one area exist in the other and vice versa. For example, the concepts of non-deterministic choice and call-time choice as known from functional logic programming are related to and coincide with stochastic memoization and probabilistic choice in probabilistic programming, respectively. We will further see that an implementation based on the concepts of functional logic programming can have benefits with respect to performance compared to a standard list-based implementation and can even compete with full-blown probabilistic programming languages, which we illustrate by several benchmarks.
This paper is part of a comprehensive approach to debugging for functionallogic languages. The basic idea of the whole project is to trace the execution of functionallogic programs by side effects and then give diff...
详细信息
This paper is part of a comprehensive approach to debugging for functionallogic languages. The basic idea of the whole project is to trace the execution of functionallogic programs by side effects and then give different views on the recorded data. In this way well known debugging techniques like declarative debugging, expression observation, redex trailing but also step-by-step debuggers and cost center oriented symbolic profiling can be implemented as special views on the recorded data. In addition, creating new views for special debugging purposes should be easy to implement. This is where the contribution of this work sets in. We describe how the recorded data is interpreted and preprocessed in order to yield an extremely simple yet versatile interface to base the different views on. Using this interface, formulating the basic functionality of declarative debugging, for example, is a matter of a few lines.
Computational origami is the computer assisted study of mathematical and computational aspects of origami. An origami is constructed by a finite sequence of fold steps, each consisting in folding along a fold line. We...
详细信息
Computational origami is the computer assisted study of mathematical and computational aspects of origami. An origami is constructed by a finite sequence of fold steps, each consisting in folding along a fold line. We base the fold methods on Huzita's axiomatization, and show how folding an origami can be formulated by a conditional rewrite system. A rewriting sequence of origami structures is viewed as an abstraction of origami construction. We also explain how the basic concepts of constraint and functional and logicprogramming are related to this computational construction. Our approach is not only useful for computational construction of an origami, but it leads us to automated theorem proving of the correctness of the origami construction.
A distinctive feature of modern functionallogic languages like Toy or Curry is the possibility of programming non-strict and non-deterministic functions with call-time choice semantics. For almost ten years the CRWL ...
详细信息
A distinctive feature of modern functionallogic languages like Toy or Curry is the possibility of programming non-strict and non-deterministic functions with call-time choice semantics. For almost ten years the CRWL framework [6,7] has been the only formal setting covering all these semantic aspects. But recently [1] an alternative proposal has appeared, focusing more on operational aspects. In this work we investigate the relation between both approaches, which is far from being obvious due to the wide gap between both descriptions, even at syntactical level.
Computing with failures is a typical programming technique in functionallogic programs. However, there are also situations where a program should not fail (e.g., in a deterministic top-level computation) but the eval...
详细信息
Computing with failures is a typical programming technique in functionallogic programs. However, there are also situations where a program should not fail (e.g., in a deterministic top-level computation) but the evaluation fails accidentally, e.g., due to missing pattern combinations in an operation defined by pattern matching. In this case, the programmer is interested in the context of the failed program point in order to analyze the reason of the failure. Therefore, this paper discusses techniques for reporting failures and proposes a new one that has been integrated in a Prolog-based compiler for the declarative multi-paradigm language Curry. Our new technique supports separate compilation of modules, i.e., the compilation of modules has not taken into account whether failures should be reported or not. The failure reporting is only considered in some linking code for modules. In contrast to previous approaches, the execution of programs in the failure reporting mode causes only a small overhead so that it can be also used in larger applications.
Narrowing is a computation implemented by some declarative programming languages. Research in the last decade has produced significant results on the theory and foundation of narrowing, but little has been published o...
详细信息
Narrowing is a computation implemented by some declarative programming languages. Research in the last decade has produced significant results on the theory and foundation of narrowing, but little has been published on the use of narrowing in programming. This paper introduces narrowing from a programmer's viewpoint;shows, by means of examples, when, why and how to use narrowing in a program;and discusses the impact of narrowing on software development activities such as design and maintenance. The examples are coded in the programming language Curry, which provides narrowing as a first class feature. (C) 2010 Elsevier Ltd. All rights reserved.
We define a rewrite strategy for a class of non-confluent constructor-based term graph rewriting systems and prove its correctness. Our strategy and its extension to narrowing are intended for the implementation of no...
详细信息
We define a rewrite strategy for a class of non-confluent constructor-based term graph rewriting systems and prove its correctness. Our strategy and its extension to narrowing are intended for the implementation of non-strict non-deterministic functional logic programming languages. Our strategy is based on a graph transformation, called bubbling, that avoids the construction of large contexts of redexes with distinct replacements, an expensive and frequently wasteful operation executed by competitive complete techniques.
暂无评论