23,700 research outputs found
Augmenting Source Code Lines with Sample Variable Values
Source code is inherently abstract, which makes it difficult to understand.
Activities such as debugging can reveal concrete runtime details, including the
values of variables. However, they require that a developer explicitly requests
these data for a specific execution moment. We present a simple approach,
RuntimeSamp, which collects sample variable values during normal executions of
a program by a programmer. These values are then displayed in an ambient way at
the end of each line in the source code editor. We discuss questions which
should be answered for this approach to be usable in practice, such as how to
efficiently record the values and when to display them. We provide partial
answers to these questions and suggest future research directions
A real explanation for heterogeneous investment dynamics
Household investment, that is investment in consumer durables and housing, leads non-residential fixed investment over the U.S. business cycle. This observation represents a potent challenge to real business cycle (RBC) theory. First of all the theory has been unable to account for it. In addition, research suggests the observation is driven by monetary shocks, supporting the view that these shocks play a leading role in the U.S. business cycle. This paper shows that RBC theory is consistent with the investment dynamics after all. It does so by generalizing the standard home production environment to take into account the fact that household capital is useful in market production.Monetary theory ; Business cycles
DSpot: Test Amplification for Automatic Assessment of Computational Diversity
Context: Computational diversity, i.e., the presence of a set of programs
that all perform compatible services but that exhibit behavioral differences
under certain conditions, is essential for fault tolerance and security.
Objective: We aim at proposing an approach for automatically assessing the
presence of computational diversity. In this work, computationally diverse
variants are defined as (i) sharing the same API, (ii) behaving the same
according to an input-output based specification (a test-suite) and (iii)
exhibiting observable differences when they run outside the specified input
space. Method: Our technique relies on test amplification. We propose source
code transformations on test cases to explore the input domain and
systematically sense the observation domain. We quantify computational
diversity as the dissimilarity between observations on inputs that are outside
the specified domain. Results: We run our experiments on 472 variants of 7
classes from open-source, large and thoroughly tested Java classes. Our test
amplification multiplies by ten the number of input points in the test suite
and is effective at detecting software diversity. Conclusion: The key insights
of this study are: the systematic exploration of the observable output space of
a class provides new insights about its degree of encapsulation; the behavioral
diversity that we observe originates from areas of the code that are
characterized by their flexibility (caching, checking, formatting, etc.).Comment: 12 page
- …