Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “Static Program Analysis”

Search indexed NASA NTRS and DOE OSTI research on propulsion, heat transfer, battery materials and energy systems. Follow report and document links to the original sources.

Quote a phrase for an exact phrase match. Source license links do not imply unrestricted reuse.

At least 19 records

Generating and Analyzing Program Call Graphs using Ontology

Call graph or caller-callee relationships have been used for various kinds of static program analysis, performance analysis and profiling, and for program safety or security analysis such as detecting anomalies of program execution or code injection attacks. However, different tools generate call graphs in different formats, which prevents efficient reuse of call graph results. In this paper, we present an approach of using ontology and resource description framework (RDF) to create knowledge graphs for specifying call graphs to facilitate the construction of full-fledged and complex call graphs of computer programs, realizing more interoperable and scalable program analyses than conventional approaches. We create a formal ontology-based specification of call graph information to capture concepts and properties of both static and dynamic call graphs so different tools can collaboratively contribute to more comprehensive analysis results. Our experiments show that ontology enables merging of call graphs generated from different tools and flexible queries using a standard query interface. Index Terms—Callgraph, ontology, knowl

Dorta, E.↗

ROSE

Developed at Lawrence Livermore National Laboratory (LLNL), ROSE is an open source compiler infrastructure to build source-to-source program transformation and analysis tools for large-scale C (C89 to C23), C++ (C++98 to C++23), UPC, Fortran (Fortran4, 66, 77, 95, 2003), OpenMP, Java, Python, and Binary applications. ROSE users range from experienced compiler researchers to library and tool developers who may have minimal compiler experience. ROSE is particularly well suited for building custom tools for static analysis, program optimization, arbitrary program transformation, domain-specific optimizations, complex loop optimizations, performance analysis, and cyber-security. ROSE is: A library (and set of associated tools) to quickly and easily apply compiler techniques to one's code in order to improve application performance and developer productivity. A research and development compiler infrastructure for for writing custom source-to-source translators to perform source code transformations, analysis, and optimizations. Is

Pinnow, NathanT [Lawrence Livermore National Labor↗

A Program Analysis Tool to Query Static and Dynamic Characteristics of HPC Applications

Emerging HPC platforms are becoming extraordinarily difficult to program as a result of complex, deep and heterogeneous memory hierarchies, heterogeneous cores, and the need to divide work and data among them. New programming models and libraries are being developed to aid in porting efforts of application developers, but substantial code restructuring is still necessary to fully make use of these new technologies. To do this effectively, these developers need information about their source code characteristics, including static and dynamic (e.g. performance) information to direct their optimisation efforts and make key decisions. On the other hand, system administrators need to understand how users are using the software stack and resources on their systems to understand what software they need to provide to improve the productivity of the users on a platform.In this paper we describe a tool that combines compiler and profiler information to query performance characteristics within an application or across multiple applications on a given platform. Static and dynamic data about applications are collected and stored together in an SQL database that can be queried by either a developer or a system administrator. We will demonstrate the capabilities of this tool via a real-world example from application-driven case studies that aims at understanding the use of scientific libraries on a routine from the molecular simulation application CP2K.

Welch, Aaron↗

GPU-Based Static Data-Flow Analysis for Fast and Scalable Android App Vetting

Many popular vetting tools for Android applications use static code analysis techniques. In particular, Interprocedural Data-Flow Graph (IDFG) construction is the computation at the core of Android static data-flow analysis and consumes most of the analysis time. Many analysis tools use a worklist algorithm, an iterative fixed-point approach, to construct the IDFG. In this paper, we observe that a straightforward GPU parallelization of the worklist algorithm leads to significant underutilization of the GPU resources. We identify four performance bottlenecks, namely, frequent dynamic memory allocations, high branch divergence, workload imbalance, and irregular memory access patterns. Accordingly, we propose GDroid, a GPU-based worklist algorithm implementation with multiple fine-grained optimizations tailored to common characteristics of Android applications. The optimizations considered are: matrix-based data structure, memory access-based node grouping, and worklist merging. Our experimental evaluation, performed on 1000 Android applications, shows that the proposed optimizations are beneficial to performance, and GDroid can achieve up to 128X speedups against a plain GPU implementation.

Android security↗

LSAFE: a Lightweight Static Analysis Framework for binary Executables

Static analysis is a widely used technique for analyzing various aspects of programs. However, as programs become more complex, static analysis tools require larger resources, such as CPU time and memory, to perform the same tasks. Moreover, the source code of programs may not always be accessible, requiring static analysis to be performed on the binary executable code directly. To overcome these challenges, we propose a lightweight static analysis framework called LSAFE, which constructs control flow graphs (CFGs) and data dependency graphs (DDGs) of target programs with optimized performance in terms of CPU and memory usage. We evaluated the proposed framework using both Spec benchmark programs and real-world industrial applications, and found that it outperformed Angr, an existing state-of-the-art static analysis tool. Additionally, we demonstrate a case study that utilizes the CFG generated by LSAFE to detect memory leaks.

Qu, Guangzhi↗

Performance Exploration Through Optimistic Static Program Annotations

Compilers are limited by the static information directly or indirectly encoded in the program. Low-level languages, such as C/C++, are considered problematic as their weak type system and relaxed memory semantic allows for various, sometimes non-obvious, behaviors. Since compilers have to preserve the program semantics for all program executions, the existence of exceptional behavior can prevent optimizations that the developer would consider valid and might expect. Analyses to guarantee the absence of disruptive and unlikely situations are consequently an indispensable part of an optimizing compiler. However, such analyses have to be approximative and limited in scope as global and exact solutions are infeasible for any non-trivial program. In this paper, we present an automated tool to measure the effectmissing static information has on the optimizations applied to a given program. The approach generates an optimistically optimized program version which, compared to the original, defines a performance gap that can be closed by better compiler analyses and selective static program annotations. Our evaluation on six already tuned proxy applications for high-performance codes shows speedups of up to 20.6%. This clearly indicates that static uncertainty limits performance. At the same time, we observed that compilers are often unable to utilize additional static information. Thus, manual annotation of all correct static information is therefore not only error prone but also mostly redundant.

Auto Tuning↗

RAMSeS: Rapid Analysis of Mission Software Systems

Over the past few decades, software has become ubiquitous as it has been integrated into nearly every aspect of society, including household appliances, consumer electronics, industrial control systems, public utilities, government operations, and military systems. Consequently, many critical national security questions can no longer be answered convincingly without understanding software, including its purpose, its capabilities, its flaws, its communication, or how it processes and stores data. As software continues to become larger, more complex, and more widespread, our ability to answer important mission questions and reason about software in a timely way is falling behind. Today, to achieve such understanding of third-party software, we rely predominantly on the ability of reverse engineering experts to manually answer each particular mission question for every software system of interest. This approach often requires heroic human effort that nevertheless fails to meet current mission needs and will never scale to meet future needs. The result is an emerging crisis: a massive and expanding gap between the national security need to answer mission questions about software and our ability to do so. Sandia National Laboratories has established the Rapid Analysis of Mission Software Systems (RAMSeS) effort, a collaborative long-term effort aimed at dramatically improving our nation’s ability to answer mission questions about third-party software by growing an ecosystem of tools that augment the human reverse engineer through automation, interoperability, and reuse. Focusing on static analysis of binary programs, we are attempting to identify reusable software analysis components that advance our ability to reason about software, to automate useful aspects of the software analysis process, and to integrate new methodologies and capabilities into a working ecosystem of tools and experts. We aim to integrate existing tools where possible, adapt tools when modest modifications will enable them to interoperate, and implement missing capability when necessary. Although we do hope to automate a growing set of analysis tasks, we will approach this goal incrementally by assisting the human in an ever-widening range of tasks.

29 ENERGY PLANNING, POLICY, AND ECONOMY↗

Detecting Data-Races in High-Performance Computing

High-performance computing is susceptible to data-race bugs. Data races occur when sequences of computed events do not happen in the intended order, a significant barrier to the integrity of parallel programs using shared-memory architectures. Many approaches to data-race detection are based on traditional static-analysis techniques that typically execute on a program’s source code or control-flow graph (the graphical representation of all possible orders of events in the execution of a program). Similar to classical data-flow analyses, such tools can produce false alarms that report spurious race conditions on error free programs. We have developed a software verification technique that requires as input only a program’s source code and can automatically detect a data-race bug which definitely exists, determine that a program is definitely data-race free, or report that it cannot determine either of the two cases.

97 MATHEMATICS AND COMPUTING↗

Evaluating the effectiveness of program data features for guiding memory management

Recent trends have led to the adoption of larger and more complex memory systems, often with multiple tiers of memory performance within the same platform. To utilize complex memory systems efficiently, current data management strategies must be altered to map usage demands to the underlying hardware. Applications, as the generators of memory accesses, are well-suited to guide this process, but building and maintaining separate source code versions for different memory systems is not feasible in most cases. One potential solution is to employ automated program profiling and analysis to facilitate the production of application-based guidance. By attaching memory usage information to static or lightweight program features, compilers and runtime systems can generate fine-grained guidance without additional efforts from users or developers. Recent works have employed this approach with some success, but it is not clear which program features are most useful for guiding data management.This work evaluates the effectiveness of using different program data features to predict memory usage and guide memory management. It employs a custom set of simulation tools, based in the Intel® Pin framework, to collect and analyze the usage characteristics of application data associated with common program data features, such as allocation sites, types, and context. The results show that even relatively simple features, such as object size, are useful for selecting data with similar usage properties, but finer-grained features, such as the instructions that access a particular object, are often much more effective. Additionally, this work evaluates the performance of using different data features and different program inputs to guide data placement on a heterogeneous memory platform with a limited amount of high performance memory.

Effler, T. Chad↗

Nuclear Materials Packaging, Transportation, and Systems Analysis Group Software Quality Assurance Plan: ANSYS Mechanical Finite Element Analysis Software Version 2023R1

ANSYS Inc. develops and markets engineering simulation software and services used in the aerospace, automotive, manufacturing, electronics, biomedical, energy, defense, and many other industries. ANSYS is dedicated to engineering simulation and is the world’s leading software provider. ANSYS was founded in 1970 and is headquartered in Canonsburg, Pennsylvania. ANSYS provides an engineering analysis tool combining structural, thermal, computational fluid dynamics, acoustic, and electromagnetic simulation capabilities. ANSYS has two main programs, which use the same solvers: (1) Mechanical APDL (ANSYS Design Parametric Language), a Fortran-based coding platform, and (2) ANSYS Workbench, which uses a graphical user interface to aid in finite element analysis implementation. This plan covers both APDL and Workbench. The ANSYS computer program is a large-scale, multipurpose finite element program that can be used to solve several classes of engineering analyses. The analysis capabilities of ANSYS include the ability to solve static and dynamic structural analyses, steady-state and transient heat transfer problems, mode-frequency and buckling eigenvalue problems, static or time-varying magnetic analyses, and various types of field and coupled-field applications. The program contains many special features that allow nonlinearities or secondary effects such as plasticity, large strain, hyperelasticity, creep, swelling, large deflections, contact, stress stiffening, temperature dependency, material anisotropy, and radiation to be included in the solution. As ANSYS has been developed, other special capabilities such as substructuring, submodeling, random vibration, kinetostatics, kinetodynamics, free convection fluid analysis, acoustics, magnetics, piezoelectrics, coupled-field analysis, and design optimization have been added to the program. These capabilities contribute further to making ANSYS a multipurpose analysis tool for varied engineering disciplines. The ANSYS program has been in commercial use for over 50 years and has been used extensively in the aerospace, automotive, construction, electronic, energy services, manufacturing, nuclear, plastics, oil, and steel industries. Additionally, many consulting firms and hundreds of universities have used ANSYS for analysis, research, and educational purposes. ANSYS is recognized worldwide as one of the most widely used and capable programs of its type. Ansys design analysis software is the first created within a quality system with ISO 9001 certification, the internationally accepted quality standard. Product development, testing, maintenance and support processes also meet the United States Nuclear Regulatory Commission's quality requirements, as they have for nearly four decades. The Quality Assurance Service Agreement is suitable for the customers working in the nuclear industry who need to meet specific federal regulations including 10CRF50 Appendix B and provisions of 10CFR21. ANSYS has retained its original International Organization for Standardization (ISO) 9001 accreditation certificate since1995-05-04, It’s current certificate is valid until 2027-05-29.

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

Ompparser

ompparser is a standalone and unified OpenMP parser, which is motivated by the facts that: 1) The differences in terms of syntax and semantics of OpenMP constructs between C/C++ and Fortran are minor. 2) Current OpenMP compilers often develop their own parsers, which represent redundant work. The features of ompparser include: 1) ompparser can be used standalone for static source code analysis, e.g. tools for semantics checking or similarity analysis between C/C++ and Fortran programs 2) omppaser can be integrated into an OpenMP compiler implementation can reduce the development efforts, and there is no need to create and maintain two separate parsers for C/C++ and Fortran. 3) ompparser provides a complete reference OpenMP grammar in the Backus-Naur Form that formally describes all the latest OpenMP language constructs. This will help users understand the rules and restriction of the OpenMP standard, which no longer contains a reference grammar in its recent versions.

Wang, Anjia↗

PredCom: A Predictive Approach to Collecting Approximated Communication Traces

Communication traces collected from MPI applications are an important source of information for performance optimization as they can help analysts determine communication patterns and identify inefficiencies. However, their collection, especially at scale, is time consuming, since it usually requires running the complete target application on a large number of nodes. In this work, we present PredCom, a tool-chain to generate a predictive communication proxy based on information gathered from a few small scale runs, which allows us to extract approximate communication traces with an accuracy high enough for most analysis goals. For this, we combine LLVM passes on the original source code (to capture static program structure) with parameter prediction (to capture dynamic and scaling behavior). This approach drastically reduces the time needed for collecting the communication traces, even for traces on large numbers of MPI processes. Here, we demonstrate that PredCom generates communication traces of various applications up to 1612x faster with an accuracy loss of 0.11 on average compared to the original large-scale traces, and we show that the generated traces can be used to optimize process placement.

97 MATHEMATICS AND COMPUTING↗

How Do Electricity Pricing Programs Impact the Selection of Energy Efficiency Measures? - A Case Study with U.S. Medium Office Buildings

Building owners usually select energy efficiency measures (EEMs) by referring to return on investment (ROI). Current studies tend to apply static energy price to estimate ROI. However, more and more buildings are adopting dynamic electricity pricing programs. To understand how electricity pricing programs impact the selection of EEMs, this paper presents an analysis of the ROIs of EEMs under different pricing programs using U.S. medium office buildings as an example. Eight EEMs in four typical cities are selected as case studies. Considering five electricity pricing programs scenarios (one static program and four dynamic programs), EEMs are selected based on their ROIs. The main findings are: (1) The ROIs of EEMs change under different pricing programs. (2) In Honolulu, Buffalo, and Denver, replacing interior fixtures with higher-efficiency fixtures has a significantly higher ROI than the rest EEMs under all five pricing programs. However, the ROI of this EEM in Honolulu ranges from 28% to 47% for different pricing programs. (3) Similarly, in Fairbanks, replace heating coil with higher-efficiency coil produce higher ROI than the rest under all five pricing programs. (4) For other EEMs, their ROI rankings vary according to electricity pricing programs.

demand response↗

Toward Automated Detection of Portability Bugs in Kokkos Parallel Programs

Performance-portable programming frameworks provide abstractions for parallel execution to allow easily porting an application to multiple backend programming models, such as CUDA, HIP, and OpenMP. However, programs may still have portability bugs that manifest only on specific backends. Traditional testing is ineffective in discovering these bugs, as it would require concrete execution on all supported hardware configurations for a potentially infinite set of inputs. To mitigate this issue, we focused on a specific programming framework, Kokkos, and identified several categories of common portability bugs. We then developed Klokkos, a static analysis approach based on symbolic execution that can run on commodity hardware, before execution on supercomputers. As a proof-of-concept, we ran Klokkos on examples encoding the identified bugs. Our results show that Klokkos is effective, efficient, and precise: it detected all the considered bugs, quickly, and without any false positives. Although preliminary, our results motivate further research and development in this direction.

Kale, Vivek↗

Rotating Detonation Combustion for Gas Turbines: Modeling and System Synthesis to Exceed 65% Efficiency Goal (Phase II)

As of May 2019, all RDE test hardware and test operations were completed for this program. Over 700 hot fire tests were conducted at 4 facilities with 7 RDE assemblies, with the data available for future analysis. In particular, measured static and dynamic pressure and computational fluid dynamics (CFD) provided basis for pressure gain combustion (PGC) analysis of the Engineering Scale RDE. It was demonstrated via measurements and CFD that a carefully designed diffuser can recover some total pressure of the highly oscillatory RDE exhaust. In general, the isolator/injector is largest contributor of pressure losses; however a low loss design was demonstrated that improves significantly on previous natural-gas/air RDEs. Also, a tailored injector and mixing technique was demonstrated that allowed NG-air RDE operation with overall equivalence ratio of less than 0.6. CFD models by AR, the UofM and Purdue University were extensively used throughout the program to refine diffuser design for improved pressure recovery, to simulate injection and mixing, to estimate turbine interaction, to estimate combustor pressure gain anchored with test data and to provide input to other design and analytical tasks. CFD analyses were completed for many of the configurations tested at Purdue with the 13.4” RDE including the shark fin and low area ratio isolators. Results were compared favorably to available hot fire test particle image velocimetry (PIV) measurements and wave speeds. The results of these CFD analyses suggest a modest pressure gain of 33% with a sufficiently low area ratio isolator. A thermodynamic power plant system model was set up which utilizes an RDE combustor. The performance of the RDE combustor module was scaled based on measurements from the Engineering Scale RDE tests with low loss injector and tailored fuel flow. This combined model indicates potential for significant plant efficiency improvement. The successful tailored fuel injection test result with lower than .6 equivalence ratio has implication that a power plant can use a RDE combustor configuration where all the air flows through the combustion zone thereby not requiring a bypass mixer. In this configuration, the results of the natural gas combined cycle (NGCC) plant system indicate net efficiency of 66.4%.

02 PETROLEUM↗

Language Independent Static Analysis (LISA)

Software is becoming increasingly important in nearly every aspect of global society and therefore in nearly every aspect of national security as well. While there have been major advancements in recent years in formally proving properties of program source code during development, such approaches are still in the minority among development teams, and the vast majority of code in this software explosion is produced without such properties. In these cases, the source code must be analyzed in order to establish whether the properties of interest hold. Because of the volume of software being produced, automated approaches to software analysis are necessary to meet the need. However, this software boom is not occurring in just one language. There are a wide range of languages of interest in national security spaces, including well-known languages such as C, C++, Python, Java, Javascript, and many more. But recent years have produced a wide range of new languages, including Nim, (2008), Go (2009), Rust (2010), Dart (2011), Kotlin (2011), Elixir (2011), Red (2011), Julia (2012), Typescript (2012), Swift (2014), Hack (2014), Crystal (2014), Ballerina (2017) and more. Historically, automated software analyses are implemented as tools that intermingle both the analysis question at hand with target language dependencies throughout their code, making re-use of components for different analysis questions or different target languages impractical. This project seeks to explore how mission-relevant, static software analyses can be designed and constructed in a language-independent fashion, dramatically increasing the reusability of software analysis investments.

97 MATHEMATICS AND COMPUTING↗