The article describes the code–to–code verification of two CFD codes Euler3n and hySol and their validation on the example of the flow around sharp and blunt cones in a wide range of Mach numbers and angles of attack.
Refactoring is an integral part of the modern software development process. Often, the refactoring must be performed at the global level with modifications in a large number of files. Making these modifications is a long and painstaking work. However, users rarely employ automated tools for this purpose because they consider them unreliable and difficult to use. In this paper, a new tool for transforming the source code is described. It is based on the intuitively clear specification of transformation rules in the form of short code fragments in C or C++. These rules describe the code before and after the transformation. We believe that, due to the absence of additional abstractions (such as domain-specific languages), this approach can be easily used in practice. Even though the tool uses source code templates, it operates on the level of the abstract syntax tree. This enables the tool to better analyze the code and verify the validity of transformations.
Для генерации сверхподробных тетраэдральных сеток объемом до 1 миллиарда ячеек используется открытое ПО Gmsh. Пакет позволяет строить автоматически указанные сетки на ПК в параллельном режиме OpenMP за время, не превышающее 1 часа при использовании ПК Intel i7–9700K. Описан опыт применения пакета для построения пространственных сеток для задач обтекания аэрокосмических объектов. Приведены примеры суперкомпьютерных расчетов обтекания аэрокосмических объектов. Gmsh open source software is used to generate ultra-detailed tetrahedral grids of up to 1 billion cells. The package allows one to build automatically specified grids on a PC in parallel OpenMP mode in a time not exceeding 1 hour when using an Intel i7–9700K PC. The experience of using the package to construct the spatial grids for problems of flows past aerospace objects is described. Several examples of supercomputer calculations for the flows past aerospace objects are given.
We linearly analyzed the effect of the Prandtl number (Pr) on the stability of thermocapillary flow in shallow annular pools with an aspect ratio Gamma = (R-o - R-i)/d = 20 and two radius ratios Gamma(R) = R-i/R-o= 0.50 and 0.98039, where d, R-o, and R-i are the liquid depth and the radii of the heated outer wall and the cooled inner wall, respectively. The results for Pr is an element of [0, 10(2)] show that the steady axisymmetric thermocapillary flows in these annular pools become unstable against oscillatory instability modes, OSC1, OSC2 and hydrothermal wave (HTW). Two co-dimension-two bifurcations occur at Pr-1* and Pr-2*. The critical mode for Pr <= Pr-1* is OSC2 with almost constant critical Reynolds number Re-c, large wave number and high frequency. OSC1 with smaller wave number and lower frequency is the critical mode for Pr-1* <= Pr <= Pr-2* and Re-c slightly decreases with increasing Pr. HTW is the critical mode for Pr >= Pr-2* and Re c decreases with increasing Pr. The values of (Pr-1*, Pr-2*) are (0.00953, 0.03054) for Gamma(R) = 0.50, and (0.01919, 0.01946) for Gamma(R) = 0.98039. Energy-budget analyses reveal that the instabilities in low-Pr range are caused by instabilities in the steady toroidal vortex (or vortices) near the cold wall. (C) 2019 Elsevier Ltd. All rights reserved.
This article describes an attempt to modify and use Avalanche tool for dynamic analysis and testing of programs reading input data from network sockets. The technique of received data substitution is introduced, and it’s Valgrind based implementation is described. An overview of interception and handling of network system calls is provided. The results of analysis of open-source network applications are included, as well as a list of newly discovered defects.
This paper describes issues related to automatic detection of concurrency defects using dynamic analysis methods with primary target subject as the Android platform. Due to the increased popularity and spread of Android platform and, more importantly, high importance of concurrent work flow for all user applications on this platform, automatic tools for defect detection are likely to be beneficial for many developers. The paper is organised as follows: section 1 provides a brief introduction to the discussed subjects (concurrency basics, Android platform basics). Section 2 discusses theoretical base for a set of dynamic concurrency detection methods. Section 3 contains an overview of several key points in Android work flow related to native code execution in system utilities and in user applications through the JNI mechanisms. This overview is followed by a description of existing tools implementing concurrency defect detection methods for native code and the practical considerations of applying these tools for Android analysis. Section 4 provides the information on Java-oriented tools for concurrency defect detection (Java ThreadSanitizer and Coffee Machine) with the major focus on Coffee Machine, developed within the scope of this project. An overview of Coffee Machine tool functionality and base methods is given, followed by an evaluation of practical application of the tool to Android platform. Section 5 concludes the paper with an evaluation of key issues for both native and Java dynamic analysis for automatic concurrency defect detection.
Dynamic program analysis is a prominent approach towards software quality control allowing to perform automatic profiling, defect detection and other activities during software development. In this paper we focus on static binary code instrumentation – a technique to automatically modify program executable code in order to extract data necessary for dynamic analysis. We discuss the key features of this technique within context of dynamic analysis and propose a method to perform static binary code instrumentation for ELF executable and shared library files specifically targeting the ARM architecture.We describe the main steps of the proposed method including the following: instrumentation specification and target code parsing, executable instrumentation code generation and finally target executable code file modification in order to insert instrumentation code and ensure that control transfer from original code to instrumentation code and vice versa will happen at runtime.Executable code file modification is performed within bounds of ARM ELF specifications and is designed to minimize the changes introduced in actual executable code blocks. Instrumentation code is appended to target files as a set of separate sections; we implement control transfer to instrumentation code through unconditional jump instructions which replace small blocks of original instructions at instrumentation points. In order to preserve the original functionality we wrap instrumentation code blocks with instructions that save and restore program state; additionally, instructions replaced at instrumentation points are transferred to the instrumentation code blocks. We also describe a set of modifications performed in order to introduce instrumentation code external dependencies to the target executable files.The proposed method was implemented in an instrumentation framework. We provide a brief overview of practical experiments using basic block counting and function entry/exit tracing as base instrumentation applications. The results show better performance in comparison to popular dynamic instrumentation framework Valgrind and low overhead for system-wide tracking of native Android libraries.
This article focuses on practical questions of performing program analysis for applications executed using interpreters and virtual machines. Using Dalvik virtual machine in Android operating system as target interpreter layer, we showcase the possibilities of program analysis through automatic execution data extraction and profiling. The article describes functional modifications for Dalvik virtual machine which allow generating extra statistics and data to be intercepted by a debugger client for further processing. We conclude with the brief overview of a set of experiments performed on a set of standard Android applications, identifying several memory usage trends; lastly, we discuss possible future improvements for the implemented system.
This paper describes a new approach for dynamic code analysis. It combines dynamic symbolic execution and static code analysis with fuzzing to increase efficiency of each component. During fuzzing we recover indirect function calls and pass that information to the static analysis engine. This improves static path detection in the control flow graph of a program. Detected paths are used in dynamic symbolic execution to construct inputs which will cover new paths during execution. These inputs are used by the fuzzing tool to improve test-case generation and increase code coverage. The proposed approach can be used for classic fuzzing when the main goal is achieving high code coverage. As well it can be used for targeted analysis of paths and code fragments in the program. In this case the fuzzing tool accepts a set of programs addresses with potential defects and passes them to the static analysis engine. The engine constructs all paths connecting program entry point to the given addresses. Finally, dynamic symbolic execution is used to construct the set of inputs, which will cover these paths. Experimental results have shown that the proposed method can effectively detect different program defects.
The present-day trends in software engineering include the steady increase of code and design complexity which reinforces the high demand in automated software testing and analysis tools. In this paper, we showcase several dynamic program analysis applications and present our solutions. These applications include memory profiling, automated test generation using dynamic symbolic execution and automated detection of concurrency bugs in multithreaded programs. Our memory profiling tool is designed for Java applications for Android and it is implemented through Android Dalvik VM modification. This approach allowed us to overcome existing Dalvik VM limitations that make existing profiling tools based on dynamic bytecode instrumentation inaccessible. We have successfully applied our tool to several core Android applications - the results provided in the paper outline the effectiveness of the approach. The second solution we discuss in the paper - dynamic symbolic execution for test generation automation - allows us to efficiently generate test scenarios for Java program graphical user interface. The core technologies of the approach include the use of static bytecode instrumentation and automatic GUI model extraction. We implement the approach on top of a user interface test automation framework GUITAR. Finally, we present our approach to automatically identify concurrency bugs in multithreaded Java applications. The approach is based on static bytecode instrumentation for trace generation and employs ThreadSanitizer defect detection tool for identifying bugs.
Binary code analysis is becoming a prominent technique in software development, covering tasks related to quality assurance and security. In this paper, we present an approach to static binary code instrumentation-persistent modification and extension of executable files-that we believe to be effective when used as a basis of implementation of various dynamic analysis techniques. We have developed an instrumentation framework targeting ARM ELF binary code that allows transforming files based on user-defined specifications. Specification language provides means to perform aspect-oriented programming targeting low-level groups of points in binary code to insert extra instrumentation code that can be supplied in C/C++ language. We have applied our framework to Avalanche-an automatic input generation tool based on dynamic symbolic execution-and achieved up to 10x increase in path traversal speed within a limited time frame compared to Valgrind-based dynamic binary instrumentation.
This paper focuses on dynamic program analysis optimization through the use of distributed computing scheme and parallel computing for checking satisfiability of Boolean constraint sets. An overview of results obtained from applying the practical implementation of parallel and distributed schemes of dynamic analysis to a number of open-source applications is given. The paper presents a detailed evaluation of the increased efficiency of dynamic analysis achieved while applying developed techniques. Finally, the authors propose a number of possible directions for future work.
This paper is dedicated to practical research in the field of automated testing and analysis of software that features a graphical user interface. Current tendencies in user interface development favour semi-automatic approaches that employ human experts to create and prepare test suites. The ever-increasing complexity of software leads to decreased effectiveness of these approaches, especially when one considers large amounts of computational resources available during development. We present a fully automatic approach to dynamic analysis of program graphical interfaces. Our approach is based on the open-source GUITAR tool, which we have identified among other industrial and academic tools as the one closest to full automation. While highly efficient, GUITAR nevertheless has certain drawbacks and limitations which might cause insufficient accuracy in modelling the graphical interface structure and its individual elements. In turn, these limitations lead to fragments of graphical interface not getting processed during analysis or cause incorrect (i.e. not reproducible in practice) test cases to be generated. Our contributions include a set of modifications: incremental graphical interface model generation, improved identification of graphical interface element attributes and side effects, and finally a test case generation algorithm that focuses on reaching unprocessed graphical interface elements to check their functionality and improve the model. We have tested our modifications on a set of open source projects originally checked by GUITAR developers and achieved positive results: increased precision of GUI structure model and theoretically can decrease number of inapplicable test cases. Finally, we discuss several potential improvements for future work, including, in particular, the use of dynamic symbolic execution methods.
Program analysis methods for error detection are conventionally divided into two groups: static analysis methods and dynamic analysis methods. In this paper, we present a combined approach that allows one to determine reachability for defects found by static program analysis techniques through applying dynamic symbolic execution to a program. This approach is an extension of our previous approach to determining the reachability of specific program instructions by using dynamic symbolic execution. The approach is sequentially applied to several points in the program: a defect source point, a defect sink point, and additional intermediate conditional jumps related to a defect under analysis. Our approach can be briefly described as follows. First, static analysis of the program executable code is carried out to gather information about execution paths that guide dynamic symbolic execution to the source point of a defect. Then, dynamic symbolic execution is performed to generate an input dataset for reaching the defect source point and the defect sink point through intermediate conditional jumps. Dynamic symbolic execution is guided by the heuristic of the minimum distance from the previous path to the next defect trace point when selecting execution paths. The distance metric is computed using an extended call graph of the program, which combines its call graph and portions of its control flow graph that include all paths leading to the defect sink point. We evaluate our approach by using several open-source command line programs from Debian Linux. The evaluation confirms that the proposed approach can be used for classification of defects found by static program analysis. However, we found some limitations that prevent deploying this approach to industrial program analyzers. Mitigating these limitations is one of the possible directions for future research.
In this paper, we explore the possibilities of applying dynamic symbolic execution (or concolic testing) methods to applications with graphical user interfaces. Such applications inherently feature interactive user input processing and multithreaded execution. These features typically decrease the effectiveness of dynamic symbolic execution by increasing the volume of processed code not related to actual application functionality. We present a hybrid approach that combines commonly used GUI test automation methods based on GUI model excavation with dynamic symbolic execution methods to construct test cases for checking internal application logic. We have implemented this approach using two open-source tools - test automation framework GUITAR and Java byte-code static instrumentation framework Coffee Machine. GUI model extracted automatically by GUITAR tool is extended with symbolic traces relevant to application GUI event handlers. Our test generation module for GUITAR combines these symbolic traces into complex queries to be processed by SMT solver. The resulting test cases are valid within automatically extracted GUI structure model and allow to check different execution paths in GUI event handler code. We have checked our hybrid approach on a set of small open-source applications and identified several bugs caused by uncaught exceptions. The paper is concluded with an overview of current limitations and possible improvements of the hybrid approach.
A software platform for MPI-based parallel solution of the Navier-Stokes (Euler) equations for viscous heat-conductive compressible perfect gas on 3-D unstructured meshes is developed. The discretization and solution of the Navier-Stokes equations are constructed on generalized S.K. Godunov's method and the second order approximation in space and time. Developed software platform allows to carry out effectively flow past hypersonic flight vehicles simulations for the Mach numbers 6 and higher, and numerical meshes with up to 1 billion numerical cells and with up to 128 processors.
This paper presents a modular dynamic symbolic execution (DSE) framework Anxiety developed at Ivannikov Institute for System Programming of the Russian Academy of Sciences (ISP RAS). The main purpose of creating yet another DSE framework is in moving forward research on DSE at ISP RAS, providing analysis support for different operating systems and platforms and continuing research for applications of DSE in a wide area of program analysis on top of this framework.
статья посвящена возможностям применения статического инструментирования исполняемых файлов и файлов динамических библиотек в формате elf для проведения динамического анализа программ. Проведен обзор существующих решений в данной и смежных областях. Предложен подход к обработке бинарных файлов arM elf. Описаны основные особенности предлагаемого подхода: разметка целевых файлов и генерация внедряемого кода на основе пользовательских спецификаций, использование промежуточного языка описания инструкций ассемблера arM, компоновка итоговых инструментированных файлов исполняемого кода. Приведены результаты применения реализации данного подхода для создания модулей трассировки помеченных данных, используемых в рамках инструмента автоматического поиска дефектов avalanche. дИнамИческИй аналИз; бИнаРнОе ИнстРументИРОванИе; аРхИтектуРа arM.
This paper focuses on dynamic analysis of Java programs. We consider the following limitations: analysis tool may not have access to target program source code, and the program may be interpreted by a non-standard virtual machine with bytecode format different from Java Virtual Machine specifications. The paper describes an approach to bytecode instrumentation which is used to perform iterative dynamic analysis for new execution path discovery. Path discovery is performed through automatic input data generation by tracing tainted data, collecting path conditions, and satisfiability checking. The proposed approach is based on static bytecode instrumentation. The main advantages of this approach are analysis speedup (because of one-time instrumentation) and explicit access to statically generated instrumented bytecode which makes it possible to run instrumented program on different virtual machines with different bytecode formats. Proposed approaches were implemented in the Coffee Machine tool. Paper sections dedicated to this tool provide a detailed description of taint data tracing and automatic branch traversing techniques as well as a set of instrumentation utilities based on Coffee Machine allowing executed instructions printing, taint trace dumping, and synchronization events trace generation. Coffee Machine uses BCEL (bytecode instrumentation library) for instrumentation. The paper concludes with an overview of practical restrictions existing for discussed methods and possible future work directions. Main disadvantage of proposed approach is the inability to access dynamic data at run-time and instrument a set of system class methods. It may be resolved by method simulation and execution environment modifications.