7,560 research outputs found

    Realising nondeterministic I/O in the Glasgow Haskell Compiler

    Get PDF
    In this paper we demonstrate how to relate the semantics given by the nondeterministic call-by-need calculus FUNDIO [SS03] to Haskell. After introducing new correct program transformations for FUNDIO, we translate the core language used in the Glasgow Haskell Compiler into the FUNDIO language, where the IO construct of FUNDIO corresponds to direct-call IO-actions in Haskell. We sketch the investigations of [Sab03b] where a lot of program transformations performed by the compiler have been shown to be correct w.r.t. the FUNDIO semantics. This enabled us to achieve a FUNDIO-compatible Haskell-compiler, by turning o not yet investigated transformations and the small set of incompatible transformations. With this compiler, Haskell programs which use the extension unsafePerformIO in arbitrary contexts, can be compiled in a "safe" manner

    On the safety of NĂścker's strictness analysis

    Get PDF
    This paper proves correctness of Nocker s method of strictness analysis, implemented for Clean, which is an e ective way for strictness analysis in lazy functional languages based on their operational semantics. We improve upon the work of Clark, Hankin and Hunt, which addresses correctness of the abstract reduction rules. Our method also addresses the cycle detection rules, which are the main strength of Nocker s strictness analysis. We reformulate Nocker s strictness analysis algorithm in a higherorder lambda-calculus with case, constructors, letrec, and a nondeterministic choice operator used as a union operator. Furthermore, the calculus is expressive enough to represent abstract constants like Top or Inf. The operational semantics is a small-step semantics and equality of expressions is defined by a contextual semantics that observes termination of expressions. The correctness of several reductions is proved using a context lemma and complete sets of forking and commuting diagrams. The proof is based mainly on an exact analysis of the lengths of normal order reductions. However, there remains a small gap: Currently, the proof for correctness of strictness analysis requires the conjecture that our behavioral preorder is contained in the contextual preorder. The proof is valid without referring to the conjecture, if no abstract constants are used in the analysis

    The role of parenting styles on behavior problem profiles of adolescents

    Get PDF
    Parental behavior is one of the most influential factors on the development of adolescent externalizing and internalizing behavior problems. These behavioral problems are closely related and often co-occur. The objectives of this work were: (i) to identify adolescents profiles according to their behavior problems; (ii) to explore individual, family, and social characteristics associated with these profiles; and (iii) to analyze the potential role of parenting styles in belonging to adolescents’ profiles. A total of 449 Spanish adolescents (223 from families declared at-risk and enrolled in Child Welfare Services and 226 from families from the general population) participated in this study. The analyses revealed three profiles of adolescents based on external and internal behavior problems (adjusted, external maladjustment, and internal maladjustment). Parenting styles explained the adolescents’ belonging to different profiles, in which the indulgent style was the most favorable in general terms. The distinctive role of parenting styles on two types of maladjustment profiles was confirmed. The relationship between parenting styles and adolescent adjustment is a key component that should be included in interventions according to adolescents’ behavior problem profiles. Furthermore, the results shed light on the need that family interventions are complemented with individualized interventions with adolescents that accumulate stressful life events.Ministerio de Economía y Competitividad EDU2013-41441-

    Save now, save later? Linkages between saving behaviour in adolescence and adulthood

    Get PDF
    The purpose of this paper is to review and critique the variety of definitions, concepts, and theories of psychological resilience. To this end, the narrative is divided into three main sections. The first considers how resilience has been defined in the psychology research literature. Despite the construct being operationalized in a variety of ways, most definitions are based around two core concepts: adversity and positive adaptation. A substantial body of evidence suggests that resilience is required in response to different adversities, ranging from ongoing daily hassles to major life events, and that positive adaptation must be conceptually appropriate to the adversity examined in terms of the domains assessed and the stringency of criteria used. The second section examines the conceptualization of resilience as either a trait or a process, and explores how it is distinct from a number of related terms. Resilience is conceptualized as the interactive influence of psychological characteristics within the context of the stress process. The final section reviews the theories of resilience and critically examines one theory in particular that is commonly cited in the resilience literature. Future theories in this area should take into account the multiple demands individuals encounter, the meta-cognitive and -emotive processes that affect the resilience-stress relationship, and the conceptual distinction between resilience and coping. The review concludes with implications for policy, practice, and research including the need to carefully manage individuals’ immediate environment, and to develop the protective and promotive factors that individuals can proactively use to build resilience

    Variable elimination for building interpreters

    Get PDF
    In this paper, we build an interpreter by reusing host language functions instead of recoding mechanisms of function application that are already available in the host language (the language which is used to build the interpreter). In order to transform user-defined functions into host language functions we use combinatory logic : lambda-abstractions are transformed into a composition of combinators. We provide a mechanically checked proof that this step is correct for the call-by-value strategy with imperative features.Comment: 33 page

    The Sigma-Semantics: A Comprehensive Semantics for Functional Programs

    Get PDF
    A comprehensive semantics for functional programs is presented, which generalizes the well-known call-by-value and call-by-name semantics. By permitting a separate choice between call-by value and call-by-name for every argument position of every function and parameterizing the semantics by this choice we abstract from the parameter-passing mechanism. Thus common and distinguishing features of all instances of the sigma-semantics, especially call-by-value and call-by-name semantics, are highlighted. Furthermore, a property can be validated for all instances of the sigma-semantics by a single proof. This is employed for proving the equivalence of the given denotational (fixed-point based) and two operational (reduction based) definitions of the sigma-semantics. We present and apply means for very simple proofs of equivalence with the denotational sigma-semantics for a large class of reduction-based sigma-semantics. Our basis are simple first-order constructor-based functional programs with patterns
    • …
    corecore