78 research outputs found

    Well-Typed Programs Can’t Be Blamed

    Get PDF
    We introduce the blame calculus, which adds the notion of blame from Findler and Felleisen’s contracts to a system similar to Siek and Taha’s gradual types and Flanagan’s hybrid types. We characterise where positive and negative blame can arise by decomposing the usual notion of subtype into positive and negative subtypes, and show that these recombine to yield naive subtypes. Naive subtypes previously appeared in type systems that are unsound, but we believe this is the first time naive subtypes play a role in establishing type soundness

    A Simple and Practical Approach to Unit Testing: The JML and JUnit Way

    Get PDF
    Writing unit test code is labor-intensive, hence it is often not done as an integral part of programming. However, unit testing is a practical approach to increasing the correctness and quality of software; for example, the Extreme Programming approach relies on frequent unit testing. In this paper we present a new approach that makes writing unit tests easier. It uses a formal specification language\u27s runtime assertion checker to decide whether methods are working correctly, thus automating the writing of unit test oracles. These oracles can be easily combined with hand-written test data. Instead of writing testing code, the programmer writes formal specifications (e.g., pre- and postconditions). This makes the programmer\u27s task easier, because specifications are more concise and abstract than the equivalent test code, and hence more readable and maintainable. Furthermore, by using specifications in testing, specification errors are quickly discovered, so the specifications are more likely to provide useful documentation and inputs to other tools. We have implemented this idea using the Java Modeling Language (JML) and the JUnit testing framework, but the approach could be easily implemented with other combinations of formal specification languages and unit test tools

    A Simple and Practical Approach to Unit Testing: The JML and JUnit Way

    Get PDF
    Writing unit test code is labor-intensive, hence it is often not done as an integral part of programming. However, unit testing is a practical approach to increasing the correctness and quality of software; for example, the Extreme Programming approach relies on frequent unit testing. In this paper we present a new approach that makes writing unit tests easier. It uses a formal specification language\u27s runtime assertion checker to decide whether methods are working correctly, thus automating the writing of unit test oracles. These oracles can be easily combined with hand-written test data. Instead of writing testing code, the programmer writes formal specifications (e.g., pre- and postconditions). This makes the programmer\u27s task easier, because specifications are more concise and abstract than the equivalent test code, and hence more readable and maintainable. Furthermore, by using specifications in testing, specification errors are quickly discovered, so the specifications are more likely to provide useful documentation and inputs to other tools. We have implemented this idea using the Java Modeling Language (JML) and the JUnit testing framework, but the approach could be easily implemented with other combinations of formal specification languages and unit test tools

    Communicative Predictors of a Shared Family Identity: Comparison of Grandchildren’s Perceptions of Family-of-Origin Grandparents and Stepgrandparents

    Get PDF
    From an intergroup perspective on family relationships, the current study investigates family-of-origin grandparents and stepgrandparents to determine similarities and differences in communication and relational dimensions. Participants (N = 88) completed questionnaires on family-of-origin grandparents and stepgrandparent relationships. From the perspective of young adult grandchildren, the research explores the role of supportive communication, reciprocal self-disclosure, nonaccommodative communication, and parental encouragement in predicting a sense of shared family identity with each grandparent type. Results are discussed in terms of implications for intergroup research, grandparent-grandchild communication, and stepfamily relationships

    An unusual case of chronic meningitis

    Get PDF
    BACKGROUND: Chronic meningitis is defined as symptoms and signs of meningeal inflammation and persisting cerebrospinal fluid abnormalities such as elevated protein level and pleocytosis for at least one month. CASE PRESENTATION: A 62-year-old woman, of unremarkable past medical history, was admitted to hospital for investigation of a four-week history of vomiting, malaise an associated hyponatraemia. She had a low-grade pyrexia with normal inflammatory markers. A CT brain was unremarkable and a contrast MRI brain revealed sub-acute infarction of the right frontal cortex but with no evidence of meningeal enhancement. Due to increasing confusion and patient clinical deterioration a lumbar puncture was performed at 17 days post admission. This revealed gram-negative coccobacilli in the CSF, which was identified as Neisseria meningitidis group B. The patient made a dramatic recovery with high-dose intravenous ceftriaxone antibiotic therapy for meningococcal meningitis. CONCLUSIONS: 1) Chronic bacterial meningitis may present highly atypically, particularly in the older adult. 2) There may be an absent or reduced febrile response, without a rise in inflammatory markers, despite a very unwell patient. 3) Early lumbar puncture is to be encouraged as it is essential to confirm the diagnosis.4) Despite a delayed diagnosis appropriate antibiotic therapy can still lead to a good outcome

    Integrating education for sustainable development into a higher education institution: beginning the journey

    Get PDF
    Much of the current literature on integrating sustainability into HEIs is focussed on why HEIs should embrace sustainable development (SD) and what is still missing or hindering work and the integration of efforts. There is much less exploration of how SD has been interpreted at the individual HEI level and action taken as a result. This case study reflects on important elements of the journey Nottingham Trent University (NTU) in the UK has taken to integrate sustainability, focussing on key decisions and activity in 2009/10. In highlighting this, the authors seek to empower those looking to support and/or lead the embedding of Education for Sustainable Development (ESD), separately or as part of an integrated effort, in their own institution. Today in 2019, NTU is a global leader in integrating ESD as part of a wider SD agenda. The work which this paper presents, to understand and establish a baseline of key elements of NTU’s existing ESD activity and systems, was an important turning point. Activities undertaken to review and assess ‘where are we now?’, primarily through an institution-wide survey in 2009/10, led to important insights and supported dialogue, as well as the connection and underpinning of core administrative elements of the NTU SD framework and systems. Further recommendations are given in the final section of this paper on other drivers that can help to embed ESD within an HEI

    Practical Typed Lazy Contracts

    Get PDF
    Until now there has been no support for specifying and enforcing contracts within a lazy functional program. That is a shame, because contracts consist of pre- and post-conditions for functions that go beyond the standard static types. This paper presents the design and implementation of a small, easy-to-use, purely functional contract library for Haskell, which, when a contract is violated, also provides more useful information than the classical blaming of one contract partner. From now on lazy functional languages can profit from the assurances in the development of correct programs that contracts provide

    Modeling an Algebraic Stepper

    Get PDF
    Programmers rely on the correctness of the tools in their programming environments. In the past, semanticists have studied the correctness of compilers and compiler analyses, which are the most important tools. In this paper, we make the case that other tools, such as debuggers and steppers, deserve semantic models, too, and that using these models can help in developing these tools. Our concrete starting point is the algebraic stepper in DrScheme, our Scheme programming environment. The algebraic stepper explains a Scheme computation in terms of an algebraic rewriting of the program text. A program is rewritten until it is in a canonical form (if it has one). The canonical form is the final result. The stepper operates within the existing evaluator, by placing breakpoints and by reconstructing source expressions from source information placed on the stack. This approach raises two questions. First, do the run-time breakpoints correspond to the steps of the reduction semantics? Second, does the debugging mechanism insert enough information to reconstruct source expressions? To answer these questions, we develop a high-level semantic model of the extended compiler and run-time machinery. Rather than modeling the evaluation as a low-level machine, we model the relevant low-level features of the stepper’s implementation in a high-level reduction semantics. We expect the approach to apply to other semantics-based tools

    Enforcing information hiding in interface specifications: a client-aware checking approach

    No full text
    Information hiding is an established principle that controls which parts of a module are visible to non-privileged and privileged clients (e.g., subclasses). This aids maintenance because hidden implementation details can be changed without affecting clients. The benefits of information hiding apply not only to code but also to other artifacts, such as specifications. Unfortunately, contemporary formal interface specification languages and their respective runtime assertion checkers (RACs) are inconsistent with information hiding rules because they check assertions in an overly-dynamic manner on the supplier side. We explain how overly-dynamic RACs compromise information hiding and how our client-aware checking technique allows these RACs to use the privacy information in specifications, which promotes information hiding

    The DrScheme project

    No full text
    • …
    corecore