3,562 research outputs found

    Finding The Lazy Programmer's Bugs

    Get PDF
    Traditionally developers and testers created huge numbers of explicit tests, enumerating interesting cases, perhaps biased by what they believe to be the current boundary conditions of the function being tested. Or at least, they were supposed to. A major step forward was the development of property testing. Property testing requires the user to write a few functional properties that are used to generate tests, and requires an external library or tool to create test data for the tests. As such many thousands of tests can be created for a single property. For the purely functional programming language Haskell there are several such libraries; for example QuickCheck [CH00], SmallCheck and Lazy SmallCheck [RNL08]. Unfortunately, property testing still requires the user to write explicit tests. Fortunately, we note there are already many implicit tests present in programs. Developers may throw assertion errors, or the compiler may silently insert runtime exceptions for incomplete pattern matches. We attempt to automate the testing process using these implicit tests. Our contributions are in four main areas: (1) We have developed algorithms to automatically infer appropriate constructors and functions needed to generate test data without requiring additional programmer work or annotations. (2) To combine the constructors and functions into test expressions we take advantage of Haskell's lazy evaluation semantics by applying the techniques of needed narrowing and lazy instantiation to guide generation. (3) We keep the type of test data at its most general, in order to prevent committing too early to monomorphic types that cause needless wasted tests. (4) We have developed novel ways of creating Haskell case expressions to inspect elements inside returned data structures, in order to discover exceptions that may be hidden by laziness, and to make our test data generation algorithm more expressive. In order to validate our claims, we have implemented these techniques in Irulan, a fully automatic tool for generating systematic black-box unit tests for Haskell library code. We have designed Irulan to generate high coverage test suites and detect common programming errors in the process

    Bulk Composition of GJ 1214b and other sub-Neptune exoplanets

    Full text link
    GJ1214b stands out among the detected low-mass exoplanets, because it is, so far, the only one amenable to transmission spectroscopy. Up to date there is no consensus about the composition of its envelope although most studies suggest a high molecular weight atmosphere. In particular, it is unclear if hydrogen and helium are present or if the atmosphere is water dominated. Here, we present results on the composition of the envelope obtained by using an internal structure and evolutionary model to fit the mass and radius data. By examining all possible mixtures of water and H/He, with the corresponding opacities, we find that the bulk amount of H/He of GJ1214b is at most 7% by mass. In general, we find the radius of warm sub-Neptunes to be most sensitive to the amount of H/He. We note that all (Kepler-11b,c,d,f, Kepler-18b, Kepler-20b, 55Cnc-e, Kepler-36c and Kepler-68b) but two (Kepler-11e and Kepler-30b) of the discovered low-mass planets so far have less than 10% H/He. In fact, Kepler-11e and Kepler-30b have 10-18% and 5-15% bulk H/He. Conversely, little can be determined about the H2O or rocky content of sub-Neptune planets. We find that although a 100% water composition fits the data for GJ1214b, based on formation constraints the presence of heavier refractory material on this planet is expected, and hence, so is a component lighter than water required. A robust determination by transmission spectroscopy of the composition of the upper atmosphere of GJ1214b will help determine the extent of compositional segregation between the atmosphere and envelope.Comment: Updated the masses and radii of the Kepler-11 system, added Kepler-30b as well in the analysis. Accepted in ApJ, 39 pages, 9 figure

    In Vitro Toxicity Assessment of Stilbene Extract for Its Potential Use as Antioxidant in the Wine Industry

    Get PDF
    The reduction of sulfur dioxide in wine is a consumer’s demand, considering the allergic effects that may occur in people who are sensitive to it. Stilbenes are candidates of great interest for this purpose because of their antioxidant/antimicrobial activities and health properties, and also because they are naturally found in the grapevine. In the present study, the in vitro toxicity of an extract from grapevine shoots (with a stilbene richness of 45.4%) was assessed in two human cell lines. Significant damage was observed from 30 μg/mL after 24 h, and 40 µg/mL after 48 h of exposure. Similarly, the ultrastructural study revealed a significant impairment of cell growing. The extract was able to protect cells against an induced oxidative stress at all concentrations studied. In view of the promising results, a more exhaustive toxicological assessment of the extract is needed to confirm the safety of its further use as additive in wine.España,Ministerio de Economía, Industria y Competitividad and INIA for the financial support for this project (RTA2015-00005-C02-02

    Priority list of endemic diseases for the red meat industries

    Get PDF
    This report provides a systematic review of the most economically damaging endemic diseases and conditions for the Australian red meat industry (cattle, sheep and goats). A number of diseases for cattle, sheep and goats have been identified and were prioritised according to their prevalence, distribution, risk factors and mitigation. The economic cost of each disease as a result of production losses, preventive costs and treatment costs is estimated at the herd and flock level, then extrapolated to a national basis using herd/flock demographics from the 2010-11 Agricultural Census by the Australian Bureau of Statistics. Information shortfalls and recommendations for further research are also specified. A total of 17 cattle, 23 sheep and nine goat diseases were prioritised based on feedback received from producer, government and industry surveys, followed by discussions between the consultants and MLA. Assumptions of disease distribution, in-herd/flock prevalence, impacts on mortality/production and costs for prevention and treatment were obtained from the literature where available. Where these data were not available, the consultants used their own expertise to estimate the relevant measures for each disease. Levels of confidence in the assumptions for each disease were estimated, and gaps in knowledge identified. The assumptions were analysed using a specialised Excel model that estimated the per animal, herd/flock and national costs of each important disease. The report was peer reviewed and workshopped by the consultants and experts selected by MLA before being finalised. Consequently, this report is an important resource that will guide and prioritise future research, development and extension activities by a variety of stakeholders in the red meat industry. This report completes Phase I and Phase II of an overall four-Phase project initiative by MLA, with identified data gaps in this report potentially being addressed within the later phases. Modelling the economic costs using a consistent approach for each disease ensures that the derived estimates are transparent and can be refined if improved data on prevalence becomes available. This means that the report will be an enduring resource for developing policies and strategies for the management of endemic diseases within the Australian red meat industry

    Silent Expectations: Dynamic Causal Modeling of Cortical Prediction and Attention to Sounds That Weren't.

    Get PDF
    UNLABELLED: There is increasing evidence that human perception is realized by a hierarchy of neural processes in which predictions sent backward from higher levels result in prediction errors that are fed forward from lower levels, to update the current model of the environment. Moreover, the precision of prediction errors is thought to be modulated by attention. Much of this evidence comes from paradigms in which a stimulus differs from that predicted by the recent history of other stimuli (generating a so-called "mismatch response"). There is less evidence from situations where a prediction is not fulfilled by any sensory input (an "omission" response). This situation arguably provides a more direct measure of "top-down" predictions in the absence of confounding "bottom-up" input. We applied Dynamic Causal Modeling of evoked electromagnetic responses recorded by EEG and MEG to an auditory paradigm in which we factorially crossed the presence versus absence of "bottom-up" stimuli with the presence versus absence of "top-down" attention. Model comparison revealed that both mismatch and omission responses were mediated by increased forward and backward connections, differing primarily in the driving input. In both responses, modeling results suggested that the presence of attention selectively modulated backward "prediction" connections. Our results provide new model-driven evidence of the pure top-down prediction signal posited in theories of hierarchical perception, and highlight the role of attentional precision in strengthening this prediction. SIGNIFICANCE STATEMENT: Human auditory perception is thought to be realized by a network of neurons that maintain a model of and predict future stimuli. Much of the evidence for this comes from experiments where a stimulus unexpectedly differs from previous ones, which generates a well-known "mismatch response." But what happens when a stimulus is unexpectedly omitted altogether? By measuring the brain's electromagnetic activity, we show that it also generates an "omission response" that is contingent on the presence of attention. We model these responses computationally, revealing that mismatch and omission responses only differ in the location of inputs into the same underlying neuronal network. In both cases, we show that attention selectively strengthens the brain's prediction of the future.This work was supported by the UK Medical Research Council Programme [MC-A060-5PR10 to RH], in addition to grants from the Wellcome Trust [WT093811MA to TAB], the James S. McDonnell Foundation, and the Evelyn Trust [15/07 to SC].This is the final version of the article. It first appeared from the Society for Neuroscience via http://dx.doi.org/10.1523/JNEUROSCI.1125-16.201
    corecore