69 research outputs found

    Loop Optimizations in C and C++ Compilers: An Overview

    Get PDF
    The evolution of computer hardware in the past decades has truly been remarkable. From scalar instruction execution through superscalar and vector to parallel, processors are able to reach astonishing speeds – if programmed accordingly. Now, writing programs that take all the hardware details into consideration for the sake of efficiency is extremely difficult and error-prone. Therefore we increasingly rely on compilers to do the heavy-lifting for us. A significant part of optimizations done by compilers are loop optimiza- tions. Loops are inherently expensive parts of a program in terms of run time, and it is important that they exploit superscalar and vector instructions. In this paper, we give an overview of the scientific literature on loop optimization technology, and summarize the status of current implementations in the most widely used C and C++ compilers in the industry

    A Comprehensive Review on Software Comprehension Models

    Get PDF
    Software comprehension is one of the most important among software development tasks since most developers do not start a brand new software every time they switch jobs or get transferred from one project to another but join long-running software projects. Every experienced and expert developer has their own established methods of understanding complex software systems. These methods might be different for everyone but they still have common aspects by which multiple well-defined code comprehension models can be constructed. Furthermore, the degree of understanding of a software can be categorized as well, according to the ability of the programmer to modify or develop a certain part of the software system. This paper is intended to provide a review of the cognitive software comprehension models established by extensive research in this topic as well as describe the dimensions of understanding software. It also determines the editor support of cognition models by examining common editor functionalities and categorizing code editors based on the availability of functionalities of each cognition approach

    Necessary test cases for Decision Coverage and Modified Condition / Decision Coverage

    Get PDF
    Test coverage refers to the extent to which a given software verification activity satisfies its objectives. Several types of coverage analysis exist to check code correctness. Less strict analysis methods require fewer test cases to satisfy their requirements and consume less resources. Choosing test methods is a compromise between the code correctness and the available resources. However this selection should be based on quantitative consideration. In this paper we concern the Decision Coverage and the more strict Modified Condition / Decision Coverage. We examined several projects written in Ada programming language. Some of them are developed in the industry and the others are open source. We analyzed them in several aspects: Mc- Cabe metric, nesting and maximal argument number in decisions. We discuss how these aspects are affected by difference of the necessary test cases for these testing methods

    Automatic checking of the usage of the C++ move semantics

    Get PDF
    The C++ programming language is a favorable choice when implementing high performance applications, like real-time and embedded programming, large telecommunication systems, financial simulations, as well as a wide range of other speed sensitive programs. While C++ has all the facilities to handle the computer hardware without compromises, the copy based value semantics of assignment is a common source of performance degradation. New language features, like the move semantics were introduced recently to serve an instrument to avoid unnecessary copies. Unfortunately, correct usage of move semantics is not trivial, and unintentional expensive copies of C++ objects - like copying containers instead of using move semantics - may determine the main (worst-case) time characteristics of the programs. In this paper we introduce a new approach of investigating performance bottlenecks for C++ programs, which operates at language source level and targets the move semantics of the C++ programming language. We detect copies occurring in operations marked as move operations, i.e. intended not containing expensive copy actions. Move operations are marked with generalized attributes - a new language feature introduced to C++11 standard. We implemented a tool prototype to detect such copy/move semantic errors in C++ programs. Our prototype is using the open source LLVM/Clang parser infrastructure, therefore highly portable

    Practical heuristics to improve precision for erroneous function argument swapping detection in C and C++

    Get PDF
    Argument selection defects, in which the programmer chooses the wrong argument to pass to a parameter from a potential set of arguments in a function call, is a widely investigated problem. The compiler can detect such misuse of arguments only through the argument and parameter type for statically typed programming languages. When adjacent parameters have the same type or can be converted between one another, a swapped or out of order call will not be diagnosed by compilers. Related research is usually confined to exact type equivalence, often ignoring potential implicit or explicit conversions. However, in current mainstream languages, like C++, built-in conversions between numerics and user-defined conversions may significantly increase the number of mistakes to go unnoticed. We investigated the situation for C and C++ languages where developers can define functions with multiple adjacent parameters that allow arguments to pass in the wrong order. When implicit conversions – such as parameter pairs of types ``(int, bool)`` – are taken into account, the number of mistake-prone functions markedly increases compared to only strict type equivalence. We analysed a sample of projects and categorised the offending parameter types. The empirical results should further encourage the language and library development community to emphasise the importance of strong typing and to restrict the proliferation of implicit conversions. However, the analysis produces a hard to consume amount of diagnostics for existing projects, and there are always cases that match the analysis rule but cannot be “fixed”. As such, further heuristics are needed to allow developers to refactor effectively based on the analysis results. We devised such heuristics, measured their expressive power, and found that several simple heuristics greatly help highlight the more problematic cases

    Traquest model : a novel model for ACID concurrent computations

    Get PDF
    Atomicity, consistency, isolation and durability are essential properties of many distributed systems. They are often abbreviated as the ACID properties. Ensuring ACID comes with a price: it requires extra computing and network capacity to ensure that the atomic operations are done perfectly, or they are rolled back. When we have higher requirements on performance, we need to give up the ACID properties entirely or settle for eventual consistency. Since the ambiguity of the order of the events, such algorithms can get very complicated since they have to be prepared for any possible contingencies. Traquest model is an attempt for creating a general concurrency model that can bring the ACID properties without sacrificing a too significant amount of performance

    4D Ariadne the Static Debugger of Java Programs

    Get PDF
    Development environments support the programmer in numerous ways from syntax highlighting to different refactoring and code generating methods. However, there are cases where these tools are limited or not usable, such as getting familiar with large and complex source codes written by a third person; finding the complexities of huge projects or finding semantic errors.In this paper we present our static analyzer tool, called 4D Ariadne, which concentrates on these problems. 4D Ariadne is a static debugger of Object Oriented applications written in Java programming language. It calculates data dependencies of objects being able to compute them both forward and backward. As 4D Ariadne provides only the direct influences to the user, it can be considered as an alternative of traditional debuggers, without executing the code. 4D Ariadne also provides dynamic call graphs representing polymorphic properties of objects

    Code Generation from UML Models

    Get PDF
    Creating a generic, object-oriented, component-based, transactional business system, which covers the whole lifecycle, is possible only with the integration of commercial tools, component technologies, newly developed class libraries and by using code generators. Most of the recently used tools for development techniques are focusing on only one of the layers of the model from the code generation point of view. As a consequence, the inter-layer connections are lost in the generated code. In this article, we describe a code generator technique which uses a UML model as a starting point and generates several layers directly. While generating the code, it preserves the original interlayer relationships originated in the model. Based on our experiences with 4GL systems it is obvious that there is a need to provide customisation in the generated code. We offer a multi-paradigm approach [1] to let the developer choose the appropriate solution for her or his implementation

    Family polymorphism in JAVA

    Get PDF
    corecore