265 research outputs found

    Linear, bounded, functional pretty-printing

    Get PDF
    We present two implementations of Oppen's pretty-printing algorithm in Haskell that meet the efficiency of Oppen's imperative solution but have a simpler, clear structure. We start with an implementation that uses lazy evaluation to simulate two co-operating processes. Then we present an implementation that uses higher-order functions for delimited continuations to simulate co-routines with explicit scheduling

    Fast, Error Correcting Parser Combinators: A Short Tutorial

    Full text link

    Divination: Exemplifying and Configuring Archetypes in Ceramics

    Get PDF
    Abstract/Summary Dissertation Divination: Exemplifying and Configuring Archetypes in Ceramics is a study of my research practice. The cards of the tarot can be used as a conceptual framework and source of inspiration for making ceramic sculptures. The cards can be used to understand the creative process as an expression of archetypes. My dissertation discusses these archetypes from the tarot cards, both in their historical operation, their manifestation in my art practice, as well as, examining approaches taken to these archetypes by other artists such as Salvador Dali and Niki de Saint Phalle. The theoretical basis for the dissertation is informed by the writings of Carl G. Jung who has proposed concepts dealing with creativity, coincidence, a collective unconscious and archetypes. These ideas form a model for the understanding of my studio work. As background, the dissertation examines examples of artworks that could be seen to be drawn from a collective unconscious. Studio Work The studio work consists of a series of ceramic sculptures formulating the archetypes that I have derived from the tarot cards. The three dimensional clay, with found inclusions, examines the idea of specific archetypes. These archetypes are titled in the works including: The Fool, Strength, The Magician, Tarot Sun, The Empress II, The Lovers, Empress l, The Chariot I and II The Angel Temperance, The Tarot Devil and The World. The ceramic objects have been created in clay using handbuilding techniques. The clay was such that it could include found ceramic pieces and be refired. The pieces have been re-fired many times to achieve a variety of glaze effects. The works range in size from 30-60 cms approximately and include freestanding sculptures and complementing flat wall works

    Hindley-Milner Elaboration in Applicative Style

    Get PDF
    International audienceType inference—the problem of determining whether a program is well-typed—is well-understood. In contrast, elaboration—the task of constructing an explicitly-typed representation of the program— seems to have received relatively little attention, even though, in a non-local type inference system, it is non-trivial. We show that the constraint-based presentation of Hindley-Milner type inference can be extended to deal with elaboration, while preserving its elegance. This involves introducing a new notion of "constraint with a value", which forms an applicative functor

    Prediction of torsional failure in 22 cadaver femora with and without simulated subtrochanteric metastatic defects: a CT scan-based finite element analysis

    Get PDF
    BACKGROUND: In metastatic bone disease, prophylactic fixation of impending long bone fracture is preferred over surgical treatment of a manifest fracture. There are no reliable guidelines for prediction of pathological fracture risk, however. We aimed to determine whether finite element (FE) models constructed from quantitative CT scans could be used for predicting pathological fracture load and location in a cadaver model of metastatic bone disease. MATERIAL AND METHODS: Subject-specific FE models were constructed from quantitative CT scans of 11 pairs of human femora. To simulate a metastatic defect, a transcortical hole was made in the subtrochanteric region in one femur of each pair. All femora were experimentally loaded in torsion until fracture. FE simulations of the experimental set-up were performed and torsional stiffness and strain energy density (SED) distribution were determined. RESULTS: In 15 of the 22 cases, locations of maximal SED fitted with the actual fracture locations. The calculated torsional stiffness of the entire femur combined with a criterion based on the local SED distribution in the FE model predicted 82% of the variance of the experimental torsional failure load. INTERPRETATION: In the future, CT scan-based FE analysis may provide a useful tool for identification of impending pathological fractures requiring prophylactic stabilization

    LL(1) Parsing with Derivatives and Zippers

    Full text link
    In this paper, we present an efficient, functional, and formally verified parsing algorithm for LL(1) context-free expressions based on the concept of derivatives of formal languages. Parsing with derivatives is an elegant parsing technique, which, in the general case, suffers from cubic worst-case time complexity and slow performance in practice. We specialise the parsing with derivatives algorithm to LL(1) context-free expressions, where alternatives can be chosen given a single token of lookahead. We formalise the notion of LL(1) expressions and show how to efficiently check the LL(1) property. Next, we present a novel linear-time parsing with derivatives algorithm for LL(1) expressions operating on a zipper-inspired data structure. We prove the algorithm correct in Coq and present an implementation as a parser combinators framework in Scala, with enumeration and pretty printing capabilities.Comment: Appeared at PLDI'20 under the title "Zippy LL(1) Parsing with Derivatives
    • …
    corecore