99 research outputs found

    C to O-O Translation: Beyond the Easy Stuff

    Full text link
    Can we reuse some of the huge code-base developed in C to take advantage of modern programming language features such as type safety, object-orientation, and contracts? This paper presents a source-to-source translation of C code into Eiffel, a modern object-oriented programming language, and the supporting tool C2Eif. The translation is completely automatic and supports the entire C language (ANSI, as well as many GNU C Compiler extensions, through CIL) as used in practice, including its usage of native system libraries and inlined assembly code. Our experiments show that C2Eif can handle C applications and libraries of significant size (such as vim and libgsl), as well as challenging benchmarks such as the GCC torture tests. The produced Eiffel code is functionally equivalent to the original C code, and takes advantage of some of Eiffel's object-oriented features to produce safe and easy-to-debug translations

    Automated Fixing of Programs with Contracts

    Full text link
    This paper describes AutoFix, an automatic debugging technique that can fix faults in general-purpose software. To provide high-quality fix suggestions and to enable automation of the whole debugging process, AutoFix relies on the presence of simple specification elements in the form of contracts (such as pre- and postconditions). Using contracts enhances the precision of dynamic analysis techniques for fault detection and localization, and for validating fixes. The only required user input to the AutoFix supporting tool is then a faulty program annotated with contracts; the tool produces a collection of validated fixes for the fault ranked according to an estimate of their suitability. In an extensive experimental evaluation, we applied AutoFix to over 200 faults in four code bases of different maturity and quality (of implementation and of contracts). AutoFix successfully fixed 42% of the faults, producing, in the majority of cases, corrections of quality comparable to those competent programmers would write; the used computational resources were modest, with an average time per fix below 20 minutes on commodity hardware. These figures compare favorably to the state of the art in automated program fixing, and demonstrate that the AutoFix approach is successfully applicable to reduce the debugging burden in real-world scenarios.Comment: Minor changes after proofreadin

    Stateful Testing: Finding More Errors in Code and Contracts

    Full text link
    Automated random testing has shown to be an effective approach to finding faults but still faces a major unsolved issue: how to generate test inputs diverse enough to find many faults and find them quickly. Stateful testing, the automated testing technique introduced in this article, generates new test cases that improve an existing test suite. The generated test cases are designed to violate the dynamically inferred contracts (invariants) characterizing the existing test suite. As a consequence, they are in a good position to detect new errors, and also to improve the accuracy of the inferred contracts by discovering those that are unsound. Experiments on 13 data structure classes totalling over 28,000 lines of code demonstrate the effectiveness of stateful testing in improving over the results of long sessions of random testing: stateful testing found 68.4% new errors and improved the accuracy of automatically inferred contracts to over 99%, with just a 7% time overhead.Comment: 11 pages, 3 figure

    Code-based Automated Program Fixing

    Full text link
    Many programmers, when they encounter an error, would like to have the benefit of automatic fix suggestions---as long as they are, most of the time, adequate. Initial research in this direction has generally limited itself to specific areas, such as data structure classes with carefully designed interfaces, and relied on simple approaches. To provide high-quality fix suggestions in a broad area of applicability, the present work relies on the presence of contracts in the code, and on the availability of dynamic analysis to gather evidence on the values taken by expressions derived from the program text. The ideas have been built into the AutoFix-E2 automatic fix generator. Applications of AutoFix-E2 to general-purpose software, such as a library to manipulate documents, show that the approach provides an improvement over previous techniques, in particular purely model-based approaches

    Measurement of solids circulation rates with optical techniques in circulating beds and comparison to pressure drop methods

    Get PDF
    The number of applications employing circulating fluidized beds has increased considerably over the last years following the important development of chemical looping technologies for power generation (combustion) or fuel conversion (reforming) with inherent CO2 capture. The performance of these reactors is strongly determined by the amount of solids transferred from one reactor to the other, commonly referred to as the Solids Circulation Rate (SCR). The solids inventory, particle characteristics and gas velocities strongly influence the SCR. The determination of the SCR has been carried out using invasive and non-invasive measurement techniques. The direct measurement through solids collection in the loop seal is the most applied technique, but this technique requires opening of the loop seals and thus may be expensive, whereas other methods suffer from large inaccuracies. There is yet no optimal technique available that combines good accuracy with reasonable costs, as recently also discussed by Alghamdi et al. (1). In this work, a pseudo 2D internally circulating fluidized bed (Figure 1) has been built to explore the potential of optical techniques like Particle Image Velocimetry (PIV) combined with Digital Image Analysis (DIA) for non-invasive, whole-field measurements. Moreover, the setup allows for the measurement of the pressure drop (fluctuations) along the riser and the collection of particles circulating from one reactor to the other, so that the three different measurement techniques can be compared. Please click Additional Files below to see the full abstract

    Comparison between carbon molecular sieve and Pd-Ag membranes in H2-CH4 separation at high pressure

    Get PDF
    From a permeability and selectivity perspective, supported thin-film Pd–Ag membranes are the best candidates for high-purity hydrogen recovery for methane-hydrogen mixtures from the natural gas grid. However, the high hydrogen flux also results in induced bulk-to-membrane mass transfer limitations (concentration polarization) especially when working at low hydrogen concentration and high pressure, which further reduces the hydrogen permeance in the presence of mixtures. Additionally, Pd is a precious metal and its price is lately increasing dramatically. The use of inexpensive CMSM could become a promising alternative. In this manuscript, a detailed comparison between these two membrane technologies, operating under the same working pressure and mixtures, is presented. First, the permeation properties of CMSM and Pd–Ag membranes are compared in terms of permeance and purity, and subsequently, making use of this experimental investigation, an economic evaluation including capital and variable costs has been performed for a separation system to recover 25 kg/day of hydrogen from a methane-hydrogen mixture. To widen the perspective, also a sensitivity analysis by changing the pressure difference, membrane lifetime, membrane support cost and cost of Pd/Ag membrane recovery has been considered. The results show that at high pressure the use of CMSM is to more economic than the Pd-based membranes at the same recovery and similar purity.This project has received funding from the Fuel Cells and Hydrogen 2 Joint Undertaking under grant agree-ment No 700355. This Joint Undertaking receives support fromthe European Union’s Horizon 2020 research and innovation

    An experiment on teaching coordination in a globally distributed software engineering class

    Full text link
    The importance of planning and management skills in software development is very difficult to convey in software engineering courses. We present the synopsis of an assignment whose purpose is to demonstrate the significance of such skills, including effective communication, team coordi-nation and collaboration, and overall project planning. The assignment is organized in the context of a distributed software engineering course carried out in collaboration with 12 universities in South America, Europe and Africa. The assignment is a globally distributed contest issued before most development activities related to the course’s software project are performed, aiming at favor-ing the collaboration between students prior to project development. The contest does not involve any programming, and is not related to the project development activities. Instead, it consists of making teams in different countries compete in collaboratively solving a set of very simple tasks. The complexity of the activity is in team collaboration and coordination, and their lack is evident when the tasks are not correctly solved, or not solved in time. Despite the simplicity of the as-signment, students have found it useful in helping them understand the significance of management and planning challenges in distributed software development. Moreover, the assignment helped in team building, by creating a better team atmosphere and contributing in identifying team members better suited for management
    • …
    corecore