5,049 research outputs found

    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

    Harmonic Vibrational Excitations in Disordered Solids and the "Boson Peak"

    Full text link
    We consider a system of coupled classical harmonic oscillators with spatially fluctuating nearest-neighbor force constants on a simple cubic lattice. The model is solved both by numerically diagonalizing the Hamiltonian and by applying the single-bond coherent potential approximation. The results for the density of states g(ω)g(\omega) are in excellent agreement with each other. As the degree of disorder is increased the system becomes unstable due to the presence of negative force constants. If the system is near the borderline of stability a low-frequency peak appears in the reduced density of states g(ω)/ω2g(\omega)/\omega^2 as a precursor of the instability. We argue that this peak is the analogon of the "boson peak", observed in structural glasses. By means of the level distance statistics we show that the peak is not associated with localized states

    Influence of Support Material on the Structural Evolution of Copper during Electrochemical CO2 Reduction

    Get PDF
    The copper-catalyzed electrochemical CO2 reduction reaction represents an elegant pathway to reduce CO2 emissions while producing a wide range of valuable hydrocarbons. The selectivity for these products depends strongly on the structure and morphology of the copper catalyst. However, continued deactivation during catalysis alters the obtained product spectrum. In this work, we report on the stabilizing effect of three different carbon supports with unique pore structures. The influence of pore structure on stability and selectivity was examined by high-angle annular dark field scanning transmission electron microscopy and gas chromatography measurements in a micro-flow cell. Supporting particles into confined space was found to increase the barrier for particle agglomeration during 20 h of chronopotentiometry measurements at 100 mA cm−2 resembling long-term CO2 reduction conditions. We propose a catalyst design preventing coalescence and agglomeration in harsh electrochemical reaction conditions, exemplarily demonstrated for the electrocatalytic CO2 reduction. With this work, we provide important insights into the design of stable CO2 electrocatalysts that can potentially be applied to a wide range of applications

    Pre-hospital management protocols and perceived difficulty in diagnosing acute heart failure

    Get PDF
    Aim To illustrate the pre-hospital management arsenals and protocols in different EMS units, and to estimate the perceived difficulty of diagnosing suspected acute heart failure (AHF) compared with other common pre-hospital conditions. Methods and results A multinational survey included 104 emergency medical service (EMS) regions from 18 countries. Diagnostic and therapeutic arsenals related to AHF management were reported for each type of EMS unit. The prevalence and contents of management protocols for common medical conditions treated pre-hospitally was collected. The perceived difficulty of diagnosing AHF and other medical conditions by emergency medical dispatchers and EMS personnel was interrogated. Ultrasound devices and point-of-care testing were available in advanced life support and helicopter EMS units in fewer than 25% of EMS regions. AHF protocols were present in 80.8% of regions. Protocols for ST-elevation myocardial infarction, chest pain, and dyspnoea were present in 95.2, 80.8, and 76.0% of EMS regions, respectively. Protocolized diagnostic actions for AHF management included 12-lead electrocardiogram (92.1% of regions), ultrasound examination (16.0%), and point-of-care testings for troponin and BNP (6.0 and 3.5%). Therapeutic actions included supplementary oxygen (93.2%), non-invasive ventilation (80.7%), intravenous furosemide, opiates, nitroglycerine (69.0, 68.6, and 57.0%), and intubation 71.5%. Diagnosing suspected AHF was considered easy to moderate by EMS personnel and moderate to difficult by emergency medical dispatchers (without significant differences between de novo and decompensated heart failure). In both settings, diagnosis of suspected AHF was considered easier than pulmonary embolism and more difficult than ST-elevation myocardial infarction, asthma, and stroke. Conclusions The prevalence of AHF protocols is rather high but the contents seem to vary. Difficulty of diagnosing suspected AHF seems to be moderate compared with other pre-hospital conditions

    Single hadron response measurement and calorimeter jet energy scale uncertainty with the ATLAS detector at the LHC

    Get PDF
    The uncertainty on the calorimeter energy response to jets of particles is derived for the ATLAS experiment at the Large Hadron Collider (LHC). First, the calorimeter response to single isolated charged hadrons is measured and compared to the Monte Carlo simulation using proton-proton collisions at centre-of-mass energies of sqrt(s) = 900 GeV and 7 TeV collected during 2009 and 2010. Then, using the decay of K_s and Lambda particles, the calorimeter response to specific types of particles (positively and negatively charged pions, protons, and anti-protons) is measured and compared to the Monte Carlo predictions. Finally, the jet energy scale uncertainty is determined by propagating the response uncertainty for single charged and neutral particles to jets. The response uncertainty is 2-5% for central isolated hadrons and 1-3% for the final calorimeter jet energy scale.Comment: 24 pages plus author list (36 pages total), 23 figures, 1 table, submitted to European Physical Journal

    Measurement of the cross-section and charge asymmetry of WW bosons produced in proton-proton collisions at s=8\sqrt{s}=8 TeV with the ATLAS detector

    Get PDF
    This paper presents measurements of the W+→μ+νW^+ \rightarrow \mu^+\nu and W−→μ−νW^- \rightarrow \mu^-\nu cross-sections and the associated charge asymmetry as a function of the absolute pseudorapidity of the decay muon. The data were collected in proton--proton collisions at a centre-of-mass energy of 8 TeV with the ATLAS experiment at the LHC and correspond to a total integrated luminosity of 20.2~\mbox{fb^{-1}}. The precision of the cross-section measurements varies between 0.8% to 1.5% as a function of the pseudorapidity, excluding the 1.9% uncertainty on the integrated luminosity. The charge asymmetry is measured with an uncertainty between 0.002 and 0.003. The results are compared with predictions based on next-to-next-to-leading-order calculations with various parton distribution functions and have the sensitivity to discriminate between them.Comment: 38 pages in total, author list starting page 22, 5 figures, 4 tables, submitted to EPJC. All figures including auxiliary figures are available at https://atlas.web.cern.ch/Atlas/GROUPS/PHYSICS/PAPERS/STDM-2017-13

    Standalone vertex nding in the ATLAS muon spectrometer

    Get PDF
    A dedicated reconstruction algorithm to find decay vertices in the ATLAS muon spectrometer is presented. The algorithm searches the region just upstream of or inside the muon spectrometer volume for multi-particle vertices that originate from the decay of particles with long decay paths. The performance of the algorithm is evaluated using both a sample of simulated Higgs boson events, in which the Higgs boson decays to long-lived neutral particles that in turn decay to bbar b final states, and pp collision data at √s = 7 TeV collected with the ATLAS detector at the LHC during 2011
    • …
    corecore