2,516 research outputs found

    Linear Haskell: practical linearity in a higher-order polymorphic language

    Get PDF
    Linear type systems have a long and storied history, but not a clear path forward to integrate with existing languages such as OCaml or Haskell. In this paper, we study a linear type system designed with two crucial properties in mind: backwards-compatibility and code reuse across linear and non-linear users of a library. Only then can the benefits of linear types permeate conventional functional programming. Rather than bifurcate types into linear and non-linear counterparts, we instead attach linearity to function arrows. Linear functions can receive inputs from linearly-bound values, but can also operate over unrestricted, regular values. To demonstrate the efficacy of our linear type system - both how easy it can be integrated in an existing language implementation and how streamlined it makes it to write programs with linear types - we implemented our type system in GHC, the leading Haskell compiler, and demonstrate two kinds of applications of linear types: mutable data with pure interfaces; and enforcing protocols in I/O-performing functions

    The Analysis of Relationship Between Achievement Motivation, Self-Efficacy and Students Social Laziness

    Get PDF
    For students, social laziness is a major issue. Social lazines is linked to a number of elements, including self-efficacy and success drive. Individuals with a high level of self-efficacy can easily complete the tasks in their work group, thus they do not free ride in their work group. The purpose of this study is to investigate experimentally the link between self-eficacy and success motivation and social lazines in students. This study employs quantitative corelational approaches. This study's population consisted of students of one school in Indonesia. The sampel size for this study was 300 students drawn from eight courses using the custer random selection approach. According to the findings of this study, self-eficacy has a strong partial link with social lazines, with a significance value of 0.000 < 0.05 and a corelation value of -0.613. Achievemen motivation has a strong partially relationship with social sloth, with a significanc value of 0.000 < 0.05 and a corelation value of -0.623. Self-eficacy and succes drive are strongly asociated with social lazines. Furthermore, the three variables have a significant relationship, with a correlation value of 0.640. As a result, there is a link between students’ self-eficacy, succs motivation, and social lazines

    Efficient Optimally Lazy Algorithms for Minimal-Interval Semantics

    Full text link
    Minimal-interval semantics associates with each query over a document a set of intervals, called witnesses, that are incomparable with respect to inclusion (i.e., they form an antichain): witnesses define the minimal regions of the document satisfying the query. Minimal-interval semantics makes it easy to define and compute several sophisticated proximity operators, provides snippets for user presentation, and can be used to rank documents. In this paper we provide algorithms for computing conjunction and disjunction that are linear in the number of intervals and logarithmic in the number of operands; for additional operators, such as ordered conjunction and Brouwerian difference, we provide linear algorithms. In all cases, space is linear in the number of operands. More importantly, we define a formal notion of optimal laziness, and either prove it, or prove its impossibility, for each algorithm. We cast our results in a general framework of antichains of intervals on total orders, making our algorithms directly applicable to other domains.Comment: 24 pages, 4 figures. A preliminary (now outdated) version was presented at SPIRE 200

    Optimizing Abstract Abstract Machines

    Full text link
    The technique of abstracting abstract machines (AAM) provides a systematic approach for deriving computable approximations of evaluators that are easily proved sound. This article contributes a complementary step-by-step process for subsequently going from a naive analyzer derived under the AAM approach, to an efficient and correct implementation. The end result of the process is a two to three order-of-magnitude improvement over the systematically derived analyzer, making it competitive with hand-optimized implementations that compute fundamentally less precise results.Comment: Proceedings of the International Conference on Functional Programming 2013 (ICFP 2013). Boston, Massachusetts. September, 201

    The Social Contract with Endogenous Sentiments

    Get PDF
    Moral values influence individual behavior and social interactions. A specially significant instance is the case of moral values concerning work effort. Individuals determine what they take to be proper behaviour and judge the others, and themselves, accordingly. They increase their esteem -and self-esteem- for those who perform in excess of the standard and decrease their esteem for those who work less. These changes in self-esteem result from the self-regulatory emotions of guilt or pride extensively studied in Social Psychology. We examine the interactions between sentiments, individual behaviour and the social contract in a model of rational voting over redistribution where individual self-esteem and relative es-teem for others are endogenously determined. Individuals differ in their productivities. The desired extent of redistribution depends both on individual income and on individual attitudes toward others. We characterize the politico-economic equilibria in which sSocial Contract, Endogenous Sentiments, Voting over Taxes, Moral Work

    Soundness, idempotence and commutativity of set-sharing

    Get PDF
    It is important that practical data-flow analyzers are backed by reliably proven theoretical results. Abstract interpretation provides a sound mathematical framework and necessary generic properties for an abstract domain to be well-defined and sound with respect to the concrete semantics. In logic programming, the abstract domain Sharing is a standard choice for sharing analysis for both practical work and further theoretical study. In spite of this, we found that there were no satisfactory proofs for the key properties of commutativity and idempotence that are essential for Sharing to be well-defined and that published statements of the soundness of Sharing assume the occurs-check. This paper provides a generalization of the abstraction function for Sharing that can be applied to any language, with or without the occurs-check. Results for soundness, idempotence and commutativity for abstract unification using this abstraction function are proven
    • …
    corecore