Search NASASearch

SEARCH · Search NASA

Results for “Unit Test”

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

ON THE EFFECTIVENESS OF LLMS IN UNIT TEST GENERATION FOR STRUCTURED TEXT PROGRAMS

The reliability of industrial automation systems heavily depends on the correctness of Programmable Logic Controller (PLC) programs, which are often written in Structured Text (ST). While Large Language Models (LLMs) have shown promise in automating test generation for mainstream programming languages, their effectiveness for the syntactically strict ST language remains underexplored. This thesis presents a systematic empirical evaluation of three state-of-the-art LLMs—GPT-4o, Gemini 2.5 Pro, and Claude Sonnet 4.5—for generating ST unit tests. We examine three prompting strategies: Natural Language (NL), Code Language (CL), and Chain-of-Thought (CoT), across a curated set of 11 ST function blocks. The quality of the generated tests is assessed using Compilation Success Rate (CSR), Statement Coverage (SC), and Branch Coverage (BC). In the zero-shot setting, Claude Sonnet 4.5 achieves the highest CSR, while Gemini 2.5 Pro consistently delivers the best statement and branch coverage, particularly under CL prompts. By incorporating a one-shot CL prompt, all models exhibit substantial improvements—most notably GPT-4o, whose CSR increases from 45.45% to 90.91%, with substantial gains in both SC and BC. To further contextualize these findings, we compare GPT-4o’s one-shot results with PLCAutoTester, a state-ofthe- art ST unit test generation tool, on an additional benchmark dataset. While LLMgenerated tests approach competitive coverage levels, PLCAutoTester maintains significantly higher and more stable coverage across programs. This study provides the first comprehensive benchmark of modern LLMs for ST unit testing, highlighting their strengths, limitations, and improvements through one-shot prompting, and positioning their performance relative to specialized automated testing tools in industrial automation.

42 ENGINEERING

Test Report for the Regulatory Testing of the Welded Isotek-SFC-W-3 Special Form Capsule

Two prototypes the welded ISOTEK-SFC-W-3 special form capsules (SFCs) of the same design were evaluated to determine if the requirements of Title 49, Code of Federal Regulations (CFR), Part 173.469, Tests for Special Form Class 7 (Radioactive) Materials, were met. The results of the special form tests are documented in this test report. This report describes the special form testing activities performed on the two welded ISOTEK-SFC-W-3 capsules. The test units were designated as TU-1 and TU-2. TU-1 was subjected to leak testing, percussion testing, and impact testing. TU-1 was leak tested using the leak rate test specified in 49 CFR 173.469(a)(4)(i). The impact test on TU-1 was conducted according to the requirements in 49 CFR 173.469 (b)(1). The percussion test that was carried out on TU-1 was conducted in accordance with 49 CFR 173.469 (b)(2). TU-2 was subjected to a leak rate test as specified in 173.469(a)(4)(i) and a heat test as specified in 49 CFR 173.469(b)(4). Each test unit was leak tested before and after these respective tests. The leak rate tests performed were helium back-pressure tests and bubble tests, as specified in American National Standards Institute (ANSI) N14.5-2014. The measured leak rates were converted to standard condition leak rates as specified in American Society for Testing and Measurement (ASTM) E 493. The determined standardized leak rates obtained from the test and the calculations for all the test units met the requirements for special form certification. The testing was performed under the direction of the Oak Ridge National Laboratory (ORNL) Package Testing Program (PTP).

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS

Idiomatic Correctness-Checking via Julienne in Fortran 2023

This paper presents a unified approach to unit testing and runtime assertion checking using Fortran 2023. The paper describes the support for our approach in the Julienne framework. Julienne leverages recent Fortran standards to implement object-oriented design patterns, support testing parallel programs, and implement functional programming patterns in order to craft idioms inspired by natural-language expressions. The presented idioms employ novel operators to write expressions that evaluate to a test-diagnosis object encapsulating two components: (1) the test outcome or assertion outcome and (2) an automatically generated diagnostic string. Two other novel aspects of the approach include (1) the ability to enforce assertions inside pure procedures and (2) the ability to output rich diagnostic information inside pure procedures during error termination when assertions fail. The latter capability mitigates against a reason that Fortran programmers commonly cite for not writing pure procedures: difficulty obtaining useful program output inside pure procedures when debugging code. This paper demonstrates how the adoption of the proposed idioms leads naturally to a unifying theme across two otherwise disparate technologies: unit testing and runtime assertion checking. Finally, this paper describes the usage of the Julienne testing framework for writing unit tests and assertions in the Matcha high-performance computing application and the Fiats deep learning library.

Rouson, Damian

AI Model Benchmarking for Nonproliferation Applications: Steel Thread Benchmarking Task Force Technical Report (Rev. 2)

Steel Thread is a NA-22 venture that seeks to build trustworthy, reliable AI models that can be used in a wide variety of nonproliferation tasks. A key aspect of building these models is developing appropriate benchmarks and evaluation methods, which will enable the venture to identify and adapt models to provide the most value in the nonproliferation domain. Benchmarks must be relevant to key tasks in this domain, such as question answering, information retrieval, document summarization and classification, consensus analysis, and image and data analysis. This report 1) provides an overview of benchmark design, evaluation, and challenges; 2) reviews a variety of open benchmarks, with a focus on language models and tasks; and 3) identifies benchmarks that are most relevant to Steel Thread. This report is intended to serve as a basis for further efforts to classify and evaluate benchmarks and their correlation with success on nonproliferation-specific tasks. The Steel Thread venture has defined benchmarks to be a particular combination of a dataset (or datasets) and a metric (or metrics) conceptualized as representing one or more specific tasks or sets of abilities for a specific modality. It is adopted by a research community as a shared framework for comparing methods.1 It includes 1) Data: Labeled (a designated subset not used for training, which could be all the data), 2) Metric: A way to quantify performance, 3) Task/Ability: What the benchmark is testing, 4) Protocol: A structured and repeatable evaluation process, 5) Baseline/Reference Model: For comparison; could be statistical, rule-based, SME-derived, or another model, and 6) Maintenance Plan: to update with new information over time; important for long-term utility. For further clarity, the definition includes what a benchmark, in this context, is not. It is not a corpus of training data, specific to a model (it is intended to apply to a range of models), a universal evaluation of performance, a guarantee that the ‘top’ model on the leaderboard will be the best fit for every specific use case, an all-encompassing proof of a model’s universal quality, nor is it a one-size-fits-all measure of success. It does not cover every real-world constraint (like operational, ethical, or cost considerations), a systems integration test, or a unit test. This definition was inspired by and resulted from discussions within the Steel Thread Benchmarking Task Force. This group was formed to define what we would mean as a benchmark within Steel Thread but persisted as the need to develop a thorough understanding of the large and expanding existing benchmarking space. This technical report is a result of the group’s divide and conquer approach to exploring this space. The release of benchmarks might not be progressing as quickly as model development, but it is moving very fast, as many benchmarks quickly become saturated, when state-of-the-art models score so close to the benchmark’s ceiling that their results are virtually indistinguishable. At that point, the test no longer differentiates between new systems, so researchers usually stop reporting scores as the benchmark no longer informs about improvements from the next generation of models. In the OpenAI announcement of GPT-5, they reported results on six flagship public benchmarks (AIME 2025, SWE-bench Verified, Aider Polyglot, MMMU, HealthBench Hard, GPQA) but the full system-card covers roughly thirty-five separate evaluations, comprising hundreds of test task items in total. There have been some efforts to summarize benchmarks in specific fields, like for text-to-image generation, but these surveys have had a narrow methodology scope. Therefore, a comprehensive survey of all benchmarks or even all benchmarks that could be relevant to Steel Thread is outside of the scope of this report. We chose some specific benchmarks to investigate in detail.

97 MATHEMATICS AND COMPUTING

LLM Benchmarking with LLaMA2: Evaluating Code Development Performance Across Multiple Programming Languages

The rapid evolution of large language models (LLMs) has opened new possibilities for automating various tasks in software development. This paper evaluates the capabilities of the LLaMA 2-70B model in automating these tasks for scientific applications written in commonly used programming languages. Using representative test problems, we assess the model's capacity to generate code, documentation, and unit tests, as well as its ability to translate existing code between commonly used programming languages. Our comprehensive analysis evaluates the compilation, runtime behavior, and correctness of the generated and translated code. Additionally, we assess the quality of automatically generated code, documentation, and unit tests. Here, our results indicate that while LLaMA 2-70B frequently generates syntactically correct and functional code for simpler numerical tasks, it encounters substantial difficulties with more complex, parallelized, or distributed computations, requiring considerable manual corrections. We identify key limitations and suggest areas for future improvements to better leverage AI-driven automation in scientific computing workflows.

97 MATHEMATICS AND COMPUTING

Closure Report for Corrective Action Unit 572: Test Cell C Ancillary Building and Structures, Nevada National Security Site, Nevada, Revision 0

The purpose of this CR is to provide documentation supporting the completed corrective actions and data confirming that the closure objectives for CAU 572 were met. To achieve this, the following actions were performed: • Corrective action investigation (CAI) activities were performed from August 2020 through May 2023, as set forth in the SAFER Plan for CAU 572; and in accordance with the Soils Activity Quality Assurance Plan, which establishes requirements, technical planning, and general quality practices. • Corrective actions were completed during decontamination and demolition (D&D) and disposal activities, and were performed from August 2022 through September 2025.

54 ENVIRONMENTAL SCIENCES

Portable Software Environment for Ultrahigh-Resolution ELM Development on GPUs

This paper presents our endeavors in developing the large-scale, ultra-high-resolution E3SM Land Model (uELM), specifically designed for exascale computers furnished with accelerators such as Nvidia GPUs. The uELM is a sophisticated code that substantially relies on High-Performance Computing (HPC) environments, necessitating particular machine and software configurations. To facilitate community-based uELM developments employing GPUs, we have created a portable, standalone software environment preconfigured with uELM input datasets, simulation cases, and source code. This environment, utilizing Docker, encompasses all essential code, libraries, and system software for uELM development on GPUs. It also features a functional unit test framework and an offline model testbed for comprehensive numerical experiments. From a technical perspective, the paper discusses GPU-ready container generations, uELM code management, and input data distribution across computational platforms. Lastly, the paper demonstrates the use of environment for functional unit testing, end-to-end simulation on CPUs and GPUs, and collaborative code development.

E3SM Land Model

Engineering-Scale Test of a Water-Lean Solvent for Post-Combustion Capture

EPRI, Pacific Northwest National Laboratory, RTI International, and their project collaborators developed an engineering-scale test of a new water-lean solvent, N-(2-ethoxyethyl)-3-morpholinopropan-1-amine (EEMPA or 2-EEMPA) as a post-combustion CO 2 capture solvent for power plant applications. This test was conducted using the Pilot Solvent Test Unit at the National Carbon Capture Center. The primary objective of this test was to collect long-term data operating EEMPA with both coal- and natural gas-representative flue gases at the approximately 0.5 MW e -equivalent scale (5–10 metric tons CO 2 /day captured). This report details the activities preparing for that test, data collected during the test campaign, and analyses and interpretations of that data.

20 FOSSIL-FUELED POWER PLANTS

Development of a rate-based ENRTL-RK process model for a water-lean solvent

Advanced water-lean solvents (WLS) for post-combustion CO2 capture offer several advantages over the aqueous amine solvents . WLS have lower parasitic energy penalty, lower corrosion, lower temperature and high-pressure CO2 regeneration leading to lower cost of CO2 capture. RTI International, with funding from the US Department of Energy, has been developing its novel water-lean solvent, that has shown specific reboiler duty of 2.3 GJ/t-CO2 at the 60-kWe pilot testing unit (Tiller Plant, SINTEF, Norway) and 2.6 GJ/t-CO2 at the engineering scale testing system (12 MWe) at the Technology Centre Mongstad (TCM) in Norway. All heat duties, including the one from TCM testing, were consistent with Aspen Plus modeling of the specific configuration of each test plant. This work focuses on the development of a detailed process model using in-house laboratory measurements and process data at pilot scale. The eNTRL-RK model used in this work is based on an unsymmetric activity coefficient model with the reference states chosen to be pure liquids for solvents and ideal dilute solution at unit solute molality (resulting in activity coefficient of unity at infinite dilution) for electrolytes. It uses the Redlich-Kwong equation of state for vapor phase properties and Henry’s law for solubility of supercritical gases. The model was validated using process data from the pilot-scale campaign at the Tiller plant, and the engineering scale test campaign at TCM. Data on CO2 capture rate, absorber, and regenerator temperature profiles and specific reboiler duties from two different test campaigns at Tiller and TCM, were used to further refine and validate the model and the model compares favorably to experimental data. The validation results against TCM campaign will be presented in this work.

CO2 capture

Design of Experiments for Dynamic Test Runs in Solvent-Based CO 2 Capture Pilot Plants

Test runs in the pilot plants consume significant resources, and therefore, the learning from test runs should be maximized. Test runs conducted in the pilot plants are often steady state. It takes several hours for reaching steady-state in the pilot plants, and thus, the duration of the test runs needs to be long even for collecting few steady-state data points. On the other hand, a large number of measurements can be collected through dynamic test runs in a short span of time. This paper presents a systematic design of dynamic experiments (DoDEs) for identifiability of model parameters, which is achieved by persistently exciting the inputs signals. A pseudorandom binary sequence (PRBS) is designed as the input signal for DoDE due to its efficiency in obtaining sufficient spectral content. However, due to the long sequence size of the PRBS signal, a Schroeder-phase input signal, which is a multisine signal, is also designed. Tests for both types of signals are run in the Pilot Solvent Test Unit (PSTU) at the National Carbon Capture Center in Wilsonville, Alabama. The transient data are used to solve dynamic data reconciliation and parameter estimation problem. The estimated parameters are found to be not only superior to those estimated from using data collected from hundreds of steady-state test runs in a nonreactive (air–water) system, but the parameters could be estimated by using the dynamic data collected for about 24 h from the pilot plant for the MEA-H 2 O–CO 2 system.

CO2 capture

Leveraging Gaussian Mixture Models for Detecting Anomalies in Time-Series Data

Test systems must be capable of classifying measured data as expected or anomalous in real time. Anomalous results may portend system failure, and, if undetected, may result in damage to the unit, test equipment, or potential harm to personnel. This report investigates the use of Gaussian Mixture Models (GMMs) as a clustering tool in classifying time-series data.

Wilke, Rudeger H.T. [Sandia National Laboratories

New particle pusher with hadronic interactions for modeling multimessenger emission from compact objects

We propose novel numerical schemes based on the Boris method in curved spacetime, incorporating both hadronic and radiative interactions for the first time. Once the proton has lost significant energy due to radiative and hadronic losses, and its gyroradius has decreased below typical scales on which the electromagnetic field varies, we apply a guiding center approximation (GCA). We fundamentally simulate collision processes either with a Monte-Carlo method or, where applicable, as a continuous energy loss, contingent on the local optical depth. To test our algorithm for the first time combining the effects of electromagnetic, gravitational, and radiation fields including hadronic interactions, we simulate highly relativistic protons traveling through various electromagnetic fields and proton backgrounds. We provide unit tests in various spatially dependent electromagnetic and gravitational fields and background photon and proton distributions, comparing the trajectory against analytic results. We propose that our method can be used to analyze hadronic interactions in black hole accretion disks, jets, and coronae to study the neutrino abundance from active galactic nuclei.

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS

Viscous Gubser flow with conserved charges to benchmark fluid simulations

We present semi-analytical solutions for the evolution of both the temperature and chemical potentials for viscous Gubser flow with conserved charges. Such a solution can be especially useful in testing numerical codes intended to simulate relativistic fluids with large chemical potentials. The freeze-out hypersurface profiles for constant energy density are calculated, along with the corresponding normal vectors, and presented as a new unit test for numerical codes. We also compare the influence of the equation of state on the semi-analytical solutions. We benchmark the newly developed smoothed particle hydrodynamics code ccake that includes both shear viscosity and three conserved charges. Here, the numerical solutions are in excellent agreement with the semi-analytical solution and are also able to accurately reproduce the hypersurface at freeze-out.

Hydrodynamic models

Static characterization of a highly optimized streak tube design incorporating a steering slot anode and an aberration-corrected Einzel lens

The BHx streak tube, under development at the Laboratory for Laser Energetics, incorporates a series of novel electron-optics elements to enable high fidelity measurements for high-energy-density physics experiments. The system is engineered to support a 25-mm active photocathode region compatible with sub-picosecond temporal resolution and with 70% internal photoelectron throughput. It exhibits negligible geometric distortion on a flat output screen, making it well suited for variety of measurements, such as ultrafast x-ray spectroscopy. Here, this paper presents characterization data from a prototype unit tested with an ultraviolet laser in a static deflection (non-swept) mode and shows good agreement with the predictions from numerical modeling, including focusing performance and geometric distortion measurements. Key design elements have been demonstrated and de-risked, laying the foundation for dynamic deflection testing. The anticipated improvements in data fidelity are expected to impact the fields as diverse as inertial confinement fusion, laboratory astrophysics, and materials science.

High energy density physics

KBKit: A Python Toolkit for Kirkwood–Buff Theory from Molecular Dynamics

Thermodynamic properties of liquid mixtures govern processes that range from drug delivery to energy storage, yet extracting these properties from molecular simulations remains challenging. Kirkwood–Buff (KB) theory offers a rigorous route by linking microscopic pair distribution functions to macroscopic free energies, but practical use of the theory has been hindered by two obstacles: (i) the long simulations needed to obtain well-converged Kirkwood-Buff integrals (KBIs) and (ii) the specialized corrections required to translate finite-size data to the thermodynamic limit. $\texttt{KBKit}$ is an open-source Python package that removes these barriers. It automatically computes KBIs and derived thermodynamic quantities from GROMACS input files, applies state-of-the-art finite-size corrections, and provides built-in diagnostic tools to quantify statistical uncertainty. Written with modern software-engineering practices—continuous integration, extensive unit testing, and thorough documentation—$\texttt{KBKit}$ is both reliable and easy to extend. By condensing complex KBI analysis into a few intuitive commands, $\texttt{KBKit}$ enables researchers to incorporate KB theory into routine simulation workflows and accelerate the discovery of solution-phase thermodynamics.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH