726 research outputs found

    Monadic parser combinators

    Get PDF
    In functional programming, a popular approach to building recursive descent parsers is to model parsers as functions, and to define higher-order functions (or combinators) that implement grammar constructions such as sequencing, choice, and repetition. Such parsers form an instance of a monad, an algebraic structure from mathematics that has proved useful for addressing a number of computational problems. The purpose of this report is to provide a step-by-step tutorial on the monadic approach to building functional parsers, and to explain some of the benefits that result from exploiting monads. No prior knowledge of parser combinators or of monads is assumed. Indeed, this report can also be viewed as a first introduction to the use of monads in programming

    Functional programming with bananas, lenses, envelopes and barbed wire

    Get PDF
    We develop a calculus for lazy functional programming based on recursion operators associated with data type definitions. For these operators we derive various algebraic laws that are useful in deriving and manipulating programs. We shall show that all example functions in Bird and Wadler's Introduction to Functional Programming can be expressed using these operators

    Money and Credit Factors

    Get PDF
    The authors introduce new measures of important underlying macroeconomic phenomena that affect the financial side of the economy. These measures are calculated using the time-series factor analysis (TSFA) methodology introduced in Gilbert and Meijer (2005). The measures appear to be both more interesting and more robust to the effects of financial innovations than traditional aggregates. The general ideas set out in Gilbert and Pichette (2003) are pursued, but the improved estimation methods of TSFA are used. Furthermore, four credit aggregates are added to the components of the monetary aggregates, resulting in the possibility of extracting more common factors.Credit and credit aggregates; Monetary aggregates; Econometric and statistical methods

    Matrix algebra for higher order moments

    Get PDF
    AbstractA large part of statistics is devoted to the estimation of models from the sample covariance matrix. The development of the statistical theory and estimators has been greatly facilitated by the introduction of special matrices, such as the commutation matrix and the duplication matrix, and the corresponding matrix algebra. Some more extensive models require, however, estimation based on higher order moments, typically third- and fourth-order moments. An example is the popular Kenny–Judd model that includes interactions between latent variables. This paper introduces some special matrices that can be used to simplify the model expressions for third-, fourth-, and higher order moments, gives some relationships between these matrices and related matrices, and gives some formulas for Kronecker products of three and four matrices. The theory is applied to derive convenient expressions for third- and fourth-order moments of some structural equation models

    A BMF FOR SEMANTICS

    Get PDF
    We show how the Bird-Meertens formalism (BMF) can be based on continuous algebras such that finite and infinite datatypes may peacefully coexist. Until recently the theory could only deal with either finite datatypes (= initial algebra) or infinite datatypes (= final co-algebra). In the context of continuous algebras the initial algebra coincides with the final co-algebra. Elements of this algebra can be finite, infinite or partial. We intend to use EBMF for semantics directed compiler generation by combining initial algebra semantics with the calculational power of BMF

    Computation of characteristics of value-of-time distributions and their standard errors

    Get PDF
    It is discussed how from some estimated bivariate distributions characteristics of the distribution of the ratio of the two random variables and standard errors thereof can be computed.

    Monadic parser combinators

    Get PDF
    In functional programming, a popular approach to building recursive descent parsers is to model parsers as functions, and to define higher-order functions (or combinators) that implement grammar constructions such as sequencing, choice, and repetition. Such parsers form an instance of a monad, an algebraic structure from mathematics that has proved useful for addressing a number of computational problems. The purpose of this report is to provide a step-by-step tutorial on the monadic approach to building functional parsers, and to explain some of the benefits that result from exploiting monads. No prior knowledge of parser combinators or of monads is assumed. Indeed, this report can also be viewed as a first introduction to the use of monads in programming
    • …
    corecore