148,817 research outputs found

    Structural Induction Principles for Functional Programmers

    Full text link
    User defined recursive types are a fundamental feature of modern functional programming languages like Haskell, Clean, and the ML family of languages. Properties of programs defined by recursion on the structure of recursive types are generally proved by structural induction on the type. It is well known in the theorem proving community how to generate structural induction principles from data type declarations. These methods deserve to be better know in the functional programming community. Existing functional programming textbooks gloss over this material. And yet, if functional programmers do not know how to write down the structural induction principle for a new type - how are they supposed to reason about it? In this paper we describe an algorithm to generate structural induction principles from data type declarations. We also discuss how these methods are taught in the functional programming course at the University of Wyoming. A Haskell implementation of the algorithm is included in an appendix.Comment: In Proceedings TFPIE 2013, arXiv:1312.221

    What Does Aspect-Oriented Programming Mean for Functional Programmers?

    Get PDF
    Aspect-Oriented Programming (AOP) aims at modularising crosscutting concerns that show up in software. The success of AOP has been almost viral and nearly all areas in Software Engineering and Programming Languages have become "infected" by the AOP bug in one way or another. Interestingly the functional programming community (and, in particular, the pure functional programming community) seems to be resistant to the pandemic. The goal of this paper is to debate the possible causes of the functional programming community's resistance and to raise awareness and interest by showcasing the benefits that could be gained from having a functional AOP language. At the same time, we identify the main challenges and explore the possible design-space

    Typing rule-based transformations over topological collections

    Get PDF
    Pattern-matching programming is an example of a rule-based programming style developed in functional languages. This programming style is intensively used in dialects of ML but is restricted to algebraic data-types. This restriction limits the field of application. However, as shown by Giavitto and Michel at RULE'02, case-based function definitions can be extended to more general data structures called topological collections. We show in this paper that this extension retains the benefits of the typed discipline of the functional languages. More precisely, we show that topological collections and the rule-based definition of functions associated with them fit in a polytypic extension of mini-ML where type inference is still possible

    Deciding subset relationship of co-inductively defined set constants

    Get PDF
    Static analysis of different non-strict functional programming languages makes use of set constants like Top, Inf, and Bot denoting all expressions, all lists without a last Nil as tail, and all non-terminating programs, respectively. We use a set language that permits union, constructors and recursive definition of set constants with a greatest fixpoint semantics. This paper proves decidability, in particular EXPTIMEcompleteness, of subset relationship of co-inductively defined sets by using algorithms and results from tree automata. This shows decidability of the test for set inclusion, which is required by certain strictness analysis algorithms in lazy functional programming languages

    Bricklayer: An Authentic Introduction to the Functional Programming Language SML

    Full text link
    Functional programming languages are seen by many as instrumental to effectively utilizing the computational power of multi-core platforms. As a result, there is growing interest to introduce functional programming and functional thinking as early as possible within the computer science curriculum. Bricklayer is an API, written in SML, that provides a set of abstractions for creating LEGO artifacts which can be viewed using LEGO Digital Designer. The goal of Bricklayer is to create a problem space (i.e., a set of LEGO artifacts) that is accessible and engaging to programmers (especially novice programmers) while providing an authentic introduction to the functional programming language SML.Comment: In Proceedings TFPIE 2014, arXiv:1412.473

    A survey of functional programming language principles

    Get PDF
    Research in the area of functional programming languages has intensified in the 8 years since John Backus' Turing Award Lecture on the topic was published. The purpose of this paper is to present a survey of the ideas of functional programming languages. The paper assumes the reader is comfortable with mathematics and has knowledge of the basic principles of traditional programming languages, but does not assume any prior knowledge of the ideas of functional languages. A simple functional language is defined and used to illustrate the basic ideas. Topics discussed include the reasons for developing functional languages, methods of expressing concurrency, the algebra of functional programming languages, program transformation techniques, and implementations of functional languages. Existing functional languages are also mentioned. The paper concludes with the author's opinions as to the future of functional languages. An annotated bibliography on the subject is also included
    • …
    corecore