Predicting Program Exit Code with LLMs and Programming Language Semantics
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have shown proficiency in various software engineering tasks, such as code generation and translation. However, a key limitation in their performance may be their (lack of) understanding of programming-language semantics. Even when explicit semantics are given, it remains unclear whether LLMs apply those rules or lean on priors learned during pre-training instead. We study if LLMs lean on priors or given semantics with a novel task--Program Executability Prediction (PrEx)--that asks models to predict whether a program is semantically valid or invalid (and, if invalid, which formal rule it violates) given the program's syntax and operational semantics. Because PrEx requires both valid and invalid programs, we build a dataset with systematically generated invalid transformations derived from valid programs. We evaluate open-source coding LLMs under two semantic formalisms and two semantic shifts across Human-Written, LLM-Translated, and Fuzzer-Generated program splits. Our findings show that LLMs lean on pre-training priors rather than systematically applying the given rules, performing especially poorly on modified semantics and degrading further as program complexity increases. PrEx is available at https://github.com/EngineeringSoftware/prex.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 27 of its 45 references that are in the map. First posted on arXiv 1 Sep 2026.
Builds on
27 of 45 references.
References · 27
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,146
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
- 2023LongCoder: A Long-Range Pre-trained Language Model for Code Completioncited by 110
- 2024MarsCode Agent: AI-native Automated Bug Fixingcited by 68
- 2024NExT: Teaching Large Language Models to Reason about Code Executioncited by 60
- 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
15 more
- 2024Reasoning Runtime Behavior of a Program with LLM: How Far Are We?cited by 44
- 2024A Deep Dive into Large Language Models for Automated Bug Localization and Repaircited by 39
- 2023Unveiling Memorization in Code Modelscited by 29
- 2024InterTrans: Leveraging Transitive Intermediate Translations to Enhance LLM-based Code Translationcited by 15
- 2024Large Language Models as Code Executors: An Exploratory Studycited by 12
- 2025Code Summarization Beyond Function Levelcited by 8
- 2025LLMs Lean on Priors, Not Programming Language Semanticscited by 5
- 2023How Does Naming Affect LLMs on Code Analysis Tasks?cited by 4
- 2026Learned or Memorized ? Quantifying Memorization Advantage in Code LLMscited by 4
- 2024CodeFlow: Program Behavior Prediction with Dynamic Dependencies Learningcited by 3
- 2025Trust Me, I Know This Function: Hijacking LLM Static Analysis using Biascited by 3
- 2025Sense and Sensitivity: Examining the Influence of Semantic Recall on Long Context Code Understandingcited by 2
- 2025DCE-LLM: Dead Code Elimination with Large Language Modelscited by 2
- 2026LLMs versus the Halting Problem: Characterizing Program Termination Reasoningcited by 2
- 2026Detecting Functional Memorization in Code Language Modelscited by 1
Built on by
Not cited yet.