5 research outputs found

    Normalisierung und partielle Auswertung von funktional-logischen Programmen

    Get PDF
    This thesis deals with the development of a normalization scheme and a partial evaluator for the functional logic programming language Curry. The functional logic programming paradigm combines the two most important fields of declarative programming, namely functional and logic programming. While functional languages provide concepts such as algebraic data types, higher-order functions or demanddriven evaluation, logic languages usually support a non-deterministic evaluation and a built-in search for results. Functional logic languages finally combine these two paradigms in an integrated way, hence providing multiple syntactic constructs and concepts to facilitate the concise notation of high-level programs. However, both the variety of syntactic constructs and the high degree of abstraction complicate the translation into efficient target programs. To reduce the syntactic complexity of functional logic languages, a typical compilation scheme incorporates a normalization phase to subsequently replace complex constructs by simpler ones until a minimal language subset is reached. While the individual transformations are usually simple, they also have to be correctly combined to make the syntactic constructs interact in the intended way. The efficiency of normalized programs can then be improved by means of different optimization techniques. A very powerful optimization technique is the partial evaluation of programs. Partial evaluation basically anticipates the execution of certain program fragments at compile time and computes a semantically equivalent program, which is usually more efficient at run time. Since partial evaluation is a fully automatic optimization technique, it can also be incorporated into the normal compilation scheme of programs. Nevertheless, this also requires termination of the optimization process, which establishes one of the main challenges for partial evaluation besides semantic equivalence. In this work we consider the language Curry as a representative of the functional logic programming paradigm. We develop a formal representation of the normalization process of Curry programs into a kernel language, while respecting the interference of different language constructs. We then define the dynamic semantics of this kernel language, before we subsequently develop a partial evaluation scheme and show its correctness and termination. Due to the previously described normalization process, this scheme is then directly applicable to arbitrary Curry programs. Furthermore, the implementation of a practical partial evaluator is sketched based on the partial evaluation scheme, and its applicability and usefulness is documented by a variety of typical partial evaluation examples

    On the efficiency of meta-level inference

    Get PDF
    In this thesis we will be concerned with a particular type of architecture for reasoning systems, known as meta-level architectures. After presenting the arguments for such architectures (chapter 1), we discuss a number of systems in the literature that provide an explicit meta-level architecture (chapter 2), and these systems are compared on the basis of a number of distinguishing characteristics. This leads to a classification of meta-level architectures (chapter 3). Within this classification we compare the different types of architectures, and argue that one of these types, called bilingual meta-level inference systems, has a number of advantages over the other types. We study the general structure of bilingual meta-level inference architectures (chapter 4), and we discuss the details of a system that we implemented which has this architecture (chapter 5). One of the problems that this type of system suffers from is the overhead that is incurred by the meta-level effort. We give a theoretical model of this problem, and we perform measurements which show that this problem is indeed a significant one (chapter 6). Chapter 7 discusses partial evaluation, the main technique available in the literature to reduce the meta-level overhead. This technique, although useful, suffers from a number of serious problems. We propose two further techniques, partial reflection and many-sorted logic (chapters 8 and 9), which can be used to reduce the problem of meta-level overhead without suffering from these problems

    The power of partial evaluation

    No full text

    Logic program specialisation with deletion of useless clauses

    No full text
    In this paper we describe a method of program specialisation and give an extended example of its application to specialisation of a refutation proof procedure for rst order logic. In the specialisation method, a partial evaluation of the proof procedure with respect to a given theory is rst obtained. Secondly an abstract interpretation of the partially evaluated program is computed, and this is used to detect and remove clauses that yield no solutions (useless clauses). A proof is given that such clauses can be deleted from a normal program while preserving the results of all nite computations. The model elimination proof procedure described in [20] is specialised with respect to given theories, and the negative ancestor check inference rule can be eliminated in cases where it is not relevant. Our results for the model elimination prover, obtained by general-purpose transformations, are comparable to those obtained in [20] by a special-purpose analysis. It is shown that specialisations of the proof procedure can be achieved that cannot be obtained by partial evaluation. The method is applicable to any normal program, and thus provides an extension of the power of partial evaluation
    corecore