Contract systems, especially of the higher-order flavor, go hand in hand with blame. The pragmatic purpose of blame is to narrow down the code that a programmer needs to examine to locate the bug when the contract system discovers a contract violation. Or so the literature on higher-order contracts claims. In reality, however, there is neither empirical nor theoretical evidence that connects blame with the location of bugs. The reputation of blame as a tool for weeding out bugs rests on anecdotes about how programmers use contracts to shift blame and their attention from one part of a program to another until they discover the source of the problem. This paper aims to fill the apparent gap and shed light to the relation between blame and bugs. To that end, we introduce an empirical methodology for investigating whether, for a given contract system, it is possible to translate blame information to the location of bugs in a systematic manner. Our methodology is inspired by how programmers attempt to increase the precision of the contracts of a blamed component in order to shift blame to another component, which becomes the next candidate for containing the bug. In particular, we construct a framework that enables us to ask for a contract system whether (i) the process of blame shifting causes blame to eventually settle to the component that contains the bug; and (ii) every shift moves blame ``closer'' to the faulty component. Our methodology offers a rigorous means for evaluating the pragmatics of contract systems, and we employ it to analyze Racket's contract system. Along the way, we uncover subtle points about the pragmatic meaning of contracts and blame in Racket: (i) the expressiveness of Racket's off-the-shelf contract language is not sufficient to narrow down the blamed portion of the code to the faulty component in all cases; and (ii) contracts that trigger state changes (even unexpectedly, perhaps in the runtime system's data structures or caches) interfere with program evaluation in subtle ways and thus blame shifting can lead programmers on a detour when searching for a bug. These points highlight how evaluations such as ours suggest fixes to language design.
more »
« less
Prioritization in visual attention does not work the way you think it does.
- Award ID(s):
- 1921735
- PAR ID:
- 10231208
- Date Published:
- Journal Name:
- Journal of Experimental Psychology: Human Perception and Performance
- Volume:
- 47
- Issue:
- 2
- ISSN:
- 0096-1523
- Page Range / eLocation ID:
- 252 to 268
- Format(s):
- Medium: X
- Sponsoring Org:
- National Science Foundation
More Like this
-
-
Abstract There seems to exist agreement about the fact that inflation squeezes the quantum state of cosmological perturbations and entangles modes with wavenumbers k⟶ and - k⟶ . Paradoxically, this result has been used to justify both the classicality as well as the quantumness of the primordial perturbations at the end of inflation. We reexamine this question and point out that the definition of two-mode squeezing of the modes k⟶ and - k⟶ used in previous work rests on choices that are only justified for systems with time-independent Hamiltonians and finitely many degrees of freedom. We argue that for quantum fields propagating on generic time-dependent Friedmann-Lemaître-Robertson-Walker backgrounds, the notion of squeezed states is subject to ambiguities, which go hand in hand with the ambiguity in the definition of particles. In other words, we argue that the question “does the cosmic expansion squeeze and entangle modes with wavenumbers k⟶ and - k⟶ ?” contains the same ambiguity as the question “does the cosmic expansion create particles?”. When additional symmetries are present, like in the (quasi) de Sitter-like spacetimes used in inflationary models, one can resolve the ambiguities, and we find that the answer to the question in the title turns out to be in the negative. We further argue that this fact does not make the state of cosmological perturbations any less quantum, at least when deviations from Gaussianity can be neglected.more » « less
An official website of the United States government

