scispace - formally typeset
Search or ask a question
Proceedings ArticleDOI

Dynamic Weaving of ASPECTs in C/C++ using PIN

TL;DR: Another layer of abstraction is introduced to weave ASPECTs according to user need using dynamic binary instrumentation to facilitate the user to concentrate on what to implement where in the existing application rather thinking of how to do it.
Abstract: Understanding the dynamic behavior of the existing software application is always a big challenge. Sometime developer need to incorporate additional change in requirements into the application without changing the existing behavior. Also the designer and developer wish to inject additional checkpoints or logs to understand the nature/issues without touching the code or recompile it; even sometime the source is not available.Dynamic instrumentation is one solution to address these. But understanding the syntax and protocol need additional skill development exercise. The objective of this paper is to facilitate the user to concentrate on what to implement where in the existing application rather thinking of how to do it. We introduce another layer of abstraction to weave ASPECTs according to user need using dynamic binary instrumentation. This abstraction also facilitates additional flexibility to attach/change the ASPECTs even during the execution.
Citations
More filters
Book ChapterDOI
TL;DR: In this article, the authors propose a technique to verify the unchanged functionalities of untouched modules of the modified application by comparing with the older version of the application, which can assist the migration specialists to identify the active part of an application, associated files, and data used by the active code that help in building the new one with similar functionalities.
Abstract: Companies and organizations use the legacy software for decades to serve various purposes. During this journey, the software system travels through several change requests and amendments of functionalities due to the changing nature of business and other requirements. As a result, different methodologies and implementations employed over the time are often not at all documented. So, modifying or migrating those software systems become difficult due to lack of technical knowledge about their behavior. This difficulty is even more when there is no Subject-Matter Expert (SME). Here, we propose a technique to verify the unchanged functionalities of untouched modules of the modified application by comparing with the older version of the application. Sometimes, the number of functional behaviors become irrelevant as they are no longer required by the business. However, significantly large portions of legacy applications continue executing, untouched by any modification or customization, to serve tiny yet critical purposes. Stakeholders also remain reluctant to cleanup or migrate because only for finding out the active part or functionals scope of the application is very tedious and consumes lot of effort due to lack of knowledge or documentation. Here, we have devised a mechanism to assist the migration specialists to identify the active part of an application, associated files, and data used by the active code that help in building the new one with similar functionalities. We can also assist the performance engineer by detecting the resource leakage in the application.
References
More filters
Book ChapterDOI
01 Jan 2015
TL;DR: An overview of the existing techniques and tools for the dynamic analysis of programs is provided and the paper compares these techniques for their merits and demerits and emphasizes the importance of each technique.
Abstract: Dynamic program analysis is a very popular technique for analysis of computer programs. It analyses the properties of a program while it is executing. Dynamic analysis has been found to be more precise than static analysis in handling run-time features like dynamic binding, polymorphism, threads etc. Therefore much emphasis is now being given on dynamic analysis of programs ( instead of static analysis) involving the above mentioned features. Various techniques have been devised over the past several years for the dynamic analysis of programs. This paper provides an overview of the existing techniques and tools for the dynamic analysis of programs. Further, the paper compares these techniques for their merits and demerits and emphasizes the importance of each technique.

38 citations


"Dynamic Weaving of ASPECTs in C/C++..." refers methods in this paper

  • ...Our approach is to use advantages of dynamic instrumentation framework[6] like JIT code injection and extend it to support dynamic weaving the concerns (What to inject?) on right target (What to instrument?) in desired Join-Point (Where to instrument?)....

    [...]

Proceedings ArticleDOI
04 Jan 2006
TL;DR: This paper presents its experiences with static and dynamic adaptation of crosscutting concerns in the embedded operating system eCos, and presents a "family-based dynamic weaver infrastructure", which reduces the resource consumption needed for dynamic AOP by tailoring the run time system.
Abstract: System software strongly relies on the availability of static as well as dynamic adaptation techniques. With Aspect-Oriented Programming (AOP) it is now possible to adapt even policy-like crosscutting concerns in the implementation of system software. While this is straightforward in the static case, dynamic adaptation of crosscutting concerns requires an expensive dynamic aspect weaving infrastructure. Furthermore, the relation between static and dynamic aspects is widely unexplored. In this paper we present our experiences with static and dynamic adaptation of crosscutting concerns in the embedded operating system eCos. The work is based on the novel "single language approach", which allows us to configure the binding time of aspects, and a "family-based dynamic weaver infrastructure", which reduces the resource consumption needed for dynamic AOP by tailoring the run time system. In our prototype implementation all this has been integrated into an environment, which allows us to "play" with the binding time of aspects and supported dynamic weaver features. Thus, we can now answer questions about the resource consumption of these adaptation techniques and the relationship of static and dynamic aspects in general.

25 citations


"Dynamic Weaving of ASPECTs in C/C++..." refers methods in this paper

  • ...Most approaches to support dynamic weaving in C/C++ like TinyC2, TOSKANA and Arachne[3] wave/unweave aspects by rewrite the binary code at runtime....

    [...]

Proceedings ArticleDOI
28 Sep 2015
TL;DR: A C++ Aspect-Oriented based Parallel Programming (CAPP) framework is developed, using AspectC++ and OpenCL, which defines aspects to remove the cross-cutting components from the C++ code, essentially providing parallel programming in C++.
Abstract: Parallel programming can provide higher computational performance over a sequential implementation by making use of the many cores available in parallel systems. However, the parallel-capable devices introduce complexity into the programming model. Current parallel programming API's such as OpenCL and CUDA provide interfaces to the parallel devices, but are complex and result in code which includes cross-cutting components, such as setting up the parallel programming context, compiling the parallel kernel, and transferring data between the host and device memory spaces when the kernel is executed. A C++ Aspect-Oriented based Parallel Programming (CAPP) framework is developed, using AspectC++ and OpenCL, which defines aspects to remove the cross-cutting components from the C++ code. The aspects set up the OpenCL context, compile the OpenCL kernel, and manage the data transfer between the memory spaces each time a kernel is executed. The aspects are woven into the C++ code before compilation, rather than at run time, which improves performance. An interface is provided for executing OpenCL kernels from the C++ code, essentially providing parallel programming in C++. The framework was applied to the SAXPY and Black-Scholes option pricing problems. Computational performance was, on average, 1.4-7% slower than the OpenCL implementation and up to 9 times faster than the sequential C++ implementation for the Black-Scholes problem. The amount of code was greatly reduced from the OpenCL implementation, and the resulting CAPP framework C++ code was simple and modular, resembling the sequential C++ implementation code. The amount of CAPP code required for the examples was found to be comparable to that of C++ AMP, another parallel programming framework.

5 citations

DOI
12 Apr 2015
TL;DR: The Aspect framework for Trace Log eliminates boilerplate logging code within models, supports flexibly enabling/disabling logging, improves the robustness of the model by providing easy mechanisms of debugging, and supports knowledge-users in exploring model output.
Abstract: While simulation and modeling serve as increasingly popular tools in addressing complex policy challenges, modeling projects are often encumbered by significant complexity within the model itself. This includes complexity extending from software engineering challenges, implementation, management of the model execution, difficulty in maintaining metadata to cross-link models, scenario results, associated simulation results, and a dependence of knowledge-users on modelers to modify model output and visualization mechanisms to explore patterns of interest. Furthermore, debugging of and developing confidence in a model often requires enabling/disabling tracing output of various model quantities. We present techniques to enhance flexibility, transparency, usefulness and effectiveness of simulation modeling by using Aspect-Oriented Programming to automatically manage the high-level execution results (Run Log) and, separately, low-level details (Trace Log) associated with model executions. With an eye towards enabling scenario reproducibility, Run Log documents the scenarios run for a given model, and records the associated model version, scenario assumptions and elements of output. The Aspect framework for Trace Log eliminates boilerplate logging code within models, supports flexibly enabling/disabling logging, improves the robustness of the model by providing easy mechanisms of debugging, and supports knowledge-users in exploring model output. We describe the framework, experiments conducted, and feedback received.

4 citations


"Dynamic Weaving of ASPECTs in C/C++..." refers methods in this paper

  • ...al.[4] enhanced effectiveness of simulation modeling to automatically manage Run Log and Trace Log....

    [...]