738 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

    XML: aplicações e tecnologias associadas: 6th National Conference

    Get PDF
    This volume contains the papers presented at the Sixth Portuguese XML Conference, called XATA (XML, Aplicações e Tecnologias Associadas), held in Évora, Portugal, 14-15 February, 2008. The conference followed on from a successful series held throughout Portugal in the last years: XATA2003 was held in Braga, XATA2004 was held in Porto, XATA2005 was held in Braga, XATA2006 was held in Portalegre and XATA2007 was held in Lisboa. Dued to research evaluation criteria that are being used to evaluate researchers and research centers national conferences are becoming deserted. Many did not manage to gather enough submissions to proceed in this scenario. XATA made it through. However with a large decrease in the number of submissions. In this edition a special meeting will join the steering committee with some interested attendees to discuss XATA's future: internationalization, conference model, ... We think XATA is important in the national context. It has succeeded in gathering and identifying a comunity that shares the same research interests and has promoted some colaborations. We want to keep "the wheel spinning"... This edition has its program distributed by first day's afternoon and next day's morning. This way we are facilitating travel arrangements and we will have one night to meet

    Unification of terms with exponents

    No full text
    In an ICALP (1991) paper, H. Chen and J. Hsiang introduced a notion that allows for a finite representation of certain infinite sets of terms. These so called w-terms find an application in logic programming, where they can serve to represent finitely an infinite number of answers or to avoid nontermination in certain cases. Another application is in the field of equational logic. Using w-terms, it is possible to avoid a certain type of divergence of ordered completion. In all cases, unification is the basic computational aspect of this notation. Chen and Hsiang give a complete and terminating unification algorithm for w-terms. Recently, H. Comon introduced terms with exponents, thus significantly extending Chen and Hsiang's notion of w-terms. He provides a fairly complicated unification algorithm. This paper introduces a further syntactic generalization of Comon's notion together with a comparatively simple inference system for unification

    An Implementation of the Language Lambda Prolog Organized around Higher-Order Pattern Unification

    Full text link
    This thesis concerns the implementation of Lambda Prolog, a higher-order logic programming language that supports the lambda-tree syntax approach to representing and manipulating formal syntactic objects. Lambda Prolog achieves its functionality by extending a Prolog-like language by using typed lambda terms as data structures that it then manipulates via higher-order unification and some new program-level abstraction mechanisms. These additional features raise new implementation questions that must be adequately addressed for Lambda Prolog to be an effective programming tool. We consider these questions here, providing eventually a virtual machine and compilation based realization. A key idea is the orientation of the computation model of Lambda Prolog around a restricted version of higher-order unification with nice algorithmic properties and appearing to encompass most interesting applications. Our virtual machine embeds a treatment of this form of unification within the structure of the Warren Abstract Machine that is used in traditional Prolog implementations. Along the way, we treat various auxiliary issues such as the low-level representation of lambda terms, the implementation of reduction on such terms and the optimized processing of types in computation. We also develop an actual implementation of Lambda Prolog called Teyjus Version 2. A characteristic of this system is that it realizes an emulator for the virtual machine in the C language a compiler in the OCaml language. We present a treatment of the software issues that arise from this kind of mixing of languages within one system and we discuss issues relevant to the portability of our virtual machine emulator across arbitrary architectures. Finally, we assess the the efficacy of our various design ideas through experiments carried out using the system

    Elements of mathematics and logic for computer program analysis

    Get PDF
    1 Introduction 2 Induction and sequences 2.1 Induction on natural numbers 2.2 Words and sequences 2.3 A digression on set theory 2.4 Induction on words 2.5 Grammar rules and string rewriting 3 Terms 3.1 Definition of terms 3.2 Knaster-Tarski's fixpoint theorem (1927) 3.3 Kleene's fixpoint theorem (1952?) 3.4 Pattern matching and term rewriting 3.5 Models of a term algebra 4 Lambda-calculus 4.1 Definition of λ-calculus 4.2 Church-computable functions 4.3 Kleene-computable functions 4.4 Turing-computable functions 5 Simply-typed lambda-calculus 5.1 Curry-style simply-typed λ-calculus . 5.2 Unification 5.3 Type inference 5.4 Church-style simply-typed λ-calculus 6 First-order logic 6.1 Formulas and truth 6.2 Provability and deduction systems 6.3 Proof terms and Curry-Howard correspondence 7 To go further 8 Solutions to exercises 8.1 Section 2: Induction and sequences 8.2 Section 3: Terms 8.3 Section 4: Lambda-calculus 8.4 Section 5: Simply-typed lambda-calculus 8.5 Section 6: First-order logicMasterIn order to be able to rigorously prove the correctness of a program, one must have a formal definition of: what is a program, syntactically; how it is evaluated, that is, what is its semantics; how to formulate the properties we are interested in; and how to prove them. All this requires to understand some basic mathematical notions like induction, terms, formulas, deduction, etc. These notes are intended to give an introduction to some of these notions

    Order-Sorted Unification with Regular Expression Sorts

    Get PDF
    We extend first-order order-sorted unification by permitting regular expression sorts for variables and in the domains of function symbols. The set of basic sorts is finite. The obtained signature corresponds to a finite bottom-up hedge automaton. The unification problem in such a theory generalizes some known unification problems. Its unification type is infinitary. We give a complete unification procedure and prove decidability
    corecore