English

Towards Semantics Lifting for Scientific Computing: A Case Study on FFT

Programming Languages 2025-01-17 v1 Symbolic Computation

Abstract

The rise of automated code generation tools, such as large language models (LLMs), has introduced new challenges in ensuring the correctness and efficiency of scientific software, particularly in complex kernels, where numerical stability, domain-specific optimizations, and precise floating-point arithmetic are critical. We propose a stepwise semantics lifting approach using an extended SPIRAL framework with symbolic execution and theorem proving to statically derive high-level code semantics from LLM-generated kernels. This method establishes a structured path for verifying the source code's correctness via a step-by-step lifting procedure to high-level specification. We conducted preliminary tests on the feasibility of this approach by successfully lifting GPT-generated fast Fourier transform code to high-level specifications.

Keywords

Cite

@article{arxiv.2501.09201,
  title  = {Towards Semantics Lifting for Scientific Computing: A Case Study on FFT},
  author = {Naifeng Zhang and Sanil Rao and Mike Franusich and Franz Franchetti},
  journal= {arXiv preprint arXiv:2501.09201},
  year   = {2025}
}

Comments

Accepted at the Theory and Practice of Static Analysis Workshop (TPSA), in conjunction with the ACM SIGPLAN Symposium on Principles of Programming Languages (POPL), 2025

R2 v1 2026-06-28T21:07:49.748Z