1,574 research outputs found

    First Class Call Stacks: Exploring Head Reduction

    Get PDF
    Weak-head normalization is inconsistent with functional extensionality in the call-by-name λ\lambda-calculus. We explore this problem from a new angle via the conflict between extensionality and effects. Leveraging ideas from work on the λ\lambda-calculus with control, we derive and justify alternative operational semantics and a sequence of abstract machines for performing head reduction. Head reduction avoids the problems with weak-head reduction and extensionality, while our operational semantics and associated abstract machines show us how to retain weak-head reduction's ease of implementation.Comment: In Proceedings WoC 2015, arXiv:1606.0583

    Control Reduction Theories: the Benefit of Structural Substitution

    Get PDF
    L'article contient une annexe historique par Matthias Felleisen sur la génèse des opérateurs de contrôle à l'université d'Indiana à la fin des années 80.International audienceThe historical design of the call-by-value theory of control relies on the reification of evaluation contexts as regular functions and on the use of ordinary term application for jumping to a continuation. To the contrary, the lambda-C-tp control calculus, developed by the authors, distinguishes between jumps and terms. This alternative calculus, which derives from Parigot's lambda-mu-calculus, works by direct "structural substitution" of evaluation contexts. We review and revisit the legacy theories of control and argue that lambda-C-tp provides an observationally equivalent but smoother theory. In an additional note contributed by Matthias Felleisen, we review the story of the birth of control calculi during the mid to late eighties at Indiana University

    Beyond Polarity: Towards a Multi-Discipline Intermediate Language with Sharing

    Get PDF
    The study of polarity in computation has revealed that an "ideal" programming language combines both call-by-value and call-by-name evaluation; the two calling conventions are each ideal for half the types in a programming language. But this binary choice leaves out call-by-need which is used in practice to implement lazy-by-default languages like Haskell. We show how the notion of polarity can be extended beyond the value/name dichotomy to include call-by-need by only adding a mechanism for sharing and the extra polarity shifts to connect them, which is enough to compile a Haskell-like functional language with user-defined types

    A Type-Theoretic Foundation of Delimited Continuations

    Get PDF
    International audienceThere is a correspondence between classical logic and programming language calculi with first-class continuations. With the addition of control delimiters, the continuations become composable and the calculi become more expressive. We present a fine-grained analysis of control delimiters and formalise that their addition corresponds to the addition of a single dynamically-scoped variable modelling the special top-level continuation. From a type perspective, the dynamically-scoped variable requires effect annotations. In the presence of control, the dynamically-scoped variable can be interpreted in a purely functional way by applying a store-passing style. At the type level, the effect annotations are mapped within standard classical logic extended with the dual of implication, namely subtraction. A continuation-passing-style transformation of lambda-calculus with control and subtraction is defined. Combining the translations provides a decomposition of standard CPS transformations for delimited continuations. Incidentally, we also give a direct normalisation proof of the simply-typed lambda-calculus with control and subtraction

    Importance of psychological support in pain management in terminal patients

    Get PDF
    Pain is unpleasant sensation, suffering or distress of the body or mind. This feeling impairs active life and and make you feel tired and tense. Pain often accompanies terminal patients affecting all aspects of life. In the cancer population, its prevalence is over 75% for those with advanced disease (Dahlia Rizk, 2017.). Techniques mainly used in Albania for pain management are those with medications, ranging from mild to severe such as morphine or other opiate family medications. The purpose of this research is to investigate the services offered to terminal patients in Albania, in terms of pain management. The psychological approach to treating pain is lacking, affected not only by the mentality of the sick and their families, but also by the total (or few in number) lack of psychological services integrated into primary health care facilities

    Lambda Calculus with Explicit Recursion

    Get PDF
    AbstractThis paper is concerned with the study ofλ-calculus with explicit recursion, namely of cyclicλ-graphs. The starting point is to treat aλ-graph as a system of recursion equations involvingλ-terms and to manipulate such systems in an unrestricted manner, using equational logic, just as is possible for first-order term rewriting. Surprisingly, now the confluence property breaks down in an essential way. Confluence can be restored by introducing a restraining mechanism on the substitution operation. This leads to a family ofλ-graph calculi, which can be seen as an extension of the family ofλσ-calculi (λ-calculi with explicit substitution). While theλσ-calculi treat the let-construct as a first-class citizen, our calculi support the letrec, a feature that is essential to reason about time and space behavior of functional languages and also about compilation and optimizations of program

    Model predictive control of resistive wall mode for ITER

    Full text link
    Active feedback stabilization of the dominant resistive wall mode (RWM) for an ITER H-mode scenario at high plasma pressure using infinite-horizon model predictive control (MPC) is presented. The MPC approach is closely-related to linear-quadratic-Gaussian (LQG) control, improving the performance in the vicinity of constraints. The control-oriented model for MPC is obtained with model reduction from a high-dimensional model produced by CarMa code. Due to the limited time for on-line optimization, a suitable MPC formulation considering only input (coil voltage) constraints is chosen, and the primal fast gradient method is used for solving the associated quadratic programming problem. The performance is evaluated in simulation in comparison to LQG control. Sensitivity to noise, robustness to changes of unstable RWM dynamics, and size of the domain of attraction of the initial conditions of the unstable modes are examined.Comment: Original manuscript as submitted to Fusion Engineering and Desig
    corecore