Search NASA⌕ Search

SEARCH · Search NASA

Results for “code review”

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

Support for Systematic Code Reviews with the SCRUB Tool

SCRUB is a code review tool that supports both large, team-based software development efforts (e.g., for mission software) as well as individual tasks. The tool was developed at JPL to support a new, streamlined code review process that combines human-generated review reports with program-generated review reports from a customizable range of state-of-the-art source code analyzers. The leading commercial tools include Codesonar, Coverity, and Klocwork, each of which can achieve a reasonably low rate of false-positives in the warnings that they generate. The time required to analyze code with these tools can vary greatly. In each case, however, the tools produce results that would be difficult to realize with human code inspections alone. There is little overlap in the results produced by the different analyzers, and each analyzer used generally increases the effectiveness of the overall effort. The SCRUB tool allows all reports to be accessed through a single, uniform interface (see figure) that facilitates brows ing code and reports. Improvements over existing software include significant simplification, and leveraging of a range of commercial, static source code analyzers in a single, uniform framework. The tool runs as a small stand-alone application, avoiding the security problems related to tools based on Web browsers. A developer or reviewer, for instance, must have already obtained access rights to a code base before that code can be browsed and reviewed with the SCRUB tool. The tool cannot open any files or folders to which the user does not already have access. This means that the tool does not need to enforce or administer any additional security policies. The analysis results presented through the SCRUB tool s user interface are always computed off-line, given that, especially for larger projects, this computation can take longer than appropriate for interactive tool use. The recommended code review process that is supported by the SCRUB tool consists of three phases: Code Review, Developer Response, and Closeout Resolution. In the Code Review phase, all tool-based analysis reports are generated, and specific comments from expert code reviewers are entered into the SCRUB tool. In the second phase, Developer Response, the developer is asked to respond to each comment and tool-report that was produced, either agreeing or disagreeing to provide a fix that addresses the issue that was raised. In the third phase, Closeout Resolution, all disagreements are discussed in a meeting of all parties involved, and a resolution is made for all disagreements. The first two phases generally take one week each, and the third phase is concluded in a single closeout meeting.

Holzmann, Gerald J.↗

Generating Code Review Documentation for Auto-Generated Mission-Critical Software

Model-based design and automated code generation are increasingly used at NASA to produce actual flight code, particularly in the Guidance, Navigation, and Control domain. However, since code generators are typically not qualified, there is no guarantee that their output is correct, and consequently auto-generated code still needs to be fully tested and certified. We have thus developed AUTOCERT, a generator-independent plug-in that supports the certification of auto-generated code. AUTOCERT takes a set of mission safety requirements, and formally verifies that the autogenerated code satisfies these requirements. It generates a natural language report that explains why and how the code complies with the specified requirements. The report is hyper-linked to both the program and the verification conditions and thus provides a high-level structured argument containing tracing information for use in code reviews.

Denney, Ewen↗

Summary of improvements in modeling for fidelity and performance in MAMBA during FY18

This milestone report summarizes the FMC work on improvements to the MAMBA modeling methodology. The work was performed in close collaboration with the PHI as well as THM focus area and it was undertaken to improve both the physical fidelity and computational performance of MAMBA. We first describe the path towards identifying and then resolving issues in the MAMBA code and the underlying physics models that were still remaining at the beginning of FY18, after the code re-write in the previous year. These were primarily related to boiling and species transport, especially boron, within the CRUD. The code problems originated in the MAMBA3D code, from which the development of the new re-written code started, but they were only identified during testing of the new MAMBA code. We purposefully discuss a number of alternative explanations and solutions to the main issue identified, since the two-phase character of fluid transport in the CRUD and the related mass transport are still sources of model uncertainty that we continue to investigate. The hands-on code development referenced in this report was done under PHI and this milestone mainly provided support in the form of analysis, literature review, code review and feedback to the code developers.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

Sonic Boom Propagation Codes Validated by Flight Test

The sonic boom propagation codes reviewed in this study, SHOCKN and ZEPHYRUS, implement current theory on air absorption using different computational concepts. Review of the codes with a realistic atmosphere model confirm the agreement of propagation results reported by others for idealized propagation conditions. ZEPHYRUS offers greater flexibility in propagation conditions and is thus preferred for practical aircraft analysis. The ZEPHYRUS code was used to propagate sonic boom waveforms measured approximately 1000 feet away from an SR-71 aircraft flying at Mach 1.25 to 5000 feet away. These extrapolated signatures were compared to measurements at 5000 feet. Pressure values of the significant shocks (bow, canopy, inlet and tail) in the waveforms are consistent between extrapolation and measurement. Of particular interest is that four (independent) measurements taken under the aircraft centerline converge to the same extrapolated result despite differences in measurement conditions. Agreement between extrapolated and measured signature duration is prevented by measured duration of the 5000 foot signatures either much longer or shorter than would be expected. The duration anomalies may be due to signature probing not sufficiently parallel to the aircraft flight direction.

Poling, Hugh W.↗

Review of Codes and Standards for Energy Storage Systems

This article identifies several examples of industry efforts and successes in removing gaps in energy storage (ES) Codes & Standards (C&S) by updating or creating and publishing new standards. A particular challenge discussed in this article is that while modern battery technologies including lithium ion (Li-ion) increase technical and economic viability of grid energy storage, newer battery technologies also present new or unknown risks to managing the safety of energy storage systems (ESS). There has been progress in filling gaps in published ES C&S that recognize and address the expanding range of technologies and their unique characteristics. However, there remain significant need and opportunity for researchers to contribute to the underlying knowledge base that informs development of technical references and standards, and ultimately the application of published standards for the effective and safe design and use of modern ESS.

Energy Storage, Codes and Standards↗

Review of the 10 th Non-LTE Code Comparison Workshop

This work reports on the results of the 10 th Non-LTE code comparison workshop, which was held at the University of San Diego campus November 28 through December 1, 2017. Non-equilibrium collisional-radiative models predict the electronic state populations and attendant emission and absorption characteristics of hot, dense matter and are used to help design and diagnose high-energy-density experiments. At this workshop, fifteen codes from eleven institutions contributed results for steady-state and time-dependent neon, aluminum, silicon, and chlorine cases relevant to a variety of high-density experimental and radiation-driven astrophysical systems. We focus on differences in the predictions from codes with different internal structure, completeness, density effects, and rate fidelity and the impact of those differences on hot, dense plasma diagnostics.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

Spectral fitting, shock layer modeling, and production of nitrogen oxides and excited nitrogen

An analysis was made of N2 emission from 8.72 MJ/kg shock layer at 2.54, 1.91, and 1.27 cm positions and vibrational state distributions, temperatures, and relative electronic state populations was obtained from data sets. Other recorded arc jet N2 and air spectral data were reviewed and NO emission characteristics were studied. A review of operational procedures of the DSMC code was made. Information on other appropriate codes and modifications, including ionization, were made as well as a determination of the applicability of codes reviewed to task requirement. A review was also made of computational procedures used in CFD codes of Li and other codes on JSC computers. An analysis was made of problems associated with integration of specific chemical kinetics applicable to task into CFD codes.

Blackwell, H. E.↗

Design and development of the ERBE data management system

The Earth radiation budget experiment (ERBE) software development approach is described. An iterative development approach was adopted which provides for three releases or versions of the processing system, each of increasing levels of complexity and solidity. The final release of the system will be used to process the flight data. The major phases for each iterative release consist of specifications developed in concert with the science team, preliminary design, subsystem reviews, coding, subsystem code walkthroughs, system testing, system documentation, and project status review.

Kibler, J. F.↗

A Review of Regulations, Codes, and Standards for Hydrogen Fuel Cell Electric Bus Use on Airports

This report reviews regulations, codes, and standards to be considered for FCEB operations on airports governing vehicle safety, hydrogen infrastructure, and airport operations. Overall, the review found the existing regulatory framework largely suitable for FCEB operations on airports, with only minor gaps identified pertaining to heavy-duty vehicle fueling, operation and fire safety on airport aprons, and authorization for emergency power use.

08 HYDROGEN↗

GridPACK: Library Architecture and Usability Assessment

The LLNL team has carried out extensive analysis of GridPACK code, including two major code reviews (each being a 2-day event) and a vendor emulation exercise, where the team integrated GridPACK library within a third-party application. The code analysis identified a number of areas for improvement of GridPACK code architecture, but it did not find fundamental flaws in the GridPACK design. The team found the GridPACK strategy of developing a software development kit (SDK) for power systems application development to be sound and well aligned with Office of Electricity long term objectives. The SDK aims to provide power systems software vendors an easy access to high performance computing (HPC) libraries.

24 POWER TRANSMISSION AND DISTRIBUTION↗

Detection and avoidance of errors in computer software

The acceptance test errors of a computer software project to determine if the errors could be detected or avoided in earlier phases of development. GROAGSS (Gamma Ray Observatory Attitude Ground Support System) was selected as the software project to be examined. The development of the software followed the standard Flight Dynamics Software Development methods. GROAGSS was developed between August 1985 and April 1989. The project is approximately 250,000 lines of code of which approximately 43,000 lines are reused from previous projects. GROAGSS had a total of 1715 Change Report Forms (CRFs) submitted during the entire development and testing. These changes contained 936 errors. Of these 936 errors, 374 were found during the acceptance testing. These acceptance test errors were first categorized into methods of avoidance including: more clearly written requirements; detail review; code reading; structural unit testing; and functional system integration testing. The errors were later broken down in terms of effort to detect and correct, class of error, and probability that the prescribed detection method would be successful. These determinations were based on Software Engineering Laboratory (SEL) documents and interviews with the project programmers. A summary of the results of the categorizations is presented. The number of programming errors at the beginning of acceptance testing can be significantly reduced. The results of the existing development methodology are examined for ways of improvements. A basis is provided for the definition is a new development/testing paradigm. Monitoring of the new scheme will objectively determine its effectiveness on avoiding and detecting errors.

Kinsler, Les↗

CST: A Tool for Optimizing the Efficiency and Effectiveness of Static-Code Analysis Tools

Static Code Analysis (SCA) is a vital component of NASA IV&V’s mission assurance for safety-critical software as it reduces the likelihood of software-induced hazards impacting mission success. Static Code Analysis achieves this by identifying hazards that may not have been otherwise detectable by typical code reviews or other testing. Using SCA tools, however, can be intimidating due to steep learning curves, especially considering tool performance and defect coverage varies greatly. Because of this variation amongst SCA tools, understanding which tools support certain defects and which do not, as well as understanding how to run an analysis based on steps that are unique to each tool, can be difficult to both new and experienced analysts alike. To mitigate this, the SCAWG or the IV&V Static Code Analysis Working Group, created the SCA Checker Taxonomy and Starting Point Profiles. The Checker Selection Tool (CST) incorporates these two SCAWG products into an interactive tool which allows the user to: select organized categories of defects they would like the SCA tools to discover, select default checkers depending on their mission type (e.g. flight), and configure multiple SCA tools at once. C/C++, Java, and Python defect checkers from four common SCA tools were utilized in this iteration of the CST. This iteration also includes the addition of training, SCA tool specific help, and taxonomy guide links, into its design to help users new to Static Code Analysis learn how to perform SCA more efficiently. The CST has been subject to beta testing by experienced static code analysts from the SCAWG to ensure a usable and accurate final product. The implications of the CST in the mission assurance of NASA safety-critical software are profound, as the CST can help identify and reduce false positives and false negatives, fundamentally improving overall SCA efficiency and accuracy.

static code analysis↗

Memory-Efficient Onboard Rock Segmentation

Rockster-MER is an autonomous perception capability that was uploaded to the Mars Exploration Rover Opportunity in December 2009. This software provides the vision front end for a larger software system known as AEGIS (Autonomous Exploration for Gathering Increased Science), which was recently named 2011 NASA Software of the Year. As the first step in AEGIS, Rockster-MER analyzes an image captured by the rover, and detects and automatically identifies the boundary contours of rocks and regions of outcrop present in the scene. This initial segmentation step reduces the data volume from millions of pixels into hundreds (or fewer) of rock contours. Subsequent stages of AEGIS then prioritize the best rocks according to scientist- defined preferences and take high-resolution, follow-up observations. Rockster-MER has performed robustly from the outset on the Mars surface under challenging conditions. Rockster-MER is a specially adapted, embedded version of the original Rockster algorithm ("Rock Segmentation Through Edge Regrouping," (NPO- 44417) Software Tech Briefs, September 2008, p. 25). Although the new version performs the same basic task as the original code, the software has been (1) significantly upgraded to overcome the severe onboard re source limitations (CPU, memory, power, time) and (2) "bulletproofed" through code reviews and extensive testing and profiling to avoid the occurrence of faults. Because of the limited computational power of the RAD6000 flight processor on Opportunity (roughly two orders of magnitude slower than a modern workstation), the algorithm was heavily tuned to improve its speed. Several functional elements of the original algorithm were removed as a result of an extensive cost/benefit analysis conducted on a large set of archived rover images. The algorithm was also required to operate below a stringent 4MB high-water memory ceiling; hence, numerous tricks and strategies were introduced to reduce the memory footprint. Local filtering operations were re-coded to operate on horizontal data stripes across the image. Data types were reduced to smaller sizes where possible. Binary- valued intermediate results were squeezed into a more compact, one-bit-per-pixel representation through bit packing and bit manipulation macros. An estimated 16-fold reduction in memory footprint relative to the original Rockster algorithm was achieved. The resulting memory footprint is less than four times the base image size. Also, memory allocation calls were modified to draw from a static pool and consolidated to reduce memory management overhead and fragmentation. Rockster-MER has now been run onboard Opportunity numerous times as part of AEGIS with exceptional performance. Sample results are available on the AEGIS website at http://aegis.jpl.nasa.gov.

Burl, Michael C.↗

MAUS: the MICE analysis user software

The Muon Ionization Cooling Experiment (MICE) collaboration has developed the MICE Analysis User Software (MAUS) to simulate and analyze experimental data. It serves as the primary codebase for the experiment, providing for offline batch simulation and reconstruction as well as online data quality checks. The software provides both traditional particle-physics functionalities such as track reconstruction and particle identification, and accelerator physics functions, such as calculating transfer matrices and emittances. The code design is object orientated, but has a top-level structure based on the Map-Reduce model. This allows for parallelization to support live data reconstruction during data-taking operations. MAUS allows users to develop in either Python or C++ and provides APIs for both. Various software engineering practices from industry are also used to ensure correct and maintainable code, including style, unit and integration tests, continuous integration and load testing, code reviews, and distributed version control. The software framework and the simulation and reconstruction capabilities are described.

47 OTHER INSTRUMENTATION↗

Shifting Left for Machine Learning: An Empirical Study of Security Weaknesses in Supervised Learning-based Projects

Context: Supervised learning-based projects (SLPs), i.e., software projects that use supervised learning algorithms, such as decision trees are useful for performing classification-related tasks. Yet, security weaknesses, such as the use of hard-coded passwords in SLPs, can make SLPs susceptible to security attacks. A characterization of security weaknesses in SLPs can help practitioners understand the security weaknesses that are frequent in SLPs and adopt adequate mitigation strategies. Objective: The goal of this paper is to help practitioners se-curely develop supervised learning-based projects by conducting an empirical study of security weaknesses in supervised learning-based projects. Methodology: We conduct an empirical study by quantifying the frequency of security weaknesses in 278 open source SLPs. Results: We identify 22 types of security weaknesses that occur in SLPs. We observe ‘use of potentially dangerous function’ to be the most frequently occurring security weakness in SLPs. Of the identified 3,964 security weaknesses, 23.79 % and 40.49 % respectively, appear for source code files used to train and test models. We also observe evidence of co-location, e.g., instances of command injection co-locates with instances of potentially dangerous function. Conclusion: Based on our findings, we advocate for a shift left approach for SLP development with security-focused code reviews, and application of security static analysis.

Bhuiyan, Farzana Ahamed↗